Repository navigation
Let the front line screen the members behind it - #218
Merged
Merged
Conversation
… what they reach A group's close now moves it toward the nearest living member it can see and stops 5' from that member, so it never walks past a member it can see. An invisible member doesn't stop it, and a statue does. A group already within 5' of a member it can see doesn't move, and the session emits no GroupMovedEvent for a close that moves nothing. The session resolves a monster's melee only on a target in the group's front rank within 5' of it when the action comes up. That replaces the skip for members who fell back alone. A formation retreat keeps the members who stood in a group's reach at acceptance exposed for the whole round, so the existing contract for a formation retreat holds. ScriptedPolicy and NpcPartyPolicy follow a close that brings a member within reach with a melee in the same round, aimed at the front rank the move produces. Their melee pool and the petrifying gaze come from the group's front rank within 5'. NPC shooters, NPC single-target spells, and a single-target breath like the hellhound's pick from the first row toward the group at any distance, as they picked from the first marching rank before. A breath or an NPC area spell covers the ranks toward the group by distance. A party member's area measures a cone's gap from the caster, and its friendly fire catches the group's front rank within 5'. An NPC's missile attack and spell range use the target member's own distance. A routed group leaves the battle once it stands farther than FLEE_EXIT_FEET from every living member, so a move of the party line never pushes it out. The pursuit gap after a formation retreat is taken over standing members. A slow melee attack faces the melee step's reach and rank check again when it resolves at the end of the round. Reach, ranks, and ranges measure the size of a member's distance, so a member a group passed while invisible is within reach at -5'. member_distance_feet and MemberMovedEvent still report the signed value. No golden file changes. A battle in which nobody moves draws as before. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
Monsters can now close and attack in the same round, so seeds that used to give the party a round before the monsters struck now let the monsters kill the member the test relies on. No assertion changed. - test_turning_declared_in_battle_stops_the_turned_from_attacking[13]: seed 13 replaced by 44. The monsters now strike first and kill the cleric before the turning. - test_turning_declared_in_battle_stops_the_turned_from_attacking[20]: seed 20 replaced by 50, for the same reason. PARTIAL_SEEDS is now (4, 10, 11, 12, 44, 50), and every test that uses it still passes. - test_a_fully_turned_group_in_battle_retreats_as_a_whole_as_before: ALL_TURNED_BATTLE_SEED 14 replaced by 6. The skeletons start at 10', win initiative, close, and strike the level-1 cleric before the turning. ALL_TURNED_ENCOUNTER_SEED stays 14, because the encounter path is unaffected. - test_the_shortened_barrow_script: MASTER_SEED 20_260_704_000_001 replaced by 20_260_704_000_002. The goblins surprise the party at 20', close and attack in their free round, kill Brakka, and the party loses. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
…ch its member An area aimed at the party covers its rows by depth, and depth never goes down. The first row's depth is its own distance. Each later row's depth is the larger of the previous depth plus 10' and the row's own distance. The rows are covered in order from the front until the span runs out, so an area never covers a farther row past a nearer one. A closing group always reaches the nearest member it can see, in as many rounds as its rate needs. A group's distance never goes below zero. When the group's stopping point would be behind the party line, the line first moves back by the shortfall, as it does when the party has fallen back: every advance and every group's distance grow by the same amount, with no event. The group then stands on the line. Before this, a group that closed on a member behind the line, while another member it could see stood forward of it, stopped 5' from the line and stayed out of reach for good. Three unmarked regression tests in tests/test_monster_reach.py check both rules with the review's numbers. The chunk's marker moves from the module onto each acceptance class, so the regression tests run unmarked. The acceptance tests keep the same marker. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
The monster-reach acceptance tests pass, so their expected-to-fail markers come off. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
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.
This is the monster-reach chunk of issue #209. Party members now stand at their own distances, and the monsters respect that:
closestops 5' from the nearest member it can see, and never passes a visible member. So the fighters in front screen the archer and the caster behind them. A statue stops a group, and an invisible member doesn't.Review found two defects, now fixed with regression tests. An area could skip a nearer row and cover a farther one. A group could stall short of a member standing behind the party line. Known edges accepted as designed: a fleeing group can run past a member, and a policy's close-then-melee can waste its melee when the session skips it.
The phase 2, 3, and 11 to 15 goldens are unchanged. The phase 4 and 5 goldens and the example crawler wait for the goldens chunk, which updates their drivers and regenerates them.
https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD