Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
bounty_troop Class Reference
Inheritance diagram for bounty_troop:
bounty_leader bounty

Public Member Functions

def __init__
 
def LaunchedEnemies
 
def Execute
 
- Public Member Functions inherited from bounty_leader
def __init__
 
def Execute
 
def LaunchedEnemies
 
- Public Member Functions inherited from bounty
def SetVar
 
def __init__
 
def AdjLocation
 
def Win
 
def Lose
 
def LaunchedEnemies
 
def Execute
 
def initbriefing
 
def loopbriefing
 
def endbriefing
 

Data Fields

 trooptime
 
 troopdidlaunch
 
 inevitabletime
 
 dockingdist
 
 wastingtime
 
 wastingtimestart
 
 istarget
 
 utdw
 
- Data Fields inherited from bounty_leader
 helpertype
 
 numhelpers
 
 helperfg
 
 upgrades
 
- Data Fields inherited from bounty
 firsttime
 
 newship
 
 dynfg
 
 mplay
 
 var_to_set
 
 istarget
 
 obj
 
 curiter
 
 arrived
 
 faction
 
 difficulty
 
 runaway
 
 greetingText
 
 cred
 
 you
 
 enemy
 
 adjsys
 
 dockable_unit
 
 displayLocation
 

Detailed Description

Definition at line 2 of file bounty_troop.py.

Constructor & Destructor Documentation

def __init__ (   self,
  minnumsystemsaway,
  maxnumsystemsaway,
  creds,
  run_away,
  shipdifficulty,
  tempfaction,
  jumps = (),
  var_to_set = '',
  dynfg = '',
  dyntype = "",
  displayLocation = 1,
  dynhelperfg = '',
  dynhelpertype = '',
  greetingText = ['It appears we have something in common,
  privateer,
  My,
  name,
  may,
  be,
  on,
  your,
  list,
  but,
  now,
  your,
  name,
  is,
  on,
  mine,
  leader_upgrades = [],
  trooptime = 30,
  dockingdist = 2400,
  wastingtime = 0 
)

Definition at line 3 of file bounty_troop.py.

References bounty_leader.__init__().

3 
4  def __init__(self,minnumsystemsaway, maxnumsystemsaway, creds, run_away, shipdifficulty, tempfaction,jumps=(),var_to_set='',dynfg='',dyntype="",displayLocation=1,dynhelperfg='',dynhelpertype='',greetingText=['It appears we have something in common, privateer.','My name may be on your list, but now your name is on mine.'],leader_upgrades=[],trooptime=30,dockingdist=2400,wastingtime=0):
5  bounty_leader.bounty_leader.__init__(self,minnumsystemsaway, maxnumsystemsaway, creds, run_away, shipdifficulty, tempfaction,jumps,var_to_set,dynfg,dyntype,displayLocation,dynhelperfg,dynhelpertype,greetingText,leader_upgrades,True)
6  self.trooptime=trooptime
7  self.troopdidlaunch=False
9  self.dockingdist=dockingdist
10  self.wastingtime=wastingtime
self.wastingtimestart=0

Member Function Documentation

def Execute (   self)

Definition at line 34 of file bounty_troop.py.

References bounty.enemy, ambush.enemy, bounty_leader.Execute(), bounty_troop.inevitabletime, bounty.Lose(), bounty_troop.troopdidlaunch, bounty_troop.trooptime, bounty_troop.utdw, and bounty_troop.wastingtimestart.

34 
35  def Execute(self):
36  import VS
37  if (self.wastingtimestart!=0 and self.wastingtimestart<VS.GetGameTime() and self.utdw!=self.enemy):
38  self.wastingtimestart=0
39  self.enemy.performDockingOperations(self.utdw,True)
41  if (self.troopdidlaunch and self.inevitabletime ==0):
42  if self.enemy.getDistance(self.utdw)<0:
43  self.inevitabletime=VS.GetGameTime()
44  if self.inevitabletime !=0 and VS.GetGameTime()-self.inevitabletime>self.trooptime:
45  self.utdw.setFactionName(self.enemy.getFactionName())
46  self.Lose(1)
47 
def LaunchedEnemies (   self,
  significant 
)

Definition at line 11 of file bounty_troop.py.

References bounty_leader.LaunchedEnemies(), and bounty_troop.troopdidlaunch.

11 
12  def LaunchedEnemies(self,significant):
13  import VS
15  self.troopdidlaunch=True
16  import unit
17  self.istarget=1
18  capship_only=1
19  self.utdw= self.adjsys.SignificantUnit()#unit.getSignificant(0,1,capship_only)
20  self.wastingtimestart = VS.GetGameTime()+self.wastingtime
21  self.wastingtime=0
22  if (self.utdw==self.enemy):
23  self.utdw=unit.getSignificant(1,1,capship_only)
24  if (self.utdw==self.enemy):
25  self.utdw=unit.getSignificant(2,1,capship_only)
26  if (self.utdw==self.enemy):
27  self.utdw=unit.getSignificant(3,1,capship_only)
28  pos=self.utdw.Position()
29  if self.dockingdist>0:
30  import Vector
31  diff=Vector.Sub(self.you.Position(),pos)
32  ndiff=Vector.Norm(diff)
33  self.enemy.SetPosition(Vector.Add(Vector.Scale(ndiff,self.dockingdist+self.enemy.rSize()+self.utdw.rSize()),pos));

Field Documentation

dockingdist

Definition at line 8 of file bounty_troop.py.

inevitabletime

Definition at line 7 of file bounty_troop.py.

istarget

Definition at line 16 of file bounty_troop.py.

troopdidlaunch

Definition at line 6 of file bounty_troop.py.

trooptime

Definition at line 5 of file bounty_troop.py.

utdw

Definition at line 18 of file bounty_troop.py.

wastingtime

Definition at line 9 of file bounty_troop.py.

wastingtimestart

Definition at line 10 of file bounty_troop.py.


The documentation for this class was generated from the following file: