Expanded AI awareness of moves that don't work against Dynamax Pokemon (#4521)
* Update IsDamageMoveUsable to check for Steel Roller viability * Condense terrain flag checks and renamed IsDamageMoveUsable IsDamageMoveUsable is now named IsDamageMoveUnusable to more accurately reflect the boolean it returns. * Made the AI aware of when more moves will fail against Dynamax Pokemon Turns out Dynamax Pokemon are immune to quite a few moves. The AI is only aware of one of these at present--the Low Kick/Grass Knot effect, which I learned when the AI tried to Heavy Slam my Dynamaxed Pokemon. These additional cases should prevent the AI from selecting moves that have no effect against Dynamax Pokemon, though it may still select moves whose secondary effect won't work on Dynamaxed Pokemon (such as Fake Out or Circle Throw). * Update battle_ai_util.c Now handles damaging moves that Dynamax Pokemon are immune to
This commit is contained in:
parent
82b626aef1
commit
b04d153a24
1 changed files with 1 additions and 0 deletions
|
@ -431,6 +431,7 @@ bool32 IsDamageMoveUnusable(u32 move, u32 battlerAtk, u32 battlerDef)
|
|||
return TRUE;
|
||||
break;
|
||||
case EFFECT_LOW_KICK:
|
||||
case EFFECT_HEAT_CRASH:
|
||||
if (IsDynamaxed(battlerDef))
|
||||
return TRUE;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue