mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 15:43:43 +01:00
fix lash out stat fell
This commit is contained in:
parent
1309eea8ec
commit
9bf2ffe459
@ -148,6 +148,7 @@ struct ProtectStruct
|
||||
u32 custap:1; // also quick claw
|
||||
u32 touchedProtectLike:1;
|
||||
u32 disableEjectPack:1;
|
||||
u32 statFell:1;
|
||||
u32 physicalDmg;
|
||||
u32 specialDmg;
|
||||
u8 physicalBattlerId;
|
||||
@ -156,7 +157,6 @@ struct ProtectStruct
|
||||
|
||||
struct SpecialStatus
|
||||
{
|
||||
u8 statFell:1;
|
||||
u8 statLowered:1;
|
||||
u8 lightningRodRedirected:1;
|
||||
u8 restoredBattlerSprite: 1;
|
||||
|
@ -5164,12 +5164,12 @@ static void Cmd_moveend(void)
|
||||
{
|
||||
u8 battler = battlers[i];
|
||||
if (IsBattlerAlive(battler)
|
||||
&& gSpecialStatuses[battler].statFell
|
||||
&& gProtectStructs[battler].statFell
|
||||
&& 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
|
||||
{
|
||||
gSpecialStatuses[battler].statFell = FALSE;
|
||||
gProtectStructs[battler].statFell = FALSE;
|
||||
gActiveBattler = gBattleScripting.battler = battler;
|
||||
gLastUsedItem = gBattleMons[battler].item;
|
||||
BattleScriptPushCursor();
|
||||
@ -9409,7 +9409,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr
|
||||
{
|
||||
// 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)
|
||||
gSpecialStatuses[gActiveBattler].statFell = TRUE;
|
||||
gProtectStructs[gActiveBattler].statFell = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_FELL or B_MSG_DEFENDER_STAT_FELL
|
||||
}
|
||||
}
|
||||
|
@ -5996,10 +5996,10 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
}
|
||||
break;
|
||||
case HOLD_EFFECT_EJECT_PACK:
|
||||
if (gSpecialStatuses[battlerId].statFell
|
||||
if (gProtectStructs[battlerId].statFell
|
||||
&& !(gCurrentMove == MOVE_PARTING_SHOT && CanBattlerSwitch(gBattlerAttacker))) // Does not activate if attacker used Parting Shot and can switch out
|
||||
{
|
||||
gSpecialStatuses[battlerId].statFell = FALSE;
|
||||
gProtectStructs[battlerId].statFell = FALSE;
|
||||
gActiveBattler = gBattleScripting.battler = battlerId;
|
||||
effect = ITEM_STATS_CHANGE;
|
||||
if (moveTurn)
|
||||
@ -7468,7 +7468,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
||||
basePower *= 2;
|
||||
break;
|
||||
case EFFECT_LASH_OUT:
|
||||
if (gSpecialStatuses[battlerAtk].statFell == 1)
|
||||
if (gProtectStructs[battlerAtk].statFell)
|
||||
basePower *= 2;
|
||||
break;
|
||||
case EFFECT_EXPLOSION:
|
||||
|
Loading…
x
Reference in New Issue
Block a user