Repository navigation
Let a member avert their eyes or fight by a mirror against a gaze - #196
Merged
Merged
Conversation
Add BattleDeclaration.gaze_defense, a per-round stance of avert_eyes or mirror that goes with any action. The field is a stub with no behavior. The docstrings, the adaptations register, and the spec line on mirrors describe the contract from the basilisk and medusa entries: averting spares the gaze at -4 to every attack roll and +2 to a gazer's attacks on the averter, a carried mirror spares it at -1, and a basilisk that surprises the party gazes at every member in its free round. tests/test_avert_eyes.py holds the acceptance tests, marked xfail(reason="chunk: avert-eyes", strict=True), and unmarked guards. The phase 5 milestone golden is regenerated with tests/generate_phase5_goldens.py. Its command log now serializes the new field as "gaze_defense": null on each logged declaration. No event, draw, or other value in it changed. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
A BattleDeclaration's gaze_defense now takes effect. With avert_eyes, the session gives the member the averted_eyes condition from the moment the round is accepted until it ends, so resolve_gaze passes them by, and every attack roll they make that round takes -4. A monster whose averting_eyes ability isn't manual, the basilisk or the medusa, gains +2 on its attacks against a member with the condition. With mirror, the member is left out of the front rank the gaze reaches, and every attack roll they make that round takes -1. A member who carries no mirror is refused with the new code battle.declaration.no_mirror. Neither stance draws or emits an event. In the monsters' free round after they surprise the party, a monster whose surprise ability has meets_gaze, the basilisk, gazes once at every living member at any distance, in place of the front-rank gaze. The compiler pins the basilisk's surprise ability and both monsters' averting_eyes abilities as not manual, and the regenerated monsters.json carries that. The mirrors abilities stay manual, because a gazer that sees its own reflection is left to the referee. No golden file changed. 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.
A basilisk's or medusa's gaze petrified every member in melee each round, and no command let a member defend. #180 added the gazes and noted the gap. This adds the SRD's two defenses and the basilisk's surprise gaze.
What changed
BattleDeclarationhas a new field,gaze_defense, set to"avert_eyes"or"mirror"with any action. It lasts the round, whichever side acts first.mirror, or the round is refused withbattle.declaration.no_mirror.surpriseability and both gazers'averting_eyesabilities are no longermanual. A gazer seeing its reflection in a mirror is still left to the referee, and the register says so.What to check
tests/goldens/phase5_milestone.jsonchanges only by"gaze_defense": nullon each logged declaration. No outcome changed.docs/spec.mdchanges, because it said mirror counterplay stays manual.https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD