sovereignx/test/battle/form_change/begin_battle.c
psf 2597d8a35a
Updated species defines (#5075)
* First version of new defines

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Removed old defines

* Removed old defines

* Removed old defines and cleaned up some macros

* Undid changes to documentation
Deleted unused defines
Updated defines
Fixed tests
fixed docs

* moved note to top per https://github.com/rh-hideout/pokeemerald-expansion/pull/5075\#discussion_r1783641599

* fixed alignment per https://github.com/rh-hideout/pokeemerald-expansion/pull/5075\#pullrequestreview-2341613591
2024-10-02 18:24:57 -03:00

76 lines
2.4 KiB
C

#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Xerneas changes into Active Form upon battle start")
{
GIVEN {
PLAYER(SPECIES_XERNEAS_NEUTRAL);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_CELEBRATE); }
} THEN {
EXPECT_EQ(player->species, SPECIES_XERNEAS_ACTIVE);
}
}
SINGLE_BATTLE_TEST("Zacian changes into its Crowned Form when holding the Rusted Sword upon battle start")
{
u16 item;
PARAMETRIZE { item = ITEM_NONE; }
PARAMETRIZE { item = ITEM_RUSTED_SWORD; }
GIVEN {
PLAYER(SPECIES_ZACIAN_HERO) { Item(item); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_CELEBRATE); }
} THEN {
if (item == ITEM_NONE)
EXPECT_EQ(player->species, SPECIES_ZACIAN_HERO);
else
EXPECT_EQ(player->species, SPECIES_ZACIAN_CROWNED);
}
}
SINGLE_BATTLE_TEST("Zacian's Iron Head becomes Behemoth Blade upon form change")
{
GIVEN {
PLAYER(SPECIES_ZACIAN_HERO) { Item(ITEM_RUSTED_SWORD); Moves(MOVE_IRON_HEAD, MOVE_CELEBRATE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_CELEBRATE); }
} THEN {
ASSUME(player->species == SPECIES_ZACIAN_CROWNED); // Assumes form change worked.
EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BLADE);
}
}
SINGLE_BATTLE_TEST("Zamazenta changes into its Crowned Form when holding the Rusted Shield upon battle start")
{
u16 item;
PARAMETRIZE { item = ITEM_NONE; }
PARAMETRIZE { item = ITEM_RUSTED_SHIELD; }
GIVEN {
PLAYER(SPECIES_ZAMAZENTA_HERO) { Item(item); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_CELEBRATE); }
} THEN {
if (item == ITEM_NONE)
EXPECT_EQ(player->species, SPECIES_ZAMAZENTA_HERO);
else
EXPECT_EQ(player->species, SPECIES_ZAMAZENTA_CROWNED);
}
}
SINGLE_BATTLE_TEST("Zamazenta's Iron Head becomes Behemoth Bash upon form change")
{
GIVEN {
PLAYER(SPECIES_ZAMAZENTA_HERO) { Item(ITEM_RUSTED_SHIELD); Moves(MOVE_IRON_HEAD, MOVE_CELEBRATE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_CELEBRATE); }
} THEN {
ASSUME(player->species == SPECIES_ZAMAZENTA_CROWNED); // Assumes form change worked.
EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BASH);
}
}