Sickness: city eats twice as much; plainer wording
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
20887418f1
commit
f60be605cf
2 changed files with 5 additions and 5 deletions
8
game.py
8
game.py
|
|
@ -2747,10 +2747,10 @@ def _hardship(world: dict, now: float, rng: random.Random, kind: str | None = No
|
||||||
granary, shed, well = (building_level(world, k) for k in ("granary", "lumber_shed", "well"))
|
granary, shed, well = (building_level(world, k) for k in ("granary", "lumber_shed", "well"))
|
||||||
if kind == "sickness":
|
if kind == "sickness":
|
||||||
hours = 72 * (1 - 0.2 * building_level(world, "temple"))
|
hours = 72 * (1 - 0.2 * building_level(world, "temple"))
|
||||||
_add_effect(world, now, hours, kind="sickness", name="Sickness", icon="🤒", food=1.5,
|
_add_effect(world, now, hours, kind="sickness", name="Sickness", icon="🤒", food=2.0,
|
||||||
text="City eats 50% more")
|
text="City eats twice as much food")
|
||||||
_record(world, now, "hardship", kind, "🤒", "Sickness is spreading through the city",
|
_record(world, now, "hardship", kind, "🤒", "Sickness is spreading through the city",
|
||||||
[f"For about {round(hours)} hours the townsfolk eat half again as much.",
|
[f"For about {round(hours)} hours the townsfolk eat twice as much food.",
|
||||||
"A bigger temple shortens it."])
|
"A bigger temple shortens it."])
|
||||||
elif kind == "locusts":
|
elif kind == "locusts":
|
||||||
share = 0.4 * (1 - 0.25 * granary)
|
share = 0.4 * (1 - 0.25 * granary)
|
||||||
|
|
@ -2798,7 +2798,7 @@ def _hardship(world: dict, now: float, rng: random.Random, kind: str | None = No
|
||||||
text="Burns stockpile logs hourly")
|
text="Burns stockpile logs hourly")
|
||||||
_record(world, now, "hardship", kind, "🥶", "A harsh cold snap has set in",
|
_record(world, now, "hardship", kind, "🥶", "A harsh cold snap has set in",
|
||||||
["For two days the city burns logs from the stockpile to keep warm.",
|
["For two days the city burns logs from the stockpile to keep warm.",
|
||||||
"Without firewood, the cold makes everyone eat half again as much."])
|
"Without firewood, the cold makes everyone eat 50% more food."])
|
||||||
else:
|
else:
|
||||||
_add_effect(world, now, 24, kind="drought", name="Drought", icon="🏜️", speed={"farming": 1.3, "fishing": 1.2},
|
_add_effect(world, now, 24, kind="drought", name="Drought", icon="🏜️", speed={"farming": 1.3, "fishing": 1.2},
|
||||||
text="Farming 30% and fishing 20% slower")
|
text="Farming 30% and fishing 20% slower")
|
||||||
|
|
|
||||||
|
|
@ -1065,7 +1065,7 @@ class HappeningsTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_sickness_makes_the_city_eat_more(self):
|
def test_sickness_makes_the_city_eat_more(self):
|
||||||
game._hardship(self.world, T0, self.rng, "sickness")
|
game._hardship(self.world, T0, self.rng, "sickness")
|
||||||
self.assertAlmostEqual(game.city_rate(self.world, "food"), 1.5)
|
self.assertAlmostEqual(game.city_rate(self.world, "food"), 2.0)
|
||||||
self.assertEqual(self.world["events"][-1]["report"]["icon"], "🤒")
|
self.assertEqual(self.world["events"][-1]["report"]["icon"], "🤒")
|
||||||
|
|
||||||
def test_locusts_and_rot_take_from_stores_and_buildings_protect(self):
|
def test_locusts_and_rot_take_from_stores_and_buildings_protect(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue