Stop as soon as materials run out
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
16f0384483
commit
8dd33cbb40
2 changed files with 17 additions and 0 deletions
7
game.py
7
game.py
|
|
@ -2040,6 +2040,13 @@ def process_player(world: dict, player: dict, now: float, rng: random.Random | N
|
|||
summary["resumed"] = back
|
||||
else:
|
||||
stop(player)
|
||||
if player["action"] is current and "enemy" not in action and not current.get("plot2"):
|
||||
# Out of materials: stop now, not once the next bar has filled.
|
||||
reason = can_start(world, player, growing(player))
|
||||
if reason:
|
||||
stop(player, reason)
|
||||
summary["stopped"] = reason
|
||||
break
|
||||
if player["action"] and limit < now and current["start"] < now:
|
||||
current["start"] = now
|
||||
return summary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue