Skip to content

Implement Field Blower trainer card functionality#243

Merged
bcollazo merged 1 commit intomainfrom
claude/implement-field-blower-vlYaL
Apr 28, 2026
Merged

Implement Field Blower trainer card functionality#243
bcollazo merged 1 commit intomainfrom
claude/implement-field-blower-vlYaL

Conversation

@bcollazo
Copy link
Copy Markdown
Owner

Summary

This PR adds support for the Field Blower trainer card, which allows a player to discard either a tool attached to any Pokémon (from either player) or the active stadium card.

Key Changes

  • New action types: Added DiscardToolFromPokemon and DiscardActiveStadium to SimpleAction enum to represent Field Blower's effects
  • Move generation: Implemented can_play_field_blower() to validate that Field Blower can only be played when there's at least one Pokémon with an attached tool or an active stadium in play
  • Effect implementation: Added field_blower_effect() to generate choice actions for the player, offering to discard each available tool and/or the stadium
  • Action application: Implemented handlers in apply_deterministic_action() to execute the discard operations on the game state
  • AI support: Added weight assignments for the new actions in the weighted random player
  • Comprehensive tests: Added two test cases covering:
    • Discarding an opponent's tool from their Pokémon
    • Discarding the active stadium card

Implementation Details

  • Field Blower generates a list of all possible discard targets (tools on any in-play Pokémon from both players, plus the active stadium if present)
  • The player must choose exactly one target to discard
  • Tools are discarded to the tool owner's discard pile; stadiums are discarded to the playing player's discard pile
  • The card properly validates playability before allowing it to be played

https://claude.ai/code/session_016QzTeF1hhQtayCcUXoKT4s

Adds move generation and effect logic for Field Blower, which lets the
active player choose to discard a Pokémon Tool from any Pokémon in play
(either player's) or discard the active Stadium. Introduces two new
SimpleAction variants — DiscardToolFromPokemon and DiscardActiveStadium —
to represent the two available choices and handles them as deterministic
actions in the engine.

https://claude.ai/code/session_016QzTeF1hhQtayCcUXoKT4s
@bcollazo bcollazo merged commit 5d958ab into main Apr 28, 2026
2 checks passed
@bcollazo bcollazo deleted the claude/implement-field-blower-vlYaL branch April 28, 2026 10:06
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