replace gCurrentMove with move in CalcCritChanceStageArgs (#4687)
AI got the wrong calc when the global was used.
This commit is contained in:
parent
9b10e13336
commit
86b76134e3
1 changed files with 2 additions and 2 deletions
|
@ -1923,7 +1923,7 @@ s32 CalcCritChanceStageArgs(u32 battlerAtk, u32 battlerDef, u32 move, bool32 rec
|
|||
critChance = -1;
|
||||
}
|
||||
else if (gStatuses3[battlerAtk] & STATUS3_LASER_FOCUS
|
||||
|| gMovesInfo[gCurrentMove].alwaysCriticalHit
|
||||
|| gMovesInfo[move].alwaysCriticalHit
|
||||
|| (abilityAtk == ABILITY_MERCILESS && gBattleMons[battlerDef].status1 & STATUS1_PSN_ANY))
|
||||
{
|
||||
critChance = -2;
|
||||
|
@ -1932,7 +1932,7 @@ s32 CalcCritChanceStageArgs(u32 battlerAtk, u32 battlerDef, u32 move, bool32 rec
|
|||
{
|
||||
critChance = 2 * ((gBattleMons[battlerAtk].status2 & STATUS2_FOCUS_ENERGY) != 0)
|
||||
+ 1 * ((gBattleMons[battlerAtk].status2 & STATUS2_DRAGON_CHEER) != 0)
|
||||
+ gMovesInfo[gCurrentMove].criticalHitStage
|
||||
+ gMovesInfo[move].criticalHitStage
|
||||
+ (holdEffectAtk == HOLD_EFFECT_SCOPE_LENS)
|
||||
+ 2 * (holdEffectAtk == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[battlerAtk].species == SPECIES_CHANSEY)
|
||||
+ 2 * BENEFITS_FROM_LEEK(battlerAtk, holdEffectAtk)
|
||||
|
|
Loading…
Reference in a new issue