parent
78f1da4131
commit
d83f90d51f
@ -718,6 +718,7 @@ struct BattleStruct
|
||||
} multiBuffer;
|
||||
u8 wishPerishSongState;
|
||||
u8 wishPerishSongBattlerId;
|
||||
u8 aiCalcInProgress:1;
|
||||
u8 overworldWeatherDone:1;
|
||||
u8 startingStatusDone:1;
|
||||
u8 isAtkCancelerForCalledMove:1; // Certain cases in atk canceler should only be checked once, when the original move is called, however others need to be checked the twice.
|
||||
|
||||
@ -500,6 +500,7 @@ s32 AI_CalcDamage(u32 move, u32 battlerAtk, u32 battlerDef, u8 *typeEffectivenes
|
||||
bool32 toggledDynamax = FALSE;
|
||||
bool32 toggledTera = FALSE;
|
||||
struct AiLogicData *aiData = AI_DATA;
|
||||
gBattleStruct->aiCalcInProgress = TRUE;
|
||||
|
||||
// Temporarily enable Z-Moves for damage calcs
|
||||
if (considerZPower && IsViableZMove(battlerAtk, move))
|
||||
@ -650,6 +651,7 @@ s32 AI_CalcDamage(u32 move, u32 battlerAtk, u32 battlerDef, u8 *typeEffectivenes
|
||||
// convert multiper to AI_EFFECTIVENESS_xX
|
||||
*typeEffectiveness = AI_GetEffectiveness(effectivenessMultiplier);
|
||||
|
||||
gBattleStruct->aiCalcInProgress = FALSE;
|
||||
gBattleStruct->swapDamageCategory = FALSE;
|
||||
gBattleStruct->zmove.active = FALSE;
|
||||
gBattleStruct->zmove.baseMoves[battlerAtk] = MOVE_NONE;
|
||||
|
||||
@ -10172,7 +10172,7 @@ static inline void MulByTypeEffectiveness(uq4_12_t *modifier, u32 move, u32 move
|
||||
mod = UQ_4_12(1.0);
|
||||
}
|
||||
|
||||
if (gBattleStruct->distortedTypeMatchups & gBitTable[battlerDef])
|
||||
if (gBattleStruct->distortedTypeMatchups & gBitTable[battlerDef] || (gBattleStruct->aiCalcInProgress && ShouldTeraShellDistortTypeMatchups(move, battlerDef)))
|
||||
{
|
||||
mod = UQ_4_12(0.5);
|
||||
if (recordAbilities)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user