Repository navigation
Make the cobra's spit blind, turn ghouls from the paralysed, pass over statues, and gaze on a basilisk's surprise - #199
Merged
Merged
Conversation
Four playtest findings, each pinned by docstrings, the adaptations register, and tests/test_monster_tactics.py. The tests are marked xfail(reason="chunk: monster-tactics", strict=True), and the ones that pass today are unmarked guards. No behavior changes in this commit. - A spitting cobra's spit hit makes the target save versus death, the category for poison, or be blinded for good. The cobra's ability takes the effect's tag, blindness, and isn't manual. - A monster whose paralysis ability has the param attacks_others, the ghoul and the thoul, passes over a member it has paralysed while another target is in reach. - No monster picks a member turned to stone while another target is in reach. A paralysed member comes before a statue. When every member in reach is stone, the monster attacks a statue, as before. - Every member of a party a basilisk surprises meets its gaze once as the encounter opens, whatever the stance, and a later battle doesn't repeat it. The guard test_the_cobras_spit_applies_no_save_in_battle is removed from tests/test_attack_routines.py, because the spit now blinds. APPLIED_KINDS in tests/test_monster_attack_effects.py counts blindness. No golden file changes. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
…atues, and gaze on surprise Four playtest findings, made to pass tests/test_monster_tactics.py. - The spitting cobra's spit ability compiles under the tag blindness and isn't manual. Battle applies a blindness hit effect: the target saves versus death, the category for poison, or gains a permanent, undispellable blind condition. A second blinding attaches nothing. - The ghoul's and the thoul's paralysis abilities carry attacks_others. ScriptedPolicy narrows its reachable targets before the draw: it drops statues while anyone else is in reach, and a monster with attacks_others also drops paralysed members while someone neither paralysed nor stone is in reach. An all-stone front rank comes back whole. A list with no paralysed or petrified member is unchanged, so the monster-action draw is the same as before. - start_encounter runs the basilisk's surprise gaze on every living member as the encounter opens, whenever the party is surprised. The monsters' free round skips the gaze of such a gazer when the encounter's party_surprised is set, so no member meets it twice. The existing party_surprised field is the record, so no serialized model changes. Data regenerated with python -m tools.srd_compile. No golden file changed. CHANGELOG adds a Fixed bullet for the cobra, the ghouls, and the statues, rewrites the unreleased surprise-gaze bullet to describe the final behaviour, and extends the 2.0.1 replay list. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
NpcPartyPolicy melees "the same as a monster", so an NPC adventurer shouldn't pick a member turned to stone while another target is in reach. One acceptance test pins that, marked xfail(reason="chunk: monster-tactics", strict=True). Two guards pin that a front rank of statues is still attacked with the same draw as before, and that an NPC with no statue in reach draws as before, with a paralysed member still a candidate. The ghoul's rule about paralysed members belongs to the ghoul's and the thoul's abilities, so it doesn't apply to NPCs. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
NpcPartyPolicy's melee target choice now goes through the statue half of the monster rule: it leaves out members turned to stone while a target that isn't stone is in reach, and keeps the whole list when every target is stone. A list with no statue is unchanged, so the monster-action draw is the same as before. The ghoul's and the thoul's rule about paralysed members stays with ScriptedPolicy, because it belongs to their abilities. _preferred_targets now builds on the shared _passing_over_statues. The NpcPartyPolicy docstring says how an NPC picks its melee target instead of "the same as a monster". The adaptations register and the statue changelog bullet and replay item name the NPC case. No golden file changed. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
…gaze Someone who can't see can't meet a gaze. Three acceptance tests, marked xfail(reason="chunk: monster-tactics", strict=True), pin that a blind front-rank member is spared the basilisk's and the medusa's gaze in a battle round, and that a blind member is spared the surprise gaze when the encounter opens. Each asserts the blindness as a precondition. A guard pins that a basilisk spawned into an encounter already open doesn't gaze at a party that was surprised when the encounter opened, because the basilisk surprised no one. It holds today. The adaptations register says both. Claude-Session: https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD
Someone who can't see can't meet a gaze. resolve_gaze now skips a creature with the blind condition, as it skips one averting its eyes, so neither the battle round's front-rank gaze nor the basilisk's surprise gaze reaches a blind member. A blind creature rolls no save, so the combat stream draws one fewer for each blind creature a gaze would have reached. Nothing else draws differently. The docstrings of resolve_gaze, Condition.BLIND, the battle module, _resolve_gazes, and _surprise_gazes say so, and so do the gaze changelog bullets. 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.
Fixes from round 3 of playtesting a game built on osrlib.
What changed
blindness, notblinding_spit, and isn'tmanual.attacks_othersparam on theparalysisability, so a monster a game defines can use it too.What to check
test_attack_routines.pypinned the spit doing nothing, so I removed it.https://claude.ai/code/session_01V7ErtnsmhaP7aLwcfmzohD