2023-03-23 12:29:04 +01:00
|
|
|
#include "global.h"
|
|
|
|
#include "test_battle.h"
|
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
|
|
|
ASSUME(gBattleMoves[MOVE_TRI_ATTACK].effect == EFFECT_TRI_ATTACK);
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Tri Attack can inflict paralysis, burn or freeze")
|
|
|
|
{
|
|
|
|
u8 statusAnim;
|
2023-03-27 18:32:16 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; }
|
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; }
|
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; }
|
|
|
|
PASSES_RANDOMLY(1, 3, RNG_TRI_ATTACK);
|
2023-03-23 12:29:04 +01:00
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_TRI_ATTACK); }
|
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
|
|
|
if (statusAnim == B_ANIM_STATUS_BRN) {
|
|
|
|
STATUS_ICON(opponent, burn: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
|
|
|
STATUS_ICON(opponent, freeze: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
|
|
|
STATUS_ICON(opponent, paralysis: TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze electric/fire/ice types respectively")
|
|
|
|
{
|
|
|
|
u8 statusAnim;
|
|
|
|
u16 species;
|
|
|
|
u32 rng;
|
|
|
|
#if B_PARALYZE_ELECTRIC >= GEN_6
|
2023-06-23 11:38:18 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_RAICHU; }
|
2023-03-23 12:29:04 +01:00
|
|
|
#endif // B_PARALYZE_ELECTRIC
|
2023-03-27 18:32:16 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_ARCANINE; }
|
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; species = SPECIES_GLALIE; }
|
2023-03-23 12:29:04 +01:00
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(species);
|
|
|
|
} WHEN {
|
2023-03-27 18:32:16 +02:00
|
|
|
TURN { MOVE(player, MOVE_TRI_ATTACK, WITH_RNG(RNG_TRI_ATTACK, rng)); }
|
2023-03-23 12:29:04 +01:00
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
|
|
|
if (statusAnim == B_ANIM_STATUS_BRN) {
|
|
|
|
NOT STATUS_ICON(opponent, burn: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
|
|
|
NOT STATUS_ICON(opponent, freeze: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
|
|
|
NOT STATUS_ICON(opponent, paralysis: TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze pokemon with abilities preventing respective statuses")
|
|
|
|
{
|
|
|
|
u8 statusAnim;
|
|
|
|
u16 species, ability;
|
|
|
|
u32 rng;
|
2023-03-27 18:32:16 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_RAICHU; ability = ABILITY_LIGHTNING_ROD; }
|
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_JOLTEON; ability = ABILITY_VOLT_ABSORB; }
|
2023-03-23 12:29:04 +01:00
|
|
|
#if P_GEN_4_POKEMON == TRUE
|
2023-03-27 18:32:16 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_ELECTIVIRE; ability = ABILITY_MOTOR_DRIVE; }
|
2023-03-23 12:29:04 +01:00
|
|
|
#endif // P_GEN_4_POKEMON
|
|
|
|
#if P_GEN_7_POKEMON == TRUE
|
2023-03-27 18:32:16 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_DEWPIDER; ability = ABILITY_WATER_BUBBLE; }
|
2023-03-23 12:29:04 +01:00
|
|
|
#endif // P_GEN_7_POKEMON
|
2023-03-27 18:32:16 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_SEAKING; ability = ABILITY_WATER_VEIL; }
|
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; species = SPECIES_CAMERUPT; ability = ABILITY_MAGMA_ARMOR; }
|
2023-03-23 12:29:04 +01:00
|
|
|
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
2023-06-23 11:38:18 +02:00
|
|
|
OPPONENT(species) { Ability(ability); }
|
2023-03-23 12:29:04 +01:00
|
|
|
} WHEN {
|
2023-03-27 18:32:16 +02:00
|
|
|
TURN { MOVE(player, MOVE_TRI_ATTACK, WITH_RNG(RNG_TRI_ATTACK, rng)); }
|
2023-03-23 12:29:04 +01:00
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
|
|
|
if (statusAnim == B_ANIM_STATUS_BRN) {
|
|
|
|
NOT STATUS_ICON(opponent, burn: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
|
|
|
NOT STATUS_ICON(opponent, freeze: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
|
|
|
NOT STATUS_ICON(opponent, paralysis: TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze a mon which is already statused")
|
|
|
|
{
|
|
|
|
u8 statusAnim;
|
|
|
|
u32 rng;
|
2023-03-27 18:32:16 +02:00
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; }
|
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; }
|
|
|
|
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; }
|
2023-03-23 12:29:04 +01:00
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
2023-06-23 11:38:18 +02:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
2023-03-23 12:29:04 +01:00
|
|
|
} WHEN {
|
2023-03-27 18:32:16 +02:00
|
|
|
TURN { MOVE(player, MOVE_TRI_ATTACK, WITH_RNG(RNG_TRI_ATTACK, rng)); }
|
2023-03-23 12:29:04 +01:00
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
|
|
|
if (statusAnim == B_ANIM_STATUS_BRN) {
|
|
|
|
NOT STATUS_ICON(opponent, burn: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
|
|
|
NOT STATUS_ICON(opponent, freeze: TRUE);
|
|
|
|
}
|
|
|
|
else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
|
|
|
NOT STATUS_ICON(opponent, paralysis: TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|