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

Public Member Functions

def __init__
 
def launch_new_wave
 
def Execute
 
def initbriefing
 
def loopbriefing
 
def endbriefing
 

Data Fields

 lasttime
 
 waittime
 

Detailed Description

Definition at line 9 of file total_war.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 10 of file total_war.py.

10 
11  def __init__(self):
12  print "init1INITNITNITNTINTINTINTINTITNINTINTINTINTINT\nININTINTINTITNITNITNTINTINTINTINTITNITNITNITNITNITNITNITNITNIT"
13  VS.SetDifficulty(.9)
14  Director.Mission.__init__(self)
15  self.lasttime=-1000
self.waittime=10.0

Member Function Documentation

def endbriefing (   self)

Definition at line 47 of file total_war.py.

47 
48  def endbriefing(self):
49  print "ending briefing"
def Execute (   self)

Definition at line 31 of file total_war.py.

References faceoff.lasttime, total_war.lasttime, total_war.launch_new_wave(), faceoff.launch_new_wave(), vsrandom.randrange(), faceoff.waittime, and total_war.waittime.

31 
32  def Execute (self):
33  un=VS.getUnit(0);
34  i=0
35  while (un):
36  i+=1
37  un= VS.getUnit(i)
38  time = VS.GetGameTime()
39  if (time-self.lasttime>self.waittime):
40  self.launch_new_wave()
41  self.waittime=vsrandom.randrange(4.0,6.0)
self.lasttime=time
def initbriefing (   self)

Definition at line 42 of file total_war.py.

42 
43  def initbriefing(self):
print "ending briefing"
def launch_new_wave (   self)

Definition at line 16 of file total_war.py.

References faction_ships.get_enemy_of(), faction_ships.getRandomCapitol(), faction_ships.getRandomFighter(), vsrandom.randrange(), and locale.str().

16 
17  def launch_new_wave(self):
18  side = vsrandom.randrange(0,2)
19  faction="confed"
20  ai = vsrandom.randrange(0,8)
21  if (0 and ai==0):
22  ai = "printhello.py"
23  else:
24  ai = "default"
25  if (side==0):
26  faction=faction_ships.get_enemy_of("confed")
27  else:
28  faction="merchant"
29  launched = launch.launch_wave_around_unit ("Shadow",faction,faction_ships.getRandomFighter(faction),ai,vsrandom.randrange(1,5),100.0,2000.0,VS.getPlayer(),'')
30  if (vsrandom.randrange(0,10)==0 or faction=="luddites"):
launch.launch_wave_around_unit ("ShadowCap"+str(vsrandom.randrange(0,10)),faction,faction_ships.getRandomCapitol(faction),ai,1,2000.0,4000.0,VS.getPlayer(),'')
def loopbriefing (   self)

Definition at line 44 of file total_war.py.

44 
45  def loopbriefing(self):
46  print "loop briefing"
Briefing.terminate();

Field Documentation

lasttime

Definition at line 14 of file total_war.py.

waittime

Definition at line 15 of file total_war.py.


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