Added Psychic Frog AI logic for blocking and attacking#9978
Added Psychic Frog AI logic for blocking and attacking#9978NathanRoy1 wants to merge 1 commit intoCard-Forge:masterfrom
Conversation
| SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 1 | ||
| A:AB$ PutCounter | Cost$ Discard<1/Card> | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on CARDNAME. | ||
| A:AB$ Pump | Cost$ ExileFromGrave<3/Card> | Defined$ Self | KW$ Flying | SpellDescription$ CARDNAME gains flying until end of turn. | ||
| A:AB$ PutCounter | Cost$ Discard<1/Card> | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ PsychicFrog | SpellDescription$ Put a +1/+1 counter on CARDNAME. |
There was a problem hiding this comment.
hi, thanks for contributing
imo these abilities aren't really unusual enough to warrant their own logic:
- technically Pump/PutCounter should both already have some logic for combat tricks that could be improved (so more cards can benefit)
- so it's probably more about when paying those cost parts is worth it, for that check
ComputerUtil.getCardPreferencefor more flexible approach
There was a problem hiding this comment.
If I understand correctly, it’s not that you think the logic isn’t worth implementing. Rather, you’d prefer to integrate this behavior directly into PumpAi and PutCounterAi so that a larger range of cards can benefit from the improved logic.
Given that, what would you prefer for this PR? Should it be closed for now or would you like this implementation to remain as a temporary solution until the more generalized logic is added?
There was a problem hiding this comment.
Well if you want to rework it feel free to just add further commits
But if you'd rather start fresh later closing might be better
There was a problem hiding this comment.
I should be able to rework it in a short delay so I'll leave it open for now
Implements SpecialCardAi.PsychicFrog to handle both activated abilities of Psychic Frog.
Ability 1 — Discard a card: put a +1/+1 counter on Psychic Frog
Activates during combat when the Frog is blocking and the counter would prevent it from dying or allow it to kill an attacker it otherwise couldn't
Activates proactively at end of turn when 2+ safe discard candidates are available, or when hand size exceeds the maximum hand size limit
Ability 2 — Exile three cards from graveyard: Psychic Frog gains flying until end of turn
Activates on opponent's turn to intercept unblocked flyers, preferring blocks where the Frog survives and kills the attacker
Will use any graveyard cards if life is in danger
Activates on the AI's turn to attack unblocked when the opponent has no flying/reach blockers, with a higher priority score when the attack is lethal