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

27
game.py
View file

@ -1096,7 +1096,13 @@ def _complete(world: dict, player: dict, action: dict, now: float, rng: random.R
if action.get("special") == "recon":
event = upcoming_raid(world)
if event:
event["recon"] += recon_gain(world, action)
city = world["city"]
gain = recon_gain(world, action)
# An informant's leads double the reconnaissance (and the XP) of whoever follows them up.
boost = min(city.get("recon_boost", 0), gain)
city["recon_boost"] = city.get("recon_boost", 0) - boost
xp *= 1 + boost / gain
event["recon"] += gain + boost
if action.get("special") == "problem" and action["skill"] != "combat":
_work_problem(world, player, action, now)
if action.get("special") == "labour":
@ -1673,7 +1679,7 @@ INTEL_SIZE = [1.0, 1.33, 1.67, 2.0] # small, medium, large, huge
INTEL_OPENS = [None, 24, 8] # game hours before arrival that levels 2 and 3 open, ±25% per threat
SPYMASTER_RECON = 0.25 # more recon per guild level
SPYMASTER_AGENTS = 0.5 # recon per guild level per game hour, with nobody scouting
INFORMANT_RECON = 15
INFORMANT_RECON = 30 # boosted recon per informant: doubled recon and XP for the scout who works it
def recon_gain(world: dict, action: dict) -> float:
@ -2503,9 +2509,13 @@ def favours(world: dict, now: float) -> dict:
"boost": round(city.get("site_boost", 0)),
},
"informant": {
"cost": INFORMANT_FAVOUR,
"cost": round(INFORMANT_FAVOUR * (1 + 0.5 * (raid or {}).get("informants", 0))),
"why": "No news to dig into" if not raid else
"Nothing more to learn" if raid["recon"] >= intel_costs(raid)[-1] else None,
"Nothing more to learn" if raid["recon"] >= intel_costs(raid)[-1] else
"No scout in the guild to follow up the leads"
if not any(p["cls"] == "scout" for p in world["players"].values()) else None,
"recon": INFORMANT_RECON,
"boost": round(city.get("recon_boost", 0)),
},
"militia": {
"cost": RALLY_FAVOUR * (city.get("rallies", 0) + 1),
@ -2534,8 +2544,11 @@ def spend_favour(world: dict, player: dict, kind: str, now: float) -> str | None
log(world, now, "favour", f"{player['name']} hired a master builder for the {name}: "
f"the next {MASTER_BUILDER_LABOUR} labour counts double", player["id"])
elif kind == "informant":
upcoming_raid(world)["recon"] += INFORMANT_RECON
log(world, now, "favour", f"{player['name']} paid an informant for news from the roads", player["id"])
raid = upcoming_raid(world)
raid["informants"] = raid.get("informants", 0) + 1
city["recon_boost"] = city.get("recon_boost", 0) + INFORMANT_RECON
log(world, now, "favour", f"{player['name']} paid an informant: the next {INFORMANT_RECON} "
f"reconnaissance counts double", player["id"])
else:
city["rally"] = city.get("rally", 0) + RALLY_DEFENCE
city["rallies"] = city.get("rallies", 0) + 1
@ -2697,5 +2710,5 @@ def content() -> dict:
"prayers": [{**prayer, "text": describe_prayer(prayer)} for prayer in PRAYERS], "max_prayers": MAX_PRAYERS,
"potion_charges": POTION_CHARGES, "problems": PROBLEMS, "fittings": list(FITTING_BY_ID.values()),
"equip_slots": EQUIP_SLOTS, "eat_below": EAT_BELOW, "class_speed": CLASS_SPEED,
"informant_recon": INFORMANT_RECON, "regen_per_hour": REGEN_PER_HOUR,
"regen_per_hour": REGEN_PER_HOUR,
}