Skip to content

Commit

Permalink
Merge pull request #1862 from ghoulslash/be/speeduphit
Browse files Browse the repository at this point in the history
Dont have XX_UP_HIT effects trigger at end of battle
  • Loading branch information
BuffelSaft authored Nov 8, 2021
2 parents a90cf4a + 01d9d4c commit 5ac465b
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -3075,7 +3075,8 @@ void SetMoveEffect(bool32 primary, u32 certain)
case MOVE_EFFECT_SP_DEF_PLUS_1:
case MOVE_EFFECT_ACC_PLUS_1:
case MOVE_EFFECT_EVS_PLUS_1:
if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(1),
if (NoAliveMonsForEitherParty()
|| ChangeStatBuffs(SET_STAT_BUFF_VALUE(1),
gBattleScripting.moveEffect - MOVE_EFFECT_ATK_PLUS_1 + 1,
affectsUser, 0))
{
Expand Down Expand Up @@ -3122,7 +3123,8 @@ void SetMoveEffect(bool32 primary, u32 certain)
case MOVE_EFFECT_SP_DEF_PLUS_2:
case MOVE_EFFECT_ACC_PLUS_2:
case MOVE_EFFECT_EVS_PLUS_2:
if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(2),
if (NoAliveMonsForEitherParty()
|| ChangeStatBuffs(SET_STAT_BUFF_VALUE(2),
gBattleScripting.moveEffect - MOVE_EFFECT_ATK_PLUS_2 + 1,
affectsUser, 0))
{
Expand Down Expand Up @@ -3236,8 +3238,15 @@ void SetMoveEffect(bool32 primary, u32 certain)
gBattlescriptCurrInstr++;
break;
case MOVE_EFFECT_ALL_STATS_UP:
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_AllStatsUp;
if (NoAliveMonsForEitherParty())
{
gBattlescriptCurrInstr++;
}
else
{
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_AllStatsUp;
}
break;
case MOVE_EFFECT_RAPIDSPIN:
BattleScriptPush(gBattlescriptCurrInstr + 1);
Expand Down

0 comments on commit 5ac465b

Please sign in to comment.