diff --git a/game.py b/game.py index 1592c5f..c447904 100644 --- a/game.py +++ b/game.py @@ -5231,12 +5231,13 @@ def raid_readiness(world: dict, event: dict) -> list[dict]: def _fire(world: dict, event: dict, now: float, rng: random.Random) -> None: - event["status"] = "done" event["resolved"] = now + # Still upcoming while it resolves: the defence counts the drilling done against it. if event["kind"] == "raid": _resolve_raid(world, event, now, rng) elif event["kind"] == "dragon": _resolve_dragon(world, event, now, rng) + event["status"] = "done" if event["kind"] in THREATS: won = event["report"]["title"].startswith("Victory") for entry in event["report"]["garrison"] if won else []: @@ -6843,6 +6844,9 @@ ORDER_RECIPES, ORDER_RAW = _order_sources() # What changed, shown on the Patch notes page. Newest first; every shipped change adds a # line here (new / balance / fix), and a new release a new entry on top. PATCH_NOTES = [ + {"date": "2026-11-02", "title": "Militia drilling", "notes": [ + ("fix", "Drilling the militia is no longer wiped before a raid is calculated. Last raid losses recalculated."), + ]}, {"date": "2026-10-30", "title": "Armoury", "notes": [ ("new", "Added armoury to raid readiness."), ]}, diff --git a/tests/test_game.py b/tests/test_game.py index d02a455..fc3ca5f 100644 --- a/tests/test_game.py +++ b/tests/test_game.py @@ -1456,6 +1456,7 @@ class FavourTest(unittest.TestCase): self.assertEqual(game.defence(world)["parts"]["drilled"], 20.0) self.assertIsNone(p["action"]) # stops once the militia is fully drilled game.tick(world, raid["fire_at"], random.Random(1)) + self.assertGreaterEqual(raid["report"]["parts"]["drilled"], 20.0) # the drill counts in the fight self.assertEqual(game.defence(world)["parts"]["drilled"], 0) def test_seasoned_fighters_drill_a_little_faster(self):