-
Notifications
You must be signed in to change notification settings - Fork 102
Description
poketcg/src/engine/duel/ai/hand_pokemon.asm
Line 246 in d5f3b33
| ; if defending Pokémon can KO evolution, lower AI score |
In the code block below the referenced comment, the AI calls CheckIfDefendingPokemonCanKnockOut and lowers the score to play the evolution card if this function sets carry - i.e., if the Defending Pokémon can score a Knock Out. However, the comment says "can KO evolution", and this is partially wrong because, while the play area card is temporarily swapped with the evolution for evaluation of attacks, the duel variable for HP is not swapped. Thus, CheckIfDefendingPokemonCanKnockOut checks a KO against the pre-evolution HP, while using the evolution card data for the rest of the damage calculation (Weakness, Resistance, Powers).
So, the intent of this block was good (do not waste an evolution card if it is going to be knocked out), but the implementation seems to be flawed. The AI will lower evolution score if the Basic Pokémon is at risk of being knocked out, even though the evolution might survive it (larger HP pool).