Fix AI Sheer Force checks to allow Order Up’s Commander stat boost (#9250)
This commit is contained in:
parent
56f22adc15
commit
33b89f227d
@ -5694,8 +5694,11 @@ static s32 AI_CalcAdditionalEffectScore(u32 battlerAtk, u32 battlerDef, u32 move
|
||||
u32 i;
|
||||
u32 additionalEffectCount = GetMoveAdditionalEffectCount(move);
|
||||
|
||||
if (IsSheerForceAffected(move, aiData->abilities[battlerAtk]))
|
||||
if (IsSheerForceAffected(move, aiData->abilities[battlerAtk])
|
||||
&& !(GetMoveEffect(move) == EFFECT_ORDER_UP && gBattleStruct->battlerState[battlerAtk].commanderSpecies != SPECIES_NONE))
|
||||
{
|
||||
return score;
|
||||
}
|
||||
|
||||
// check move additional effects that are likely to happen
|
||||
for (i = 0; i < additionalEffectCount; i++)
|
||||
|
||||
@ -1034,8 +1034,11 @@ static bool32 AI_IsMoveEffectInPlus(u32 battlerAtk, u32 battlerDef, u32 move, s3
|
||||
enum Ability abilityDef = gAiLogicData->abilities[battlerDef];
|
||||
enum Ability abilityAtk = gAiLogicData->abilities[battlerAtk];
|
||||
|
||||
if (IsSheerForceAffected(move, abilityAtk))
|
||||
if (IsSheerForceAffected(move, abilityAtk)
|
||||
&& !(GetMoveEffect(move) == EFFECT_ORDER_UP && gBattleStruct->battlerState[battlerAtk].commanderSpecies != SPECIES_NONE))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user