diff --git a/game/game.py b/game/game.py index 1aeb21b0..49b36dbb 100644 --- a/game/game.py +++ b/game/game.py @@ -29,11 +29,11 @@ COMMISION_AMOUNTS_FACTORS = { } -ENEMY_INTERCEPT_PROBABILITY_BASE = 8 -ENEMY_INTERCEPT_GLOBAL_PROBABILITY_BASE = 5 +ENEMY_INTERCEPT_PROBABILITY_BASE = 5 ENEMY_CAPTURE_PROBABILITY_BASE = 4 -ENEMY_GROUNDINTERCEPT_PROBABILITY_BASE = 8 -ENEMY_NAVALINTERCEPT_PROBABILITY_BASE = 8 +ENEMY_GROUNDINTERCEPT_PROBABILITY_BASE = 5 +ENEMY_NAVALINTERCEPT_PROBABILITY_BASE = 5 +ENEMY_INTERCEPT_GLOBAL_PROBABILITY_BASE = 5 PLAYER_INTERCEPT_PROBABILITY_BASE = 35 PLAYER_GROUNDINTERCEPT_PROBABILITY_BASE = 35 @@ -95,6 +95,9 @@ class Game: if from_cp.base.total_units(CAP) == 0: continue + if enemy_interception: + break + if self._roll(ENEMY_INTERCEPT_PROBABILITY_BASE, from_cp.base.strength): self.events.append(InterceptEvent(attacker_name=self.enemy, defender_name=self.player, @@ -252,7 +255,7 @@ class Game: self.events = [] # type: typing.List[Event] self._fill_cap_events() - #self._generate_enemy_caps(ignored_cps=ignored_cps) + self._generate_enemy_caps(ignored_cps=ignored_cps) self._generate_interceptions() self._generate_globalinterceptions() self._generate_groundinterceptions() diff --git a/theater/base.py b/theater/base.py index fb85442d..d7543290 100644 --- a/theater/base.py +++ b/theater/base.py @@ -142,6 +142,8 @@ class Base: self.strength += amount if self.strength > 1: self.strength = 1 + elif self.strength < 0: + self.strength = 0.001 def scramble_count(self) -> int: count = int(self.total_planes * PLANES_SCRAMBLE_FACTOR * self.strength)