Merge pull request #1862 from ghoulslash/be/speeduphit

Dont have XX_UP_HIT effects trigger at end of battle
This commit is contained in:
BuffelSaft 2021-11-08 19:16:54 +13:00 committed by GitHub
commit 5ac465bc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3075,7 +3075,8 @@ void SetMoveEffect(bool32 primary, u32 certain)
case MOVE_EFFECT_SP_DEF_PLUS_1: case MOVE_EFFECT_SP_DEF_PLUS_1:
case MOVE_EFFECT_ACC_PLUS_1: case MOVE_EFFECT_ACC_PLUS_1:
case MOVE_EFFECT_EVS_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, gBattleScripting.moveEffect - MOVE_EFFECT_ATK_PLUS_1 + 1,
affectsUser, 0)) affectsUser, 0))
{ {
@ -3122,7 +3123,8 @@ void SetMoveEffect(bool32 primary, u32 certain)
case MOVE_EFFECT_SP_DEF_PLUS_2: case MOVE_EFFECT_SP_DEF_PLUS_2:
case MOVE_EFFECT_ACC_PLUS_2: case MOVE_EFFECT_ACC_PLUS_2:
case MOVE_EFFECT_EVS_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, gBattleScripting.moveEffect - MOVE_EFFECT_ATK_PLUS_2 + 1,
affectsUser, 0)) affectsUser, 0))
{ {
@ -3236,8 +3238,15 @@ void SetMoveEffect(bool32 primary, u32 certain)
gBattlescriptCurrInstr++; gBattlescriptCurrInstr++;
break; break;
case MOVE_EFFECT_ALL_STATS_UP: case MOVE_EFFECT_ALL_STATS_UP:
if (NoAliveMonsForEitherParty())
{
gBattlescriptCurrInstr++;
}
else
{
BattleScriptPush(gBattlescriptCurrInstr + 1); BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_AllStatsUp; gBattlescriptCurrInstr = BattleScript_AllStatsUp;
}
break; break;
case MOVE_EFFECT_RAPIDSPIN: case MOVE_EFFECT_RAPIDSPIN:
BattleScriptPush(gBattlescriptCurrInstr + 1); BattleScriptPush(gBattlescriptCurrInstr + 1);