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.
Co-authored-by: Hedara <hedara90@gmail.com> Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
- Loading branch information
1 parent
1c821c2
commit 8bb52b5
Showing
1 changed file
with
61 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
SINGLE_BATTLE_TEST("Water Compaction raises Defense 2 stages when hit by a water type move") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_WATER_GUN].type == TYPE_WATER); | ||
PLAYER(SPECIES_SANDYGAST) { Ability(ABILITY_WATER_COMPACTION); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_WATER_GUN); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_WATER_GUN, opponent); | ||
ABILITY_POPUP(player, ABILITY_WATER_COMPACTION); | ||
} THEN { | ||
EXPECT_EQ(player->statStages[STAT_DEF], DEFAULT_STAT_STAGE + 2); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Water Compaction raises Defense 2 stages on each hit of a multi-hit Water type move") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_SURGING_STRIKES].type == TYPE_WATER); | ||
ASSUME(gMovesInfo[MOVE_SURGING_STRIKES].strikeCount == 3); | ||
PLAYER(SPECIES_SANDYGAST) { Ability(ABILITY_WATER_COMPACTION); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_SURGING_STRIKES); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, opponent); | ||
ABILITY_POPUP(player, ABILITY_WATER_COMPACTION); | ||
MESSAGE("Sandygast's Defense sharply rose!"); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, opponent); | ||
ABILITY_POPUP(player, ABILITY_WATER_COMPACTION); | ||
MESSAGE("Sandygast's Defense sharply rose!"); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, opponent); | ||
ABILITY_POPUP(player, ABILITY_WATER_COMPACTION); | ||
MESSAGE("Sandygast's Defense sharply rose!"); | ||
} THEN { | ||
EXPECT_EQ(player->statStages[STAT_DEF], DEFAULT_STAT_STAGE + 6); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Water Compaction does not affect damage taken from Water type moves", s16 damage) | ||
{ | ||
u16 ability; | ||
PARAMETRIZE { ability = ABILITY_SAND_VEIL; } | ||
PARAMETRIZE { ability = ABILITY_WATER_COMPACTION; } | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_WATER_GUN].type == TYPE_WATER); | ||
PLAYER(SPECIES_SANDYGAST) { Ability(ability); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_WATER_GUN); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_WATER_GUN, opponent); | ||
HP_BAR(player, captureDamage: &results[i].damage); | ||
} FINALLY { | ||
EXPECT_EQ(results[0].damage, results[1].damage); | ||
} | ||
} |