mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-19 03:58:33 +01:00
Merge pull request #1925 from ghoulslash/be/rampage
fix rampage cancelling
This commit is contained in:
commit
29172d6357
@ -156,6 +156,7 @@
|
|||||||
#define B_SKILL_SWAP GEN_7 // In Gen4+, Skill Swap triggers switch-in abilities after use.
|
#define B_SKILL_SWAP GEN_7 // In Gen4+, Skill Swap triggers switch-in abilities after use.
|
||||||
#define B_BRICK_BREAK GEN_7 // In Gen4+, you can destroy your own side's screens. In Gen 5+, screens are not removed if the target is immune.
|
#define B_BRICK_BREAK GEN_7 // In Gen4+, you can destroy your own side's screens. In Gen 5+, screens are not removed if the target is immune.
|
||||||
#define B_WISH_HP_SOURCE GEN_7 // In Gen5+, Wish heals half of the user's max HP instead of the target's.
|
#define B_WISH_HP_SOURCE GEN_7 // In Gen5+, Wish heals half of the user's max HP instead of the target's.
|
||||||
|
#define B_RAMPAGE_CANCELLING GEN_7 // In Gen5+, a failed Thrash, etc, will cancel except on its last turn.
|
||||||
|
|
||||||
// Ability settings
|
// Ability settings
|
||||||
#define B_ABILITY_WEATHER GEN_7 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.
|
#define B_ABILITY_WEATHER GEN_7 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.
|
||||||
|
@ -5466,6 +5466,14 @@ static void Cmd_moveend(void)
|
|||||||
*(gBattleStruct->moveTarget + gBattlerAttacker) = gSpecialStatuses[gBattlerAttacker].instructedChosenTarget & 0x3;
|
*(gBattleStruct->moveTarget + gBattlerAttacker) = gSpecialStatuses[gBattlerAttacker].instructedChosenTarget & 0x3;
|
||||||
if (gSpecialStatuses[gBattlerAttacker].dancerOriginalTarget)
|
if (gSpecialStatuses[gBattlerAttacker].dancerOriginalTarget)
|
||||||
*(gBattleStruct->moveTarget + gBattlerAttacker) = gSpecialStatuses[gBattlerAttacker].dancerOriginalTarget & 0x3;
|
*(gBattleStruct->moveTarget + gBattlerAttacker) = gSpecialStatuses[gBattlerAttacker].dancerOriginalTarget & 0x3;
|
||||||
|
|
||||||
|
#if B_RAMPAGE_CANCELLING >= GEN_5
|
||||||
|
if (gBattleMoves[gCurrentMove].effect == EFFECT_RAMPAGE // If we're rampaging
|
||||||
|
&& (gMoveResultFlags & MOVE_RESULT_NO_EFFECT) // And it is unusable
|
||||||
|
&& (gBattleMons[gBattlerAttacker].status2 & STATUS2_LOCK_CONFUSE) != STATUS2_LOCK_CONFUSE_TURN(1)) // And won't end this turn
|
||||||
|
CancelMultiTurnMoves(gBattlerAttacker); // Cancel it
|
||||||
|
#endif
|
||||||
|
|
||||||
gProtectStructs[gBattlerAttacker].usesBouncedMove = FALSE;
|
gProtectStructs[gBattlerAttacker].usesBouncedMove = FALSE;
|
||||||
gProtectStructs[gBattlerAttacker].targetAffected = FALSE;
|
gProtectStructs[gBattlerAttacker].targetAffected = FALSE;
|
||||||
gBattleStruct->ateBoost[gBattlerAttacker] = 0;
|
gBattleStruct->ateBoost[gBattlerAttacker] = 0;
|
||||||
|
@ -2795,6 +2795,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
case ENDTURN_FLINCH: // reset flinch
|
case ENDTURN_FLINCH: // reset flinch
|
||||||
gBattleMons[gActiveBattler].status2 &= ~(STATUS2_FLINCHED);
|
gBattleMons[gActiveBattler].status2 &= ~(STATUS2_FLINCHED);
|
||||||
gBattleStruct->turnEffectsTracker++;
|
gBattleStruct->turnEffectsTracker++;
|
||||||
|
break;
|
||||||
case ENDTURN_DISABLE: // disable
|
case ENDTURN_DISABLE: // disable
|
||||||
if (gDisableStructs[gActiveBattler].disableTimer != 0)
|
if (gDisableStructs[gActiveBattler].disableTimer != 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user