Merge pull request #2601 from ghoulslash/be/flameburst

Fix flame burst hitting semi-invulnerable partner
This commit is contained in:
Eduardo Quezada D'Ottone 2023-01-26 15:14:07 -03:00 committed by GitHub
commit ca5a45d34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3485,7 +3485,9 @@ void SetMoveEffect(bool32 primary, u32 certain)
}
break;
case MOVE_EFFECT_FLAME_BURST:
if (IsBattlerAlive(BATTLE_PARTNER(gBattlerTarget)) && GetBattlerAbility(BATTLE_PARTNER(gBattlerTarget)) != ABILITY_MAGIC_GUARD)
if (IsBattlerAlive(BATTLE_PARTNER(gBattlerTarget))
&& !(gStatuses3[BATTLE_PARTNER(gBattlerTarget)] & STATUS3_SEMI_INVULNERABLE)
&& GetBattlerAbility(BATTLE_PARTNER(gBattlerTarget)) != ABILITY_MAGIC_GUARD)
{
gBattleScripting.savedBattler = BATTLE_PARTNER(gBattlerTarget);
gBattleMoveDamage = gBattleMons[BATTLE_PARTNER(gBattlerTarget)].hp / 16;