Repository navigation
End the game when the whole party is turned to stone - #200
Merged
Merged
Conversation
A basilisk that surprises the party can turn every member to stone, and the session then stayed in the encounter with nobody able to act. The wipe check ran only after a death and asked only whether a member lived. These are the contract stubs and acceptance tests for the petrified-party chunk. A member stands while they are neither dead nor petrified. When a command's events kill or petrify a member and nobody is left standing, the session ends in game_over as a death wipe does, with battle.ended.defeat first in a battle. Party.living_members() keeps its meaning, and the check stays tied to the event, so a stone party placed in town stays there and stone to flesh from a magic-user who joins with AddMember brings a statue back. The acceptance tests in tests/test_petrified_party.py are marked xfail for the chunk. The tests that pass today are unmarked guards for a party with a member still standing. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
A party turned wholly to stone has fallen. A member stands while they are neither dead nor petrified, which the new private helper _anyone_standing in party.py tests. Party.living_members() keeps its meaning, so a statue still holds its rank. The session runs its wipe check when a command's events kill a member or give one the petrified condition, and the check ends the session when nobody stands. A battle's defeat check uses the same test, so battle.ended.defeat comes just before the ending. When a basilisk's surprise gaze leaves nobody standing as an encounter opens, no round runs against the statues. An attacking stance still opens its battle, because test_avert_eyes.py requires battle.started there, but the battle ends in defeat as it opens, before the monsters' free round. Any other stance stops at the stance. No golden file changes. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
mmacy
force-pushed
the
chunk/petrified-party
branch
from
October 31, 2026 00:10
e2e26eb to
c03624d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A basilisk's surprise gaze can turn the whole party to stone. Before, the session then stayed in the encounter, or in a battle against statues, with nobody able to act, because game over came only from a death. Following the owner's decision, a party turned wholly to stone now ends the game.
What changed
game_overwith the usualGameOverEvent. In a battle,battle.ended.defeatcomes just before it.attacksstance, the battle opens and ends in defeat before any round, because an existing test needs that battle to start.Party.living_members()is unchanged. A statue still counts, keeps its rank, and can still be attacked when only statues are in reach.PlacePartydoesn't end the game again. The way back is a magic-user who joins withAddMemberand casts stone to flesh. A test covers it.What to check
https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD