From 29ed3780dad53f48aef1e18e4b1e727971cdf759 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 20 Oct 2026 16:01:28 +0100 Subject: [PATCH] Wolves and boars slow farming instead of cutting its yield Co-Authored-By: Claude Opus 5.5 --- game.py | 8 ++++---- tests/test_game.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/game.py b/game.py index 5e7202b..fae30c5 100644 --- a/game.py +++ b/game.py @@ -2845,8 +2845,8 @@ PROBLEMS = { "collapse": {"name": "Mine collapse", "icon": "⛰️", "need": {"plank": 30}, "block": {"mining": "Mine collapsed"}, "allow": ["mine_stone"], "text": "No ore until it's shored up with planks."}, - "wolves": {"name": "Wolves at the farms", "icon": "🐺", "yield": {"farming": 0.5}, "work": 10, "action": "clear_wolves", - "text": "Farming yield halved until fighters drive them off."}, + "wolves": {"name": "Wolves at the farms", "icon": "🐺", "speed": {"farming": 2.0}, "work": 10, "action": "clear_wolves", + "text": "Farming twice as slow until fighters drive them off."}, "bear": {"name": "Bear in the woods", "icon": "🐻", "speed": {"woodcutting": 1.5}, "work": 8, "action": "drive_bear", "text": "Woodcutting much slower until hunters drive it off."}, "goblins": {"name": "Goblin thieves", "icon": "👺", "steal": 0.01, "work": 10, "action": "catch_goblins", @@ -2856,8 +2856,8 @@ PROBLEMS = { "text": "No stone until builders clear it."}, "flood": {"name": "Flooded fishing grounds", "icon": "🌊", "speed": {"fishing": 1.5}, "need": {"plank": 20}, "lasts": 36, "text": "Fishing slow for 36h, or until dammed with planks."}, - "boars": {"name": "Boars trampling the crops", "icon": "🐗", "yield": {"farming": 0.6}, "work": 10, "action": "cull_boars", - "text": "Farming yield down until hunters cull them."}, + "boars": {"name": "Boars trampling the crops", "icon": "🐗", "speed": {"farming": 1.5}, "work": 10, "action": "cull_boars", + "text": "Farming slower until hunters cull them."}, "rats": {"name": "Rats in the granary", "icon": "🐀", "steal_food": 0.03, "work": 12, "action": "catch_rats", "text": "Eat city food hourly until hunters catch them."}, } diff --git a/tests/test_game.py b/tests/test_game.py index f3565f1..ded1f30 100644 --- a/tests/test_game.py +++ b/tests/test_game.py @@ -1100,10 +1100,10 @@ class HappeningsTest(unittest.TestCase): self.assertNotIn("logs", self.city["stockpile"]) self.assertTrue(self.city["cold"]) - def test_wolves_halve_farming_until_fighters_clear_them(self): + def test_wolves_slow_farming_until_fighters_clear_them(self): game._minor_threat(self.world, T0, self.rng, "wolves") p = self.world["players"]["ann"] - self.assertEqual(game.skill_mods(self.world, game.ACTION_BY_ID["farm_wheat"])["yield"], 0.5) + self.assertEqual(game.skill_mods(self.world, game.ACTION_BY_ID["farm_wheat"])["speed"], 2.0) p["xp"]["combat"] = game.XP_TABLE[30] p["hp"] = game.max_hp(p) self.assertIsNone(game.start_action(self.world, p, "clear_wolves", T0))