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: ghoulslash <[email protected]>
- Loading branch information
1 parent
a775098
commit 6e24b6a
Showing
2 changed files
with
49 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gMovesInfo[MOVE_GRAVITY].effect == EFFECT_GRAVITY); | ||
} | ||
|
||
DOUBLE_BATTLE_TEST("Gravity cancels fly and sky drop if they are in the air") | ||
{ | ||
u8 visibility; | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { Speed(100); } | ||
PLAYER(SPECIES_WYNAUT) { Speed(90); } | ||
OPPONENT(SPECIES_PIDGEY) { Speed(50); } | ||
OPPONENT(SPECIES_ROOKIDEE) { Speed(45); } | ||
} WHEN { | ||
TURN { MOVE(opponentLeft, MOVE_SKY_DROP, target: playerRight); MOVE(opponentRight, MOVE_FLY, target: playerLeft); } | ||
TURN { MOVE(playerLeft, MOVE_GRAVITY); SKIP_TURN(opponentRight); SKIP_TURN(opponentLeft); } | ||
} SCENE { | ||
// turn 1 | ||
MESSAGE("The opposing Pidgey used Sky Drop!"); | ||
MESSAGE("The opposing Pidgey took Wynaut into the sky!"); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SKY_DROP, opponentLeft); | ||
MESSAGE("The opposing Rookidee used Fly!"); | ||
MESSAGE("The opposing Rookidee flew up high!"); | ||
// turn 2 | ||
MESSAGE("Wobbuffet used Gravity!"); | ||
MESSAGE("Gravity intensified!"); | ||
MESSAGE("The opposing Pidgey fell from the sky due to the gravity!"); | ||
MESSAGE("The opposing Rookidee fell from the sky due to the gravity!"); | ||
MESSAGE("The opposing Pidgey can't use Sky Drop because of gravity!"); | ||
MESSAGE("The opposing Rookidee can't use Fly because of gravity!"); | ||
} THEN { | ||
// all battlers should be visible. assign to var first because expect_eq not working with bitfield address | ||
visibility = gBattleSpritesDataPtr->battlerData[0].invisible; | ||
EXPECT_EQ(visibility, 0); | ||
visibility = gBattleSpritesDataPtr->battlerData[1].invisible; | ||
EXPECT_EQ(visibility, 0); | ||
visibility = gBattleSpritesDataPtr->battlerData[2].invisible; | ||
EXPECT_EQ(visibility, 0); | ||
visibility = gBattleSpritesDataPtr->battlerData[3].invisible; | ||
EXPECT_EQ(visibility, 0); | ||
// ensure moveend properly recorded | ||
EXPECT_EQ(gLastMoves[0], MOVE_GRAVITY); | ||
} | ||
} |