Added Soundproof and Bulletproof tests (#8189)
This commit is contained in:
parent
625f67be33
commit
ffc2c04ea6
@ -1,4 +1,20 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Bulletproof makes ballistic moves fail against the ability user");
|
||||
SINGLE_BATTLE_TEST("Bulletproof makes ballistic moves fail against the ability user")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(IsBallisticMove(MOVE_ELECTRO_BALL));
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_CHESPIN) { Ability(ABILITY_BULLETPROOF); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_ELECTRO_BALL); }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponent, ABILITY_BULLETPROOF);
|
||||
MESSAGE("The opposing Chespin's Bulletproof blocks Electro Ball!");
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ELECTRO_BALL, player);
|
||||
HP_BAR(opponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,20 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("TODO: Write Soundproof (Ability) test titles")
|
||||
SINGLE_BATTLE_TEST("Soundproof makes sound moves fail against the ability user")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(IsSoundMove(MOVE_BOOMBURST));
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_EXPLOUD) { Ability(ABILITY_SOUNDPROOF); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_BOOMBURST); }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponent, ABILITY_SOUNDPROOF);
|
||||
MESSAGE("The opposing Exploud's Soundproof blocks Boomburst!");
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BOOMBURST, player);
|
||||
HP_BAR(opponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
test/battle/item_effect/poke_flute.c
Normal file
43
test/battle/item_effect/poke_flute.c
Normal file
@ -0,0 +1,43 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
#include "constants/item_effects.h"
|
||||
|
||||
DOUBLE_BATTLE_TEST("Poke Flute heals all battlers from being asleep")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_POKE_FLUTE].battleUsage == EFFECT_ITEM_USE_POKE_FLUTE);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
||||
} WHEN {
|
||||
TURN { USE_ITEM(playerLeft, ITEM_POKE_FLUTE, partyIndex: 0); }
|
||||
} SCENE {
|
||||
MESSAGE("The Pokémon hearing the flute awoke!");
|
||||
} THEN {
|
||||
EXPECT_EQ(playerLeft->status1, STATUS1_NONE);
|
||||
EXPECT_EQ(playerRight->status1, STATUS1_NONE);
|
||||
EXPECT_EQ(opponentLeft->status1, STATUS1_NONE);
|
||||
EXPECT_EQ(opponentRight->status1, STATUS1_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Poke Flute does not heal battlers with Soundproof from being asleep")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_POKE_FLUTE].battleUsage == EFFECT_ITEM_USE_POKE_FLUTE);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
||||
PLAYER(SPECIES_EXPLOUD) { Ability(ABILITY_SOUNDPROOF); Status1(STATUS1_SLEEP); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
||||
OPPONENT(SPECIES_EXPLOUD) { Ability(ABILITY_SOUNDPROOF); Status1(STATUS1_SLEEP); }
|
||||
} WHEN {
|
||||
TURN { USE_ITEM(playerLeft, ITEM_POKE_FLUTE, partyIndex: 0); }
|
||||
} SCENE {
|
||||
MESSAGE("The Pokémon hearing the flute awoke!");
|
||||
} THEN {
|
||||
EXPECT_EQ(playerLeft->status1, STATUS1_NONE);
|
||||
EXPECT_NE(playerRight->status1, STATUS1_NONE);
|
||||
EXPECT_EQ(opponentLeft->status1, STATUS1_NONE);
|
||||
EXPECT_NE(opponentRight->status1, STATUS1_NONE);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user