Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Pursuit, Tangling Hair interaction #4086

Merged
merged 1 commit into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -6716,6 +6716,7 @@ BattleScript_PrintFullBox::

BattleScript_ActionSwitch::
hpthresholds2 BS_ATTACKER
copybyte sSAVED_BATTLER, gBattlerAttacker
printstring STRINGID_RETURNMON
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_PursuitSwitchDmgSetMultihit
setmultihit 1
Expand All @@ -6733,6 +6734,7 @@ BattleScript_DoSwitchOut::
switchoutabilities BS_ATTACKER
updatedynamax
waitstate
copybyte gBattlerAttacker, sSAVED_BATTLER
returnatktoball
waitstate
drawpartystatussummary BS_ATTACKER
Expand Down
26 changes: 26 additions & 0 deletions test/battle/move_effect/pursuit.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "global.h"
#include "test/battle.h"

ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_PURSUIT].effect == EFFECT_PURSUIT);
}

SINGLE_BATTLE_TEST("Pursuited mon correctly switches out after it got hit and activated ability Tangling Hair")
{
GIVEN {
PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_TANGLING_HAIR); }
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { SWITCH(player, 1); MOVE(opponent, MOVE_PURSUIT); }
} SCENE {
MESSAGE("Dugtrio, that's enough! Come back!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_PURSUIT, opponent);
ABILITY_POPUP(player, ABILITY_TANGLING_HAIR);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wynaut's Speed fell!");
MESSAGE("Go! Wobbuffet!");
}
}
Loading