From d0336a9edf7c53db15fab0341ea62d4c30670210 Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Sat, 13 Nov 2021 14:01:36 +1300 Subject: [PATCH] Fix Payday Only scatters coins on the first hit of Parental Bond. --- src/battle_script_commands.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f8548f522..dad910d5e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1141,7 +1141,6 @@ static const u16 sFinalStrikeOnlyEffects[] = EFFECT_BUG_BITE, EFFECT_THIEF, EFFECT_BURN_UP, - EFFECT_PAY_DAY, EFFECT_SECRET_POWER, EFFECT_HIT_SWITCH_TARGET, EFFECT_SMACK_DOWN, @@ -3019,15 +3018,21 @@ void SetMoveEffect(bool32 primary, u32 certain) } break; case MOVE_EFFECT_PAYDAY: - if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER) + // Don't scatter coins on the second hit of Parental Bond + if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER && gSpecialStatuses[gBattlerAttacker].parentalBondOn != 1) { u16 PayDay = gPaydayMoney; gPaydayMoney += (gBattleMons[gBattlerAttacker].level * 5); if (PayDay > gPaydayMoney) gPaydayMoney = 0xFFFF; + + BattleScriptPush(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_MoveEffectPayDay; + } + else + { + gBattlescriptCurrInstr++; } - BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleScripting.moveEffect]; break; case MOVE_EFFECT_HAPPY_HOUR: if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER && !gBattleStruct->moneyMultiplierMove)