Various AI fixes (#5474)
* fix AI mirror move check viability call * fix EFFECT_ABSORB missing break in AI_CalcMoveEffectScore --------- Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
parent
6f59d26753
commit
06fefe3318
1 changed files with 2 additions and 1 deletions
|
@ -3302,6 +3302,7 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move)
|
|||
case EFFECT_ABSORB:
|
||||
if (aiData->holdEffects[battlerAtk] == HOLD_EFFECT_BIG_ROOT && effectiveness >= AI_EFFECTIVENESS_x1)
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
case EFFECT_EXPLOSION:
|
||||
case EFFECT_MEMENTO:
|
||||
if (AI_THINKING_STRUCT->aiFlags[battlerAtk] & AI_FLAG_WILL_SUICIDE && gBattleMons[battlerDef].statStages[STAT_EVASION] < 7)
|
||||
|
@ -3316,7 +3317,7 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move)
|
|||
break;
|
||||
case EFFECT_MIRROR_MOVE:
|
||||
if (predictedMove != MOVE_NONE)
|
||||
return AI_CheckViability(battlerAtk, battlerDef, gLastMoves[battlerDef], score);
|
||||
return AI_CheckViability(battlerAtk, battlerDef, predictedMove, score);
|
||||
break;
|
||||
case EFFECT_ATTACK_UP:
|
||||
case EFFECT_ATTACK_UP_USER_ALLY:
|
||||
|
|
Loading…
Reference in a new issue