Wolves and boars slow farming instead of cutting its yield

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-20 16:01:28 +01:00
parent ac73fa996d
commit 29ed3780da
2 changed files with 6 additions and 6 deletions

View file

@ -2845,8 +2845,8 @@ PROBLEMS = {
"collapse": {"name": "Mine collapse", "icon": "⛰️", "need": {"plank": 30}, "collapse": {"name": "Mine collapse", "icon": "⛰️", "need": {"plank": 30},
"block": {"mining": "Mine collapsed"}, "allow": ["mine_stone"], "block": {"mining": "Mine collapsed"}, "allow": ["mine_stone"],
"text": "No ore until it's shored up with planks."}, "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", "wolves": {"name": "Wolves at the farms", "icon": "🐺", "speed": {"farming": 2.0}, "work": 10, "action": "clear_wolves",
"text": "Farming yield halved until fighters drive them off."}, "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", "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."}, "text": "Woodcutting much slower until hunters drive it off."},
"goblins": {"name": "Goblin thieves", "icon": "👺", "steal": 0.01, "work": 10, "action": "catch_goblins", "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."}, "text": "No stone until builders clear it."},
"flood": {"name": "Flooded fishing grounds", "icon": "🌊", "speed": {"fishing": 1.5}, "need": {"plank": 20}, "lasts": 36, "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."}, "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", "boars": {"name": "Boars trampling the crops", "icon": "🐗", "speed": {"farming": 1.5}, "work": 10, "action": "cull_boars",
"text": "Farming yield down until hunters cull them."}, "text": "Farming slower until hunters cull them."},
"rats": {"name": "Rats in the granary", "icon": "🐀", "steal_food": 0.03, "work": 12, "action": "catch_rats", "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."}, "text": "Eat city food hourly until hunters catch them."},
} }

View file

@ -1100,10 +1100,10 @@ class HappeningsTest(unittest.TestCase):
self.assertNotIn("logs", self.city["stockpile"]) self.assertNotIn("logs", self.city["stockpile"])
self.assertTrue(self.city["cold"]) 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") game._minor_threat(self.world, T0, self.rng, "wolves")
p = self.world["players"]["ann"] 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["xp"]["combat"] = game.XP_TABLE[30]
p["hp"] = game.max_hp(p) p["hp"] = game.max_hp(p)
self.assertIsNone(game.start_action(self.world, p, "clear_wolves", T0)) self.assertIsNone(game.start_action(self.world, p, "clear_wolves", T0))