forked from rh-hideout/pokeemerald-expansion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes Mind Blown / Magic Guard interaction and renames Steel Beam eff…
…ect (rh-hideout#4043) * Fixes Mind Blown / Magic Guard interaction and renames Steel Beam effect * review fixes --------- Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
- Loading branch information
1 parent
a01d442
commit 0ec777d
Showing
7 changed files
with
60 additions
and
7 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
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,39 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_STEEL_BEAM].effect == EFFECT_MAX_HP_50_RECOIL); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Steel Beam causes the user to take damage equal to half of its maximum HP") | ||
{ | ||
s16 recoilDamage; | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_STEEL_BEAM); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEEL_BEAM, player); | ||
HP_BAR(opponent); | ||
HP_BAR(player, captureDamage: &recoilDamage); | ||
} THEN { | ||
EXPECT_EQ(player->maxHP / 2, recoilDamage); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Steel Beam hp loss is prevented by Magic Guard") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_CLEFAIRY) { Ability(ABILITY_MAGIC_GUARD); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_STEEL_BEAM); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEEL_BEAM, player); | ||
HP_BAR(opponent); | ||
NOT HP_BAR(player); | ||
} | ||
} |
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