Package horizons :: Package ai :: Package aiplayer :: Package combat :: Module combatmanager :: Class PirateCombatManager
[hide private]
[frames] | no frames]

Class PirateCombatManager

source code

CombatManager --+
                |
               PirateCombatManager

Pirate player requires slightly different handling of combat, thus it gets his own CombatManager. Pirate player is able to use standard BehaviorComponents in it's BehaviorManager.

Instance Methods [hide private]
 
__init__(self, owner) source code
 
handle_mission_combat(self, mission)
Routine for handling combat in mission that requests for it.
source code
 
handle_uncertain_combat(self, mission)
Handles fleets that may way to be in combat.
source code
 
handle_casual_combat(self)
Combat with idle ships (not assigned to a mission)
source code
    Inherited from CombatManager
 
_add_fake_tile(self, x, y, layer, renderer, color)
Adds a fake tile to the position.
source code
 
_add_tile(self, tile, renderer, color) source code
 
_clear_fake_tiles(self) source code
 
_highlight_circle(self, position, radius, color) source code
 
_highlight_points(self, points, color) source code
 
_init_fake_tile(self)
Sets the _fake_tile_obj class variable with a ready to use fife object.
source code
 
_load(self, db, owner) source code
 
add_new_unit(self, ship, state=None) source code
 
display(self)
Display combat ranges.
source code
 
get_ship_state(self, ship) source code
 
lookout(self)
Basically do 3 things: 1.
source code
 
remove_unit(self, ship) source code
 
save(self, db) source code
 
set_ship_state(self, ship, state) source code
 
tick(self) source code
Class Methods [hide private]
    Inherited from CombatManager
 
close_range(cls, ship)
Range used when wanting to get close to ships.
source code
 
fallback_range(cls, ship)
Range used when wanting to get away from ships.
source code
 
load(cls, db, owner) source code
Class Variables [hide private]
  log = logging.getLogger("ai.aiplayer.piratecombatmanager")
  shipStates = Enum.get_extended(CombatManager.shipStates, 'chas...
    Inherited from CombatManager
  combat_range = 18
Method Details [hide private]

__init__(self, owner)
(Constructor)

source code 
Overrides: CombatManager.__init__

handle_mission_combat(self, mission)

source code 

Routine for handling combat in mission that requests for it.

Overrides: CombatManager.handle_mission_combat

handle_uncertain_combat(self, mission)

source code 

Handles fleets that may way to be in combat.

Overrides: CombatManager.handle_uncertain_combat

handle_casual_combat(self)

source code 

Combat with idle ships (not assigned to a mission)

Overrides: CombatManager.handle_casual_combat

Class Variable Details [hide private]

shipStates

Value:
Enum.get_extended(CombatManager.shipStates, 'chasing_ship', 'going_hom\
e')