Helpless sides do not run: morale needs someone awake, flight needs legs - #38
Merged
Conversation
A monster group put entirely to sleep raised the half-incapacitated morale trigger, failed the check, and sprinted off the field unconscious — exiting past 120 feet as "routed", its treasure escaping with it (found in osr-web play: five slept kobolds opened round 2 with "break and flee"). - Morale is a decision: a group whose members are all incapacitated (asleep, paralysed, petrified) makes no morale check. The triggers are left pending, not consumed, so a member who can act again judges them then. - Fleeing is movement: only members who can move run. A broken side with no one able to move stays where it lies, and a mixed side leaves its helpless behind as a new stay-behind group at the break distance (MonstersLeftBehindEvent, battle.group.left_behind), individual treasure bundles staying with the abandoned while the runners carry off the shared group bundle. - Pursuit needs legs: a party retreat or evasion is no longer chased by a group with no mobile living member — nor by a group itself fleeing or all turned — the flight simply succeeds. Six new tests (TestHelplessSidesDoNotRun) each fail against the unfixed engine, the evade case on hell hounds so the party cannot simply outrun them. Claude-Session: https://claude.ai/code/session_01EbAHoQCazPyXqzfEMR56EZ
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.
The bug
A monster group put entirely to sleep still checked morale: the asleep members raised the
half_incapacitatedtrigger (correct — the fallen count), nobody asked whether anyone was awake to make the check, and the flee branch then moved the whole group at full rate. Five slept kobolds opened the next round with "break and flee", ran off the field unconscious, and were classifiedrouted— escaping with their carried treasure instead of lying at the party's mercy.The fix
_group_morale).MonstersLeftBehindEvent(battle.group.left_behind), individual treasure bundles staying with the abandoned while the runners carry off the shared group bundle (_leave_helpless_behind). Dead members stay with the runners' group record: outcome classification and loot drops key off thedeadcondition before any group flag._check_ends) or evasion (_handle_evadepursuers) is no longer chased by a group with no mobile living member — nor by a group itself fleeing or all shaken — the flight simply succeeds, ending the encounterevaded.The new event is registered in the discriminated union, the message catalog, and the round-trip samples, all pinned by the existing exhaustiveness tests.
Verification
TestHelplessSidesDoNotRun): no check and no movement for an all-asleep group, the pending trigger judged once someone wakes, the mid-rout split, a fully slept fleeing group stopping where it is, retreat without pursuit, and evasion succeeding outright — the last on hell hounds so the party cannot simply outrun them. Each fails against the unfixed engine.https://claude.ai/code/session_01EbAHoQCazPyXqzfEMR56EZ