mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 15:43:43 +01:00
Merge pull request #1622 from BuffelSaft/money-boost
Fix stacking effect on HOLD_EFFECT_DOUBLE_PRIZE
This commit is contained in:
commit
68c33895fd
@ -492,7 +492,9 @@ struct BattleStruct
|
||||
u16 assistPossibleMoves[PARTY_SIZE * MAX_MON_MOVES]; // Each of mons can know max 4 moves.
|
||||
u8 focusPunchBattlerId;
|
||||
u8 battlerPreventingSwitchout;
|
||||
u8 moneyMultiplier;
|
||||
u8 moneyMultiplier:6;
|
||||
u8 moneyMultiplierItem:1;
|
||||
u8 moneyMultiplierMove:1;
|
||||
u8 savedTurnActionNumber;
|
||||
u8 switchInAbilitiesCounter;
|
||||
u8 faintedActionsState;
|
||||
|
@ -2878,9 +2878,10 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleScripting.moveEffect];
|
||||
break;
|
||||
case MOVE_EFFECT_HAPPY_HOUR:
|
||||
if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER)
|
||||
if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER && !gBattleStruct->moneyMultiplierMove)
|
||||
{
|
||||
gBattleStruct->moneyMultiplier *= 2;
|
||||
gBattleStruct->moneyMultiplierMove = 1;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
break;
|
||||
|
@ -5626,8 +5626,11 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
switch (battlerHoldEffect)
|
||||
{
|
||||
case HOLD_EFFECT_DOUBLE_PRIZE:
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER && !gBattleStruct->moneyMultiplierItem)
|
||||
{
|
||||
gBattleStruct->moneyMultiplier *= 2;
|
||||
gBattleStruct->moneyMultiplierItem = 1;
|
||||
}
|
||||
break;
|
||||
case HOLD_EFFECT_RESTORE_STATS:
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user