From 377a4c73725f6a610af32fd497a4882bb52dd16b Mon Sep 17 00:00:00 2001 From: PhiSigma Date: Sat, 4 Nov 2023 12:41:23 +0100 Subject: [PATCH 1/2] fixed a bug in the interaction between curse and pressure --- src/battle_script_commands.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 9d2c2cb71557..ba58c8c13489 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1221,7 +1221,18 @@ static void Cmd_ppreduce(void) ppToDeduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIDE, gBattlerAttacker, ABILITY_PRESSURE, 0, 0); break; default: - if (gBattlerAttacker != gBattlerTarget && gBattleMons[gBattlerTarget].ability == ABILITY_PRESSURE) +#ifdef BUGFIX + //There is an issue with asymmetrical interaction between non-ghost curse and pressure, + //since the player controller changes the target of non-ghost curse to the user, + //but the opponent controller doesn't, so the player's non-ghost curse loses 1 PP + //against and opponent with pressure, but an opponent's non-ghost curse loses 2 PP + //against a player with pressure. + //This bugfix ensures that non-ghost curse always only deducts 1 PP against pressure, + //regardless of used by the player or opponent. + if (gBattlerAttacker != gBattlerTarget && gBattleMons[gBattlerTarget].ability == ABILITY_PRESSURE && !(gBattleMoves[gCurrentMove].effect == EFFECT_CURSE && gBattleMons[gBattlerAttacker].type1 != TYPE_GHOST && gBattleMons[gBattlerAttacker].type2 != TYPE_GHOST)) +#else + if (gBattlerAttacker != gBattlerTarget && gBattleMons[gBattlerTarget].ability == ABILITY_PRESSURE) +#endif ppToDeduct++; break; } From 40727e708d4cfee46c99becfc578c89d98bd2df5 Mon Sep 17 00:00:00 2001 From: PhiSigma Date: Sat, 4 Nov 2023 15:05:54 +0100 Subject: [PATCH 2/2] replaced tabs with spaces --- src/battle_script_commands.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ba58c8c13489..4be5644a0706 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1222,16 +1222,16 @@ static void Cmd_ppreduce(void) break; default: #ifdef BUGFIX - //There is an issue with asymmetrical interaction between non-ghost curse and pressure, - //since the player controller changes the target of non-ghost curse to the user, - //but the opponent controller doesn't, so the player's non-ghost curse loses 1 PP - //against and opponent with pressure, but an opponent's non-ghost curse loses 2 PP - //against a player with pressure. - //This bugfix ensures that non-ghost curse always only deducts 1 PP against pressure, - //regardless of used by the player or opponent. + //There is an issue with asymmetrical interaction between non-ghost curse and pressure, + //since the player controller changes the target of non-ghost curse to the user, + //but the opponent controller doesn't, so the player's non-ghost curse loses 1 PP + //against and opponent with pressure, but an opponent's non-ghost curse loses 2 PP + //against a player with pressure. + //This bugfix ensures that non-ghost curse always only deducts 1 PP against pressure, + //regardless of used by the player or opponent. if (gBattlerAttacker != gBattlerTarget && gBattleMons[gBattlerTarget].ability == ABILITY_PRESSURE && !(gBattleMoves[gCurrentMove].effect == EFFECT_CURSE && gBattleMons[gBattlerAttacker].type1 != TYPE_GHOST && gBattleMons[gBattlerAttacker].type2 != TYPE_GHOST)) #else - if (gBattlerAttacker != gBattlerTarget && gBattleMons[gBattlerTarget].ability == ABILITY_PRESSURE) + if (gBattlerAttacker != gBattlerTarget && gBattleMons[gBattlerTarget].ability == ABILITY_PRESSURE) #endif ppToDeduct++; break;