Informants give scouts boosted recon instead of intel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-19 15:14:00 +01:00
parent 27bdb6a154
commit fd66b69401
3 changed files with 40 additions and 16 deletions

View file

@ -573,17 +573,24 @@ class FavourTest(unittest.TestCase):
self.assertEqual(game.favours(world, T0)["builders"]["cost"], 150)
self.assertEqual(city["site_boost"], 50) # unused boost carries over
def test_informant_raises_intel(self):
def test_informant_doubles_a_scouts_recon_for_a_while(self):
world, p = self.world, self.p
self.assertEqual(game.spend_favour(world, p, "informant", T0), "No news to dig into")
world["next_event_at"] = T0
game.tick(world, T0, random.Random(2))
event = game.upcoming_raid(world)
while event["recon"] < game.intel_costs(event)[-1]:
self.assertIsNone(game.spend_favour(world, p, "informant", T0))
self.assertEqual(event["recon"] % game.INFORMANT_RECON, 0)
self.assertEqual(game.spend_favour(world, p, "informant", T0), "No scout in the guild to follow up the leads")
world["players"]["sam"] = scout = game.new_player("sam", "Sam", "scout", T0)
self.assertIsNone(game.spend_favour(world, p, "informant", T0))
self.assertEqual(event["recon"], 0) # leads, not intel
self.assertEqual(game.favours(world, T0)["informant"]["cost"], 375)
game.start_action(world, scout, "recon_roads", T0)
game.process_player(world, scout, T0 + 48 * 10 + 1, random.Random(1)) # ten scouting runs
self.assertEqual(event["recon"], 20)
self.assertEqual(scout["xp"]["reconnaissance"], 240)
self.assertEqual(world["city"]["recon_boost"], 20)
event["recon"] = game.intel_costs(event)[-1]
self.assertEqual(game.spend_favour(world, p, "informant", T0), "Nothing more to learn")
self.assertEqual(game.intel_level(world, event, T0), 1) # the rest waits for the raid to draw near
def test_rallies_cost_more_each_time_and_end_with_the_raid(self):
world, p = self.world, self.p