Beispiel #1
0
    def __init__(self, damage_lookup, damage_type=damage, 
	    resolution_template=None):
	resolution_template = resolution_template or registry.get('resolve-other-weapons', jolly.command.CommandTemplate)
        props = [PropertyDefinition('firing-arc', FiringArc)]
        super(DirectFire, self).__init__('direct-fire', props, exposed_commands=[registry.get('decide-direct-fire', jolly.command.CommandTemplate)])
        self._damage_lookup = damage_lookup
        self._damage_type = damage_type
        self._resolution_template = resolution_template
Beispiel #2
0
 def __init__(self):
     props = [PropertyDefinition('turn-mode', TurnMode),
              PropertyDefinition('acceleration-limit', AccelerationLimit, True),
              PropertyDefinition('turn-mode-counter', int, True, 0),
              PropertyDefinition('sideslip-mode-counter', int, True, 0),
              PropertyDefinition('speed-plot', SpeedPlot, True, make_speed_plot(0)),
              PropertyDefinition('prev-speed-plot', SpeedPlot, False),
              PropertyDefinition('position', Position, True)]
     super(Movement, self).__init__('movement', props, [registry.get('shuttle-determine-initial-speed', jolly.command.CommandTemplate), registry.get('announce-emergency-deceleration', jolly.command.CommandTemplate)])
Beispiel #3
0
"""Shuttle unit prototypes."""
from jolly.system import Prototype, System
from sfb.system.service import Movement
from sfb.movement import turn_mode, AccelerationLimit
from sfb import firing_arc, registry
from sfb.damage import DAC_shuttle

admin_shuttle = Prototype('admin-shuttle',
                              [Movement()],
                              {'turn-mode' : turn_mode.shuttle,
                               'acceleration-limit' : AccelerationLimit(6, 3, 1),
                               'damage-rules' : DAC_shuttle},
                              [System(i+1, registry.get('shuttle-hull')) for i in range(6)] +
                              [System(7, registry.get('shuttle-phaser-3'),
                                      {'firing-arc' : firing_arc.ALL})])