fix toxic/flame orb. use CanBeX'ed functions
This commit is contained in:
parent
ed464a9e8d
commit
f53de6ae87
1 changed files with 2 additions and 11 deletions
|
@ -7332,11 +7332,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||||
switch (battlerHoldEffect)
|
switch (battlerHoldEffect)
|
||||||
{
|
{
|
||||||
case HOLD_EFFECT_TOXIC_ORB:
|
case HOLD_EFFECT_TOXIC_ORB:
|
||||||
if (!gBattleMons[battlerId].status1
|
if (IsBattlerAlive(battlerId) && CanBePoisoned(battlerId, battlerId))
|
||||||
&& CanPoisonType(battlerId, battlerId)
|
|
||||||
&& battlerAbility != ABILITY_IMMUNITY
|
|
||||||
&& battlerAbility != ABILITY_COMATOSE
|
|
||||||
&& IsBattlerAlive)
|
|
||||||
{
|
{
|
||||||
effect = ITEM_STATUS_CHANGE;
|
effect = ITEM_STATUS_CHANGE;
|
||||||
gBattleMons[battlerId].status1 = STATUS1_TOXIC_POISON;
|
gBattleMons[battlerId].status1 = STATUS1_TOXIC_POISON;
|
||||||
|
@ -7345,12 +7341,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HOLD_EFFECT_FLAME_ORB:
|
case HOLD_EFFECT_FLAME_ORB:
|
||||||
if (!gBattleMons[battlerId].status1
|
if (IsBattlerAlive(battlerId) && CanBeBurned(battlerId))
|
||||||
&& !IS_BATTLER_OF_TYPE(battlerId, TYPE_FIRE)
|
|
||||||
&& battlerAbility != ABILITY_WATER_VEIL
|
|
||||||
&& battlerAbility != ABILITY_WATER_BUBBLE
|
|
||||||
&& battlerAbility != ABILITY_COMATOSE
|
|
||||||
&& IsBattlerAlive)
|
|
||||||
{
|
{
|
||||||
effect = ITEM_STATUS_CHANGE;
|
effect = ITEM_STATUS_CHANGE;
|
||||||
gBattleMons[battlerId].status1 = STATUS1_BURN;
|
gBattleMons[battlerId].status1 = STATUS1_BURN;
|
||||||
|
|
Loading…
Reference in a new issue