Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
bounty_leader.py
Go to the documentation of this file.
1 import bounty
2 import faction_ships
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=[],dockable_unit=False):
5  bounty.bounty.__init__(self,minnumsystemsaway,maxnumsystemsaway,creds,run_away,0,tempfaction,jumps,var_to_set,dynfg,dyntype,displayLocation,greetingText,dockable_unit)
6  self.helpertype=dynhelpertype
7  self.numhelpers=shipdifficulty
8  self.helperfg=dynhelperfg
9  self.upgrades=leader_upgrades
10  def Execute(self):
12  def LaunchedEnemies(self,significant):
13  bounty.bounty.LaunchedEnemies(self,significant)
14  import launch
15  L = launch.Launch()
16  L.fg="Shadow"
17  L.dynfg=self.helperfg
18  L.faction = self.faction
19  if type(self.helpertype)==type(""):
20  L.type = self.helpertype
21  else:
22  L.type = self.helpertype[0]
23  L.faction=self.helpertype[1]
24  if L.type=="":
25  L.type=faction_ships.getRandomFighter(L.faction)
26  L.ai = "default"
27  L.num=self.numhelpers
28  L.minradius=3000.0
29  L.maxradius = 4000.0
30  try:
31  L.minradius*=faction_ships.launch_distance_factor
32  L.maxradius*=faction_ships.launch_distance_factor
33  except:
34  pass
35  if (self.numhelpers):
36  tempship=L.launch(significant)
37  tempship.SetTarget(self.you)
38  for u in self.upgrades:
39  args=(u,0,0,False)
40  if (type(u) is list or type (u) is tuple):
41  if (len(u)>3):
42  args=u
43  elif (len(u)>2):
44  args=(u[0],u[1],u[2],False)
45  elif (len(u)>1):
46  args=(u[0],u[1],0,False)
47  else:
48  args=(u[0],0,0,False)
49  self.enemy.upgrade(str(args[0]),int(args[1]),int(args[2]),1,args[3])