forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes Stalwart/Propeller Tail, Life Orb on confusion, Remove Status w…
…rong battlescripts (#5061) * Fix swapped BattleScripts in MoveEffectRemoveStatus for Freeze/Frostbite * Fix Life Orb damaging the user if they hit themselves in confusion * Fix Stalwart/Propeller Tail not ignoring redirection from Storm Drain/Lightning Rod * Parametrize Species
- Loading branch information
1 parent
7422051
commit ab9f8e6
Showing
3 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
DOUBLE_BATTLE_TEST("Stalwart ignores redirection from Follow-Me") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_ARCHALUDON) { Ability(ABILITY_STALWART); } | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponentLeft, MOVE_FOLLOW_ME); MOVE(playerLeft, MOVE_DRACO_METEOR, target: opponentRight); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FOLLOW_ME, opponentLeft); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRACO_METEOR, playerLeft); | ||
HP_BAR(opponentRight); | ||
NOT HP_BAR(opponentLeft); | ||
} | ||
} | ||
|
||
DOUBLE_BATTLE_TEST("Stalwart stops Lightning Rod and Storm Drain from redirecting moves") | ||
{ | ||
u32 ability, species; | ||
PARAMETRIZE { ability = ABILITY_STORM_DRAIN; species = SPECIES_LUMINEON; } | ||
PARAMETRIZE { ability = ABILITY_LIGHTNING_ROD; species = SPECIES_RAICHU; } | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_SPARK].type == TYPE_ELECTRIC); | ||
ASSUME(gMovesInfo[MOVE_WATER_GUN].type == TYPE_WATER); | ||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_STALWART); } | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(species) { Ability(ability); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { | ||
if (ability == ABILITY_LIGHTNING_ROD) | ||
MOVE(playerLeft, MOVE_SPARK, target: opponentRight); | ||
else | ||
MOVE(playerLeft, MOVE_WATER_GUN, target: opponentRight); | ||
} | ||
} SCENE { | ||
if (B_REDIRECT_ABILITY_IMMUNITY >= GEN_5) { | ||
HP_BAR(opponentRight); | ||
NONE_OF { | ||
ABILITY_POPUP(opponentLeft, ability); | ||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft); | ||
MESSAGE("Foe Raichu's Sp. Atk rose!"); | ||
} | ||
} else { | ||
HP_BAR(opponentRight); | ||
NONE_OF { | ||
HP_BAR(opponentLeft); | ||
} | ||
} | ||
} | ||
} |