Prompt file imported from bcollazo/deckgym-core (
.github/prompts/attack.prompt.md). Copyright stays with the author.
-
Decide what attack you want to implement. You can use:
cargo run --bin card_statusto see what cards are missing attacks.
-
Get the details of all the cards that have the attack you want to implement by using the following script:
cargo run --bin search "Venusaur" --attack "Giant Bloom" -
Copy the ids of cards to implement (including full art versions) in the above JSON.
-
In
attack_ids.rsadd the attack to theAttackIdenum and theATTACK_ID_MAPmap (with the correct index).- Only implement attacks with effects.
- Keep the file ordered by set and number.
-
Review similar attacks in
apply_attack_action.rsto ensure consistency in implementation. -
Implement the attack logic in
forecast_effect_attackinapply_attack_action.rs.- Keep the code as a one-liner in the match statement, and implement the logic using a helper function.
-
Make sure to run
cargo clippy --fix --allow-dirty -- -D warningsandcargo fmtto format the code.