mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
Merge pull request #1673 from ghoulslash/gen8_move_effects
Gen8 move effects Fixes
This commit is contained in:
commit
13a464ffa4
@ -3094,6 +3094,7 @@ void FaintClearSetData(void)
|
||||
gProtectStructs[gActiveBattler].usedGravityPreventedMove = 0;
|
||||
gProtectStructs[gActiveBattler].usedThroatChopPreventedMove = 0;
|
||||
gProtectStructs[gActiveBattler].statRaised = 0;
|
||||
gProtectStructs[gActiveBattler].statFell = 0;
|
||||
|
||||
gDisableStructs[gActiveBattler].isFirstTurn = 2;
|
||||
|
||||
|
@ -5193,6 +5193,7 @@ static void Cmd_moveend(void)
|
||||
u8 battler = battlers[i];
|
||||
if (IsBattlerAlive(battler)
|
||||
&& gProtectStructs[battler].statFell
|
||||
&& gProtectStructs[battler].disableEjectPack == 0
|
||||
&& GetBattlerHoldEffect(battler, TRUE) == HOLD_EFFECT_EJECT_PACK
|
||||
&& !(gCurrentMove == MOVE_PARTING_SHOT && CanBattlerSwitch(gBattlerAttacker)) // Does not activate if attacker used Parting Shot and can switch out
|
||||
&& CountUsablePartyMons(battler) > 0) // Has mon to switch into
|
||||
@ -9442,9 +9443,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check eject pack. disableEjectPack set for edge cases (e.g. attacking weak armor'd eject pack holder with u-turn)
|
||||
if (gProtectStructs[gActiveBattler].disableEjectPack == 0)
|
||||
gProtectStructs[gActiveBattler].statFell = 1;
|
||||
gProtectStructs[gActiveBattler].statFell = 1; // Eject pack, lash out
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_FELL or B_MSG_DEFENDER_STAT_FELL
|
||||
}
|
||||
}
|
||||
|
@ -6011,6 +6011,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
break;
|
||||
case HOLD_EFFECT_EJECT_PACK:
|
||||
if (gProtectStructs[battlerId].statFell
|
||||
&& gProtectStructs[battlerId].disableEjectPack == 0
|
||||
&& !(gCurrentMove == MOVE_PARTING_SHOT && CanBattlerSwitch(gBattlerAttacker))) // Does not activate if attacker used Parting Shot and can switch out
|
||||
{
|
||||
gProtectStructs[battlerId].statFell = FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user