Kingdom: two-town fixes, patch notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
01df1924c0
commit
2b04db3b31
3 changed files with 39 additions and 3 deletions
|
|
@ -3826,6 +3826,30 @@ class KingdomTest(unittest.TestCase):
|
|||
self.assertEqual(self.a["banks"][game.HOME_CITY]["stone"], 40)
|
||||
self.assertNotIn("stone", self.a["bank"])
|
||||
|
||||
def test_a_town_needs_a_real_name(self):
|
||||
self.assertIn("name", game.propose_charter(self.world, self.a, "!!!!", "coast", T0))
|
||||
|
||||
def test_a_report_from_before_you_arrived_stays_shut(self):
|
||||
new = self.found()
|
||||
new["events"].append({"id": 50, "kind": "raid", "status": "done", "resolved": T0 + 10, "report": {"title": "Victory"}})
|
||||
self.a["at"] = new.here
|
||||
self.a["arrived"] = T0 + 20
|
||||
self.assertIsNone(game.unseen_threat(new, self.a))
|
||||
self.a["arrived"] = T0 + 5
|
||||
self.assertIsNotNone(game.unseen_threat(new, self.a))
|
||||
|
||||
def test_fires_list_only_who_is_here(self):
|
||||
new = self.found()
|
||||
tend = next(a for a in game.ACTIONS if a.get("tend"))
|
||||
self.a["action"] = {"id": tend["id"], "start": T0}
|
||||
self.assertTrue(game.fires_view(self.world, T0)[tend["tend"]]["users"])
|
||||
self.assertFalse(game.fires_view(new, T0)[tend["tend"]]["users"])
|
||||
|
||||
def test_the_log_says_which_town(self):
|
||||
new = self.found()
|
||||
game.log(new, T0, "raid", "Trouble")
|
||||
self.assertIn("Saltmere", self.world["ledger"][-1]["text"])
|
||||
|
||||
def test_old_saves_gain_towns(self):
|
||||
doc = json.loads(json.dumps(self.world.doc))
|
||||
doc["version"] = 39
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue