mirror of
https://github.com/rh-hideout/pokeemerald-expansion
synced 2025-10-06 02:32:43 +02:00
Fixes Endure lasting forever (#7838)
This commit is contained in:
@@ -5143,6 +5143,7 @@ static void TurnValuesCleanUp(bool8 var0)
|
||||
gSpecialStatuses[i].parentalBondState = PARENTAL_BOND_OFF;
|
||||
gBattleStruct->battlerState[i].usedEjectItem = FALSE;
|
||||
gProtectStructs[i].lashOutAffected = FALSE;
|
||||
gDisableStructs[i].endured = FALSE;
|
||||
}
|
||||
|
||||
gSideTimers[B_SIDE_PLAYER].followmeTimer = 0;
|
||||
|
@@ -1,13 +1,17 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(GetMoveEffect(MOVE_ENDURE) == EFFECT_ENDURE);
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Endure allows the user to survive any attack with 1 HP left");
|
||||
|
||||
SINGLE_BATTLE_TEST("Endure does not prevent multiple hits and stat changes occur at the end of the turn")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_SCALE_SHOT) == EFFECT_MULTI_HIT);
|
||||
ASSUME(GetMoveEffect(MOVE_ENDURE) == EFFECT_ENDURE);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
} WHEN {
|
||||
@@ -54,6 +58,23 @@ DOUBLE_BATTLE_TEST("Endure is not transferred to a mon that is switched in due t
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Endure only lasts for one turn")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_ENDURE); MOVE(player, MOVE_POUND); }
|
||||
TURN { MOVE(player, MOVE_POUND); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENDURE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_POUND, player);
|
||||
MESSAGE("The opposing Wobbuffet endured the hit!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_POUND, player);
|
||||
NOT MESSAGE("The opposing Wobbuffet endured the hit!");
|
||||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Endure's success rate decreases for every consecutively used turn");
|
||||
TO_DO_BATTLE_TEST("Endure uses the same counter as Protect");
|
||||
TO_DO_BATTLE_TEST("Endure doesn't trigger effects that require damage to be done to the Pokémon (Gen 2-4)"); // Eg. Rough Skin
|
||||
|
Reference in New Issue
Block a user