refactor(turns): modify turn settings

* raise air defense limits
* enemy gains more units even if no action is taken on a turn
* player gains money even if no action was taken on a turn
This commit is contained in:
Wrycu 2019-05-30 21:31:50 -07:00
parent 6ec14e744e
commit 26840373ed
No known key found for this signature in database
GPG Key ID: 529627D8CF5537B8

View File

@ -20,7 +20,7 @@ COMMISION_LIMITS_FACTORS = {
PinpointStrike: 10, PinpointStrike: 10,
CAS: 5, CAS: 5,
CAP: 8, CAP: 8,
AirDefence: 1, AirDefence: 8,
} }
COMMISION_AMOUNTS_SCALE = 1.5 COMMISION_AMOUNTS_SCALE = 1.5
@ -28,7 +28,7 @@ COMMISION_AMOUNTS_FACTORS = {
PinpointStrike: 3, PinpointStrike: 3,
CAS: 1, CAS: 1,
CAP: 2, CAP: 2,
AirDefence: 0.3, AirDefence: 0.8,
} }
PLAYER_INTERCEPT_GLOBAL_PROBABILITY_BASE = 30 PLAYER_INTERCEPT_GLOBAL_PROBABILITY_BASE = 30
@ -187,7 +187,7 @@ class Game:
if event_class is BaseAttackEvent: if event_class is BaseAttackEvent:
base_attack_generated_for.add(enemy_cp) base_attack_generated_for.add(enemy_cp)
if enemy_probability == 100 or enemy_probability > 0 and self._roll(enemy_probability, enemy_cp.base.strength): if enemy_probability == 100 or enemy_probability > 0 and self._roll(enemy_probability, enemy_cp.base.strength):
self._generate_enemy_event(event_class, player_cp, enemy_cp) self._generate_enemy_event(event_class, player_cp, enemy_cp)
def commision_unit_types(self, cp: ControlPoint, for_task: Task) -> typing.Collection[UnitType]: def commision_unit_types(self, cp: ControlPoint, for_task: Task) -> typing.Collection[UnitType]:
@ -273,12 +273,11 @@ class Game:
else: else:
event.skip() event.skip()
for cp in self.theater.enemy_points():
self._commision_units(cp)
self._budget_player()
if not no_action: if not no_action:
self._budget_player()
for cp in self.theater.enemy_points():
self._commision_units(cp)
for cp in self.theater.player_points(): for cp in self.theater.player_points():
cp.base.affect_strength(+PLAYER_BASE_STRENGTH_RECOVERY) cp.base.affect_strength(+PLAYER_BASE_STRENGTH_RECOVERY)