Open surtr-games opened 1 day ago
I think maybe you've misunderstood what get_target_type{1,2}
do - it's checking the opponent, not the user, on the basis that (since this is Gen 3 and we don't have a physical/special split) they're likely to use moves of the same persuasion as their STAB types. Theoretically it could make better use of Counter/Mirror Coat (e.g. by "cheating" and looking at what move the player has used) but that's well out of the scope of the BUGFIX macro and more in the realm of "rewrite the AI entirely".
@ketsuban Follow that logic through the script and you'll see the bug. If the opponent is a physical type (and so as you noted more likely to use a physical move Counter would be good for) it ends the script with no further action. On the other hand if it's not a physical type it has a chance to reach score +4
, increasing the likelihood that Counter is the chosen move.
In
battle_ai_scripts.s
:Counter deals double the damage received if hit by a physical attack. So, in my opinion, it doesn't make sense to
score +4
if none of the mon's types is physical. Mirror Coat has the same issue.Do you agree that this should be considered a bug? If so, should we fix it in Pret (conditionally, with the BUGFIX define)? If so, any suggestions on how to fix it?