mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
Hold Effect and Gastro Acid (on faint) cleanup
This commit is contained in:
parent
0944439191
commit
7b3f3fda8e
|
|
@ -3321,10 +3321,8 @@ void FaintClearSetData(enum BattlerId battler)
|
|||
for (enum Stat i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[battler].statStages[i] = DEFAULT_STAT_STAGE;
|
||||
|
||||
bool32 keepGastroAcid = gBattleMons[battler].volatiles.gastroAcid;
|
||||
bool32 keepTransformed = gBattleMons[battler].volatiles.transformed;
|
||||
memset(&gBattleMons[battler].volatiles, 0, sizeof(struct Volatiles));
|
||||
gBattleMons[battler].volatiles.gastroAcid = keepGastroAcid; // Edge case: Keep Gastro Acid if pokemon's ability can have effect after fainting, for example Innards Out.
|
||||
gBattleMons[battler].volatiles.transformed = keepTransformed; // Edge case: Keep Transformed status to prevent triggering FORM_CHANGE_FAINT on transformed mons.
|
||||
|
||||
for (enum BattlerId i = 0; i < gBattlersCount; i++)
|
||||
|
|
|
|||
|
|
@ -5695,6 +5695,9 @@ enum HoldEffect GetBattlerHoldEffectInternal(enum BattlerId battler, enum Abilit
|
|||
|
||||
enum HoldEffect GetBattlerHoldEffectIgnoreNegation(enum BattlerId battler)
|
||||
{
|
||||
if (gBattleStruct->battlerState[battler].notOnField)
|
||||
return HOLD_EFFECT_NONE;
|
||||
|
||||
gPotentialItemEffectBattler = battler;
|
||||
if (gBattleMons[battler].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
return gEnigmaBerries[battler].holdEffect;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user