Skip to content

Implement Arena of Antiquity, Fragrant Forest stadiums and Lucky Egg tool#246

Merged
bcollazo merged 2 commits intomainfrom
claude/implement-card-skills-yKr1a
Apr 28, 2026
Merged

Implement Arena of Antiquity, Fragrant Forest stadiums and Lucky Egg tool#246
bcollazo merged 2 commits intomainfrom
claude/implement-card-skills-yKr1a

Conversation

@bcollazo
Copy link
Copy Markdown
Owner

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

  • Arena of Antiquity: Adds +20 damage bonus when Fighting-type Pokémon attack the opponent's Active Pokémon ex. Implemented in stadiums.rs with damage calculation integrated into the core damage modification logic in hooks/core.rs.
  • Fragrant Forest: Allows each player to put a random Basic Grass Pokémon from their deck into their hand once per turn. Implemented with proper action forecasting and probability handling for multiple Basic Grass Pokémon in deck.

Tool Effect

  • Lucky Egg: When a Pokémon with Lucky Egg attached is knocked out by an opponent's active attack, the player draws cards until their hand has 5 cards. Integrated into the knockout handler in hooks/core.rs with proper opponent attack detection.

Implementation Details

  • Stadium effects are registered in is_stadium_effect_implemented() for validation
  • Fragrant Forest uses the existing forecast_use_stadium() mechanism with probability-based outcomes for random selection
  • Lucky Egg leverages the existing on_knockout() hook, requiring the attacking_ref parameter to distinguish opponent attacks from other damage sources
  • All three cards include proper action generation checks to prevent invalid moves (e.g., UseStadium when no Basic Grass Pokémon available)

Testing

  • Added 4 comprehensive tests for Fragrant Forest covering availability, card drawing, and per-turn usage limits
  • Added 3 tests for Arena of Antiquity covering Fighting vs ex bonus, non-ex immunity, and non-Fighting immunity
  • Added 2 tests for Lucky Egg covering KO draw trigger and non-attack damage immunity
  • Updated test module registrations in tests/stadiums.rs and tests/tools.rs

Minor Fixes

  • Removed unnecessary mut qualifiers in several test functions for cleaner code

https://claude.ai/code/session_0166D44Pws5WCDu5xnTDD7h2

claude added 2 commits April 28, 2026 19:18
- 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
@bcollazo bcollazo merged commit 96616c1 into main Apr 28, 2026
2 checks passed
@bcollazo bcollazo deleted the claude/implement-card-skills-yKr1a branch April 28, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants