Implement Arena of Antiquity, Fragrant Forest stadiums and Lucky Egg tool#246
Merged
Implement Arena of Antiquity, Fragrant Forest stadiums and Lucky Egg tool#246
Conversation
- Lucky Egg (B3 148): Tool that draws cards to 5 when holder is KO'd by opponent's active attack - Arena of Antiquity (B3 154): Stadium giving Fighting-type pokemon +20 damage vs ex pokemon - Fragrant Forest (B3 153): Stadium letting each player fetch a random Basic Grass pokemon from deck once per turn https://claude.ai/code/session_0166D44Pws5WCDu5xnTDD7h2
…ayer Replace manual outcome construction with the existing search helper + map_mutations to prepend the has_used_stadium flag, matching how other search-based cards are implemented. https://claude.ai/code/session_0166D44Pws5WCDu5xnTDD7h2
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.
Summary
This PR adds implementations for three card effects: two stadium cards (Arena of Antiquity and Fragrant Forest) and one tool card (Lucky Egg), along with comprehensive test coverage for each.
Key Changes
Stadium Effects
stadiums.rswith damage calculation integrated into the core damage modification logic inhooks/core.rs.Tool Effect
hooks/core.rswith proper opponent attack detection.Implementation Details
is_stadium_effect_implemented()for validationforecast_use_stadium()mechanism with probability-based outcomes for random selectionon_knockout()hook, requiring theattacking_refparameter to distinguish opponent attacks from other damage sourcesTesting
tests/stadiums.rsandtests/tools.rsMinor Fixes
mutqualifiers in several test functions for cleaner codehttps://claude.ai/code/session_0166D44Pws5WCDu5xnTDD7h2