Update src/battle_script_commands.c
Co-authored-by: LOuroboros <lunosouroboros@gmail.com>
This commit is contained in:
parent
459631eb96
commit
07a91b9e9b
1 changed files with 11 additions and 13 deletions
|
@ -8166,21 +8166,19 @@ static bool32 IsAbilityMotorAffected(void)
|
||||||
|
|
||||||
static bool32 IsAbilityAbsorbAffected(void)
|
static bool32 IsAbilityAbsorbAffected(void)
|
||||||
{
|
{
|
||||||
u32 moveType;
|
u32 moveType;
|
||||||
|
|
||||||
if (gBattleStruct->dynamicMoveType == 0)
|
if (gBattleStruct->dynamicMoveType == 0)
|
||||||
moveType = gBattleMoves[gCurrentMove].type;
|
moveType = gBattleMoves[gCurrentMove].type;
|
||||||
else if (!(gBattleStruct->dynamicMoveType & 0x40))
|
else if (!(gBattleStruct->dynamicMoveType & 0x40))
|
||||||
moveType = gBattleStruct->dynamicMoveType & 0x3F;
|
moveType = gBattleStruct->dynamicMoveType & 0x3F;
|
||||||
else
|
else
|
||||||
moveType = gBattleMoves[gCurrentMove].type;
|
moveType = gBattleMoves[gCurrentMove].type;
|
||||||
|
|
||||||
if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_VOLT_ABSORB) {
|
if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_VOLT_ABSORB)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
else
|
||||||
else {
|
return FALSE;
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool32 IsTeatimeAffected(u32 battlerId)
|
static bool32 IsTeatimeAffected(u32 battlerId)
|
||||||
|
|
Loading…
Reference in a new issue