mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Ultra Burst tests
This commit is contained in:
parent
48d6fe2e64
commit
2e1b137183
121
test/battle/form_change/ultra_burst.c
Normal file
121
test/battle/form_change/ultra_burst.c
Normal file
@ -0,0 +1,121 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
SINGLE_BATTLE_TEST("Dusk Mane Necrozma can Ultra Burst holding Ultranecrozium Z")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_NECROZMA_DUSK_MANE) { Item(ITEM_ULTRANECROZIUM_Z); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_CELEBRATE, ultraBurst: TRUE); }
|
||||
} SCENE {
|
||||
MESSAGE("Bright light is about to burst out of Necrozma!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ULTRA_BURST, player);
|
||||
MESSAGE("Necrozma regained its true power through Ultra Burst!");
|
||||
} THEN {
|
||||
EXPECT_EQ(player->species, SPECIES_NECROZMA_ULTRA);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Ultra Burst's order is determined by Speed - opponent faster")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_NECROZMA_DUSK_MANE) { Item(ITEM_ULTRANECROZIUM_Z); Speed(1); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(3); }
|
||||
OPPONENT(SPECIES_NECROZMA_DAWN_WINGS) { Item(ITEM_ULTRANECROZIUM_Z); Speed(3); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(4); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponentLeft, MOVE_CELEBRATE, ultraBurst: TRUE); MOVE(playerLeft, MOVE_CELEBRATE, ultraBurst: TRUE); }
|
||||
} SCENE {
|
||||
MESSAGE("Bright light is about to burst out of Foe Necrozma!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ULTRA_BURST, opponentLeft);
|
||||
MESSAGE("Foe Necrozma regained its true power through Ultra Burst!");
|
||||
MESSAGE("Bright light is about to burst out of Necrozma!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ULTRA_BURST, playerLeft);
|
||||
MESSAGE("Necrozma regained its true power through Ultra Burst!");
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Ultra Burst's order is determined by Speed - player faster")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_NECROZMA_DUSK_MANE) { Item(ITEM_ULTRANECROZIUM_Z); Speed(5); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(3); }
|
||||
OPPONENT(SPECIES_NECROZMA_DAWN_WINGS) { Item(ITEM_ULTRANECROZIUM_Z); Speed(2); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(4); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponentLeft, MOVE_CELEBRATE, ultraBurst: TRUE); MOVE(playerLeft, MOVE_CELEBRATE, ultraBurst: TRUE); }
|
||||
} SCENE {
|
||||
MESSAGE("Bright light is about to burst out of Necrozma!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ULTRA_BURST, playerLeft);
|
||||
MESSAGE("Necrozma regained its true power through Ultra Burst!");
|
||||
MESSAGE("Bright light is about to burst out of Foe Necrozma!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ULTRA_BURST, opponentLeft);
|
||||
MESSAGE("Foe Necrozma regained its true power through Ultra Burst!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Ultra Burst affects turn order")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(B_MEGA_EVO_TURN_ORDER);
|
||||
PLAYER(SPECIES_NECROZMA_DUSK_MANE) { Item(ITEM_ULTRANECROZIUM_Z); Speed(105); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(106); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_CELEBRATE, ultraBurst: TRUE); }
|
||||
} SCENE {
|
||||
MESSAGE("Necrozma used Celebrate!");
|
||||
MESSAGE("Foe Wobbuffet used Celebrate!");
|
||||
} THEN {
|
||||
ASSUME(player->speed == 205);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Ultra Burst happens after switching, but before Focus Punch-like Moves")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gBattleMoves[MOVE_FOCUS_PUNCH].effect == EFFECT_FOCUS_PUNCH);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
PLAYER(SPECIES_NECROZMA_DUSK_MANE) { Item(ITEM_ULTRANECROZIUM_Z); }
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { SWITCH(opponentRight, 2); MOVE(playerRight, MOVE_FOCUS_PUNCH, ultraBurst: TRUE, target: opponentLeft); MOVE(playerLeft, MOVE_FOCUS_PUNCH, target: opponentLeft); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
MESSAGE("2 withdrew Wobbuffet!");
|
||||
MESSAGE("2 sent out Wobbuffet!");
|
||||
|
||||
MESSAGE("Bright light is about to burst out of Necrozma!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ULTRA_BURST, playerRight);
|
||||
MESSAGE("Necrozma regained its true power through Ultra Burst!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, playerRight);
|
||||
MESSAGE("Necrozma is tightening its focus!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FOCUS_PUNCH_SETUP, playerLeft);
|
||||
MESSAGE("Wobbuffet is tightening its focus!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Ultra Burst and Mega Evolution can happen on the same turn")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_NECROZMA_DUSK_MANE) { Item(ITEM_ULTRANECROZIUM_Z); Speed(3); }
|
||||
OPPONENT(SPECIES_GARDEVOIR) { Item(ITEM_GARDEVOIRITE); Speed(2); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_CELEBRATE, ultraBurst: TRUE); MOVE(opponent, MOVE_CELEBRATE, megaEvolve: TRUE); }
|
||||
} SCENE {
|
||||
MESSAGE("Bright light is about to burst out of Necrozma!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ULTRA_BURST, player);
|
||||
MESSAGE("Necrozma regained its true power through Ultra Burst!");
|
||||
|
||||
MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent);
|
||||
MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!");
|
||||
} THEN {
|
||||
EXPECT_EQ(player->species, SPECIES_NECROZMA_ULTRA);
|
||||
EXPECT_EQ(opponent->species, SPECIES_GARDEVOIR_MEGA);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user