mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
Fix Toxic and Flame Orb
Shouldn't inflict status conditions on a fainted mon.
This commit is contained in:
parent
d270dee6bc
commit
e8598076a8
@ -6271,7 +6271,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
case HOLD_EFFECT_TOXIC_ORB:
|
||||
if (!gBattleMons[battlerId].status1
|
||||
&& CanPoisonType(battlerId, battlerId)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_IMMUNITY)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_IMMUNITY
|
||||
&& IsBattlerAlive)
|
||||
{
|
||||
effect = ITEM_STATUS_CHANGE;
|
||||
gBattleMons[battlerId].status1 = STATUS1_TOXIC_POISON;
|
||||
@ -6282,7 +6283,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
case HOLD_EFFECT_FLAME_ORB:
|
||||
if (!gBattleMons[battlerId].status1
|
||||
&& !IS_BATTLER_OF_TYPE(battlerId, TYPE_FIRE)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_WATER_VEIL)
|
||||
&& GetBattlerAbility(battlerId) != ABILITY_WATER_VEIL
|
||||
&& IsBattlerAlive)
|
||||
{
|
||||
effect = ITEM_STATUS_CHANGE;
|
||||
gBattleMons[battlerId].status1 = STATUS1_BURN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user