engine: implement 6 more abilities (Leaf Guard, Liquid Ooze, Unaware, Rock Head, Serene Grace, Sand Force follow-on)#89
Merged
Conversation
added 4 commits
June 24, 2026 22:51
Leaf Guard refuses every major status while the sun is up, via a new state-aware BlocksStatusState guard consulted in inflictStatus. Liquid Ooze turns a drain against its holder into damage on the drainer instead of a heal, gated by a new DrainBackfires flag in the effects drain path.
Unaware blanks the opponent's stat stages in the damage formula: when its holder attacks, the defender's defensive boosts are ignored; when it defends, the attacker's offensive boosts are ignored. Unlike IgnoreDefensive (which only clamps positive defensive stages), Unaware zeros stages in both directions, via a new IgnoresOpponentStages flag read in offensiveDefensiveStats.
Rock Head cancels the holder's own move recoil (narrower than Magic Guard's blanket indirect-damage immunity), via a BlocksRecoil flag checked in the recoil branch. Serene Grace doubles the holder's secondary-effect chances on damaging moves (clamped at 100%), via a SecondaryChanceMult read in the secondary-roll loop.
Re-align struct fields and registry entries after the batch 4-6 additions; no behavior change. Fixes the Format CI step.
c9fe67a to
db80a6e
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.
Follows #88. Continues the ability backlog with Tier A entries that reuse or minimally extend existing hooks, bringing coverage to 68/107. Each batch is one commit.
Batches
BlocksStatusStateguard ininflictStatus;DrainBackfiresflag in the drain pathIgnoresOpponentStagesflag zeros the foe's stages inoffensiveDefensiveStats(both attacking and defending)BlocksRecoilflag in the recoil branch;SecondaryChanceMult(×2, clamped 100%) in the secondary-roll loopTests
Each ability has behavioral coverage in
abilities_test.go(Leaf Guard sun gating, Liquid Ooze drain backfire, Unaware both directions, Rock Head recoil negation, Serene Grace multiplier + clamp). Full engine suite green.Scope
All changes confined to
abilities.go,effects.go,damage.go, andabilities_test.go.