sovereignx/test/battle/move_effect/octolock.c

134 lines
4.7 KiB
C
Raw Normal View History

2023-10-13 13:08:44 +01:00
#include "global.h"
#include "test/battle.h"
2023-10-18 19:25:34 +01:00
SINGLE_BATTLE_TEST("Octolock decreases Defense and Sp. Def by at the end of the turn")
2023-10-13 13:08:44 +01:00
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_OCTOLOCK); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OCTOLOCK, player);
MESSAGE("Foe Wobbuffet can no longer escape because of Octolock!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wobbuffet's Defense fell!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wobbuffet's Sp. Def fell!");
}
}
2023-10-18 19:25:34 +01:00
SINGLE_BATTLE_TEST("Octolock reduction is prevented by Clear Body, White Smoke and Full Metal Body")
2023-10-13 13:08:44 +01:00
{
u32 species;
u32 ability;
PARAMETRIZE { species = SPECIES_BELDUM; ability = ABILITY_CLEAR_BODY; }
PARAMETRIZE { species = SPECIES_TORKOAL; ability = ABILITY_WHITE_SMOKE; }
PARAMETRIZE { species = SPECIES_SOLGALEO; ability = ABILITY_FULL_METAL_BODY; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(species) { Ability(ability); }
} WHEN {
TURN { MOVE(player, MOVE_OCTOLOCK); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OCTOLOCK, player);
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
if (species == SPECIES_BELDUM)
{
MESSAGE("Foe Beldum can no longer escape because of Octolock!");
ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY);
MESSAGE("Foe Beldum's Clear Body prevents stat loss!");
2023-10-25 09:18:59 +01:00
NONE_OF {
MESSAGE("Foe Beldum's Defense fell!");
MESSAGE("Foe Beldum's Sp. Def fell!");
}
2023-10-13 13:08:44 +01:00
}
else if (species == SPECIES_TORKOAL)
{
MESSAGE("Foe Torkoal can no longer escape because of Octolock!");
ABILITY_POPUP(opponent, ABILITY_WHITE_SMOKE);
MESSAGE("Foe Torkoal's White Smoke prevents stat loss!");
2023-10-25 09:18:59 +01:00
NONE_OF {
MESSAGE("Foe Torkoal's Defense fell!");
MESSAGE("Foe Torkoal's Sp. Def fell!");
}
2023-10-13 13:08:44 +01:00
}
else if (species == SPECIES_SOLGALEO)
{
MESSAGE("Foe Solgaleo can no longer escape because of Octolock!");
ABILITY_POPUP(opponent, ABILITY_FULL_METAL_BODY);
MESSAGE("Foe Solgaleo's Full Metal Body prevents stat loss!");
2023-10-25 09:18:59 +01:00
NONE_OF {
MESSAGE("Foe Solgaleo's Defense fell!");
MESSAGE("Foe Solgaleo's Sp. Def fell!");
}
2023-10-13 13:08:44 +01:00
}
}
}
2023-10-18 19:25:34 +01:00
SINGLE_BATTLE_TEST("Octolock Defense reduction is prevented by Big Pecks")
2023-10-13 13:08:44 +01:00
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_PIDGEY) { Ability(ABILITY_BIG_PECKS); }
} WHEN {
TURN { MOVE(player, MOVE_OCTOLOCK); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OCTOLOCK, player);
MESSAGE("Foe Pidgey can no longer escape because of Octolock!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Pidgey's Defense fell!");
ABILITY_POPUP(opponent, ABILITY_BIG_PECKS);
2023-10-18 19:25:34 +01:00
MESSAGE("Foe Pidgey's Big Pecks prevents Defense loss!");
MESSAGE("Foe Pidgey's Sp. Def fell!");
2023-10-13 13:08:44 +01:00
}
}
2023-10-18 19:25:34 +01:00
SINGLE_BATTLE_TEST("Octolock reduction is prevented by Clear Amulet")
2023-10-13 13:08:44 +01:00
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_CLEAR_AMULET); }
} WHEN {
TURN { MOVE(player, MOVE_OCTOLOCK); }
2023-10-18 19:25:34 +01:00
TURN {}
2023-10-13 13:08:44 +01:00
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OCTOLOCK, player);
MESSAGE("Foe Wobbuffet can no longer escape because of Octolock!");
2023-10-18 19:25:34 +01:00
MESSAGE("Foe Wobbuffet's Clear Amulet prevents its stats from being lowered!");
2023-10-25 09:18:59 +01:00
NONE_OF {
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wobbuffet's Defense fell!");
MESSAGE("Foe Wobbuffet's Sp. Def fell!");
}
2023-10-13 13:08:44 +01:00
}
}
2023-10-18 19:25:34 +01:00
SINGLE_BATTLE_TEST("Octolock will not decrease Defense and Sp. Def further then minus six")
{
u8 j;
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_OCTOLOCK); }
for (j = 0; j < 6; j++)
TURN {}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OCTOLOCK, player);
2023-10-20 21:51:30 +01:00
for (j = 0; j < 5; j++) {
2023-10-18 19:25:34 +01:00
MESSAGE("Foe Wobbuffet's Defense fell!");
MESSAGE("Foe Wobbuffet's Sp. Def fell!");
2023-10-20 21:51:30 +01:00
}
2023-10-18 19:25:34 +01:00
MESSAGE("Foe Wobbuffet's Defense won't go lower!");
MESSAGE("Foe Wobbuffet's Sp. Def won't go lower!");
2023-10-25 09:18:59 +01:00
NONE_OF {
MESSAGE("Foe Wobbuffet's Defense fell!");
MESSAGE("Foe Wobbuffet's Sp. Def fell!");
}
2023-10-18 19:25:34 +01:00
}
}