mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
43ad1a4d3b
* Unified twoStrikes and threeStrikes flags into strikeCount * Decreased strikeCount max from 255 to 15.
58 lines
1.8 KiB
C
58 lines
1.8 KiB
C
#include "global.h"
|
|
#include "test_battle.h"
|
|
|
|
SINGLE_BATTLE_TEST("Three-strike flag turns a move into a 3-hit move")
|
|
{
|
|
s16 firstHit;
|
|
s16 secondHit;
|
|
s16 thirdHit;
|
|
|
|
GIVEN {
|
|
ASSUME(gBattleMoves[MOVE_TRIPLE_DIVE].strikeCount == 3);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_TRIPLE_DIVE); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_DIVE, player);
|
|
HP_BAR(opponent, captureDamage: &firstHit);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_DIVE, player);
|
|
HP_BAR(opponent, captureDamage: &secondHit);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRIPLE_DIVE, player);
|
|
HP_BAR(opponent, captureDamage: &thirdHit);
|
|
} THEN {
|
|
EXPECT_EQ(firstHit, secondHit);
|
|
EXPECT_EQ(secondHit, thirdHit);
|
|
EXPECT_EQ(firstHit, thirdHit);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Surging Strikes hits 3 times with each hit being a critical hit")
|
|
{
|
|
s16 firstHit;
|
|
s16 secondHit;
|
|
s16 thirdHit;
|
|
|
|
GIVEN {
|
|
ASSUME(gBattleMoves[MOVE_SURGING_STRIKES].strikeCount == 3);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_SURGING_STRIKES); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, player);
|
|
HP_BAR(opponent, captureDamage: &firstHit);
|
|
MESSAGE("A critical hit!");
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, player);
|
|
HP_BAR(opponent, captureDamage: &secondHit);
|
|
MESSAGE("A critical hit!");
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURGING_STRIKES, player);
|
|
HP_BAR(opponent, captureDamage: &thirdHit);
|
|
MESSAGE("A critical hit!");
|
|
} THEN {
|
|
EXPECT_EQ(firstHit, secondHit);
|
|
EXPECT_EQ(secondHit, thirdHit);
|
|
EXPECT_EQ(firstHit, thirdHit);
|
|
}
|
|
}
|