mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
tests for dire claw ceaseless edge barb barrage
This commit is contained in:
parent
7ce5c5fc66
commit
8cf357a37b
@ -209,7 +209,7 @@ static const u8 sText_PkmnFellIntoNightmare[] = _("{B_DEF_NAME_WITH_PREFIX} fell
|
||||
static const u8 sText_PkmnLockedInNightmare[] = _("{B_ATK_NAME_WITH_PREFIX} is locked\nin a NIGHTMARE!");
|
||||
static const u8 sText_PkmnLaidCurse[] = _("{B_ATK_NAME_WITH_PREFIX} cut its own HP and\nlaid a CURSE on {B_DEF_NAME_WITH_PREFIX}!");
|
||||
static const u8 sText_PkmnAfflictedByCurse[] = _("{B_ATK_NAME_WITH_PREFIX} is afflicted\nby the CURSE!");
|
||||
static const u8 sText_SpikesScattered[] = _("Spikes were scattered all around\nthe opponent's side!");
|
||||
static const u8 sText_SpikesScattered[] = _("Spikes were scattered all around\n{B_DEF_TEAM2} team!");
|
||||
static const u8 sText_PkmnHurtBySpikes[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is hurt\nby spikes!");
|
||||
static const u8 sText_PkmnIdentified[] = _("{B_ATK_NAME_WITH_PREFIX} identified\n{B_DEF_NAME_WITH_PREFIX}!");
|
||||
static const u8 sText_PkmnPerishCountFell[] = _("{B_ATK_NAME_WITH_PREFIX}'s PERISH count\nfell to {B_BUFF1}!");
|
||||
|
@ -3783,7 +3783,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_SPIKES:
|
||||
if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_SPIKES))
|
||||
if (gSideTimers[GetBattlerSide(gEffectBattler)].spikesAmount < 3)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SPIKESSCATTERED;
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
|
43
test/move_effect_barb_barrage.c
Normal file
43
test/move_effect_barb_barrage.c
Normal file
@ -0,0 +1,43 @@
|
||||
#include "global.h"
|
||||
#include "test_battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
//ASSUME(gBattleMoves[MOVE_BARB_BARRAGE].effect == EFFECT_BARB_BARRAGE);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Barb Barrage inflicts poison")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_BARB_BARRAGE); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BARB_BARRAGE, player);
|
||||
HP_BAR(opponent);
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
|
||||
STATUS_ICON(opponent, poison: TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Barb Barrage's power doubles if the target is poisoned/badly poisoned", s16 damage)
|
||||
{
|
||||
u32 status1;
|
||||
PARAMETRIZE { status1 = 0; }
|
||||
PARAMETRIZE { status1 = STATUS1_POISON; }
|
||||
PARAMETRIZE { status1 = STATUS1_TOXIC_POISON; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) {Status1(status1);}
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_BARB_BARRAGE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BARB_BARRAGE, player);
|
||||
HP_BAR(opponent, captureDamage: &results[i].damage);
|
||||
} FINALLY {
|
||||
EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage);
|
||||
EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[2].damage);
|
||||
}
|
||||
}
|
138
test/move_effect_dire_claw.c
Normal file
138
test/move_effect_dire_claw.c
Normal file
@ -0,0 +1,138 @@
|
||||
#include "global.h"
|
||||
#include "test_battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gBattleMoves[MOVE_DIRE_CLAW].effect == EFFECT_DIRE_CLAW);
|
||||
}
|
||||
|
||||
// found by brute-force
|
||||
#define RNG_SLEEP 0xcb0
|
||||
#define RNG_POISON 0x2BE
|
||||
#define RNG_PARALYSIS 5
|
||||
|
||||
SINGLE_BATTLE_TEST("Dire Claw can inflict poison, paralysis or sleep")
|
||||
{
|
||||
u8 statusAnim;
|
||||
u32 rng;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = RNG_POISON; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = RNG_SLEEP; }
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_DIRE_CLAW); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player);
|
||||
HP_BAR(opponent);
|
||||
ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
||||
if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
else if (statusAnim == B_ANIM_STATUS_SLP) {
|
||||
STATUS_ICON(opponent, sleep: TRUE);
|
||||
}
|
||||
else if (statusAnim == B_ANIM_STATUS_PSN) {
|
||||
STATUS_ICON(opponent, poison: TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze poison/electric types respectively")
|
||||
{
|
||||
u8 statusAnim;
|
||||
u16 species;
|
||||
u32 rng;
|
||||
#if B_PARALYZE_ELECTRIC >= GEN_6
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_RAICHU; }
|
||||
#endif // B_PARALYZE_ELECTRIC
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = RNG_POISON; species = SPECIES_ARBOK;}
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(species);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_DIRE_CLAW); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player);
|
||||
HP_BAR(opponent);
|
||||
NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
||||
if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
NOT STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
else if (statusAnim == B_ANIM_STATUS_PSN) {
|
||||
NOT STATUS_ICON(opponent, poison: TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep pokemon with abilities preventing respective statuses")
|
||||
{
|
||||
u8 statusAnim;
|
||||
u16 species, ability;
|
||||
u32 rng;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_RAICHU; ability = ABILITY_LIGHTNING_ROD; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_JOLTEON; ability = ABILITY_VOLT_ABSORB; }
|
||||
#if P_GEN_4_POKEMON == TRUE
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_ELECTIVIRE; ability = ABILITY_MOTOR_DRIVE; }
|
||||
#endif // P_GEN_4_POKEMON
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = RNG_POISON; species = SPECIES_ZANGOOSE; ability = ABILITY_IMMUNITY; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = RNG_SLEEP; species = SPECIES_VIGOROTH; ability = ABILITY_VITAL_SPIRIT; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = RNG_SLEEP; species = SPECIES_HYPNO; ability = ABILITY_INSOMNIA; }
|
||||
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(species) {Ability(ability);}
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_DIRE_CLAW); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player);
|
||||
HP_BAR(opponent);
|
||||
NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
||||
if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
NOT STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
else if (statusAnim == B_ANIM_STATUS_SLP) {
|
||||
NOT STATUS_ICON(opponent, sleep: TRUE);
|
||||
}
|
||||
else if (statusAnim == B_ANIM_STATUS_PSN) {
|
||||
NOT STATUS_ICON(opponent, poison: TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep a mon which is already statused")
|
||||
{
|
||||
u8 statusAnim;
|
||||
u32 rng;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = RNG_POISON; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = RNG_SLEEP; }
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) {Status1(STATUS1_BURN);}
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_DIRE_CLAW); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player);
|
||||
HP_BAR(opponent);
|
||||
NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent);
|
||||
if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
NOT STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
else if (statusAnim == B_ANIM_STATUS_SLP) {
|
||||
NOT STATUS_ICON(opponent, sleep: TRUE);
|
||||
}
|
||||
else if (statusAnim == B_ANIM_STATUS_PSN) {
|
||||
NOT STATUS_ICON(opponent, poison: TRUE);
|
||||
}
|
||||
}
|
||||
}
|
117
test/move_effect_hit_set_entry_hazardss.c
Normal file
117
test/move_effect_hit_set_entry_hazardss.c
Normal file
@ -0,0 +1,117 @@
|
||||
#include "global.h"
|
||||
#include "test_battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gBattleMoves[MOVE_STONE_AXE].effect == EFFECT_HIT_SET_ENTRY_HAZARD);
|
||||
ASSUME(gBattleMoves[MOVE_CEASELESS_EDGE].effect == EFFECT_HIT_SET_ENTRY_HAZARD);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Stone Axe / Ceaseless Edge set up hazards after hitting the target")
|
||||
{
|
||||
u16 move;
|
||||
PARAMETRIZE {move = MOVE_STONE_AXE; }
|
||||
PARAMETRIZE {move = MOVE_CEASELESS_EDGE; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, move); }
|
||||
TURN { SWITCH(opponent, 1); }
|
||||
} SCENE {
|
||||
s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP);
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
||||
HP_BAR(opponent);
|
||||
if (move == MOVE_CEASELESS_EDGE) {
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
}
|
||||
else {
|
||||
MESSAGE("Pointed stones float in the air around the opposing team!");
|
||||
}
|
||||
MESSAGE("2 sent out Wobbuffet!");
|
||||
if (move == MOVE_CEASELESS_EDGE) {
|
||||
HP_BAR(opponent, damage: maxHP / 8);
|
||||
MESSAGE("Foe Wobbuffet is hurt by spikes!");
|
||||
}
|
||||
else {
|
||||
HP_BAR(opponent, damage: maxHP / 8);
|
||||
MESSAGE("Pointed stones dug into Foe Wobbuffet!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Ceaseless Edge can set up to 3 layers of Spikes")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_CEASELESS_EDGE); }
|
||||
TURN { MOVE(player, MOVE_CEASELESS_EDGE); }
|
||||
TURN { MOVE(player, MOVE_CEASELESS_EDGE); }
|
||||
TURN { MOVE(player, MOVE_CEASELESS_EDGE); }
|
||||
TURN { SWITCH(opponent, 1); }
|
||||
} SCENE {
|
||||
s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP);
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player);
|
||||
HP_BAR(opponent);
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player);
|
||||
HP_BAR(opponent);
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player);
|
||||
HP_BAR(opponent);
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player);
|
||||
HP_BAR(opponent);
|
||||
NOT MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
|
||||
MESSAGE("2 sent out Wynaut!");
|
||||
HP_BAR(opponent, damage: maxHP / 4);
|
||||
MESSAGE("Foe Wynaut is hurt by spikes!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Stone Axe can set up pointed stones only once")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_STONE_AXE); }
|
||||
TURN { MOVE(player, MOVE_STONE_AXE); }
|
||||
TURN { MOVE(player, MOVE_STONE_AXE); }
|
||||
TURN { MOVE(player, MOVE_STONE_AXE); }
|
||||
TURN { SWITCH(opponent, 1); }
|
||||
} SCENE {
|
||||
s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP);
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player);
|
||||
HP_BAR(opponent);
|
||||
MESSAGE("Pointed stones float in the air around the opposing team!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player);
|
||||
HP_BAR(opponent);
|
||||
NOT MESSAGE("Pointed stones float in the air around the opposing team!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player);
|
||||
HP_BAR(opponent);
|
||||
NOT MESSAGE("Pointed stones float in the air around the opposing team!");
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player);
|
||||
HP_BAR(opponent);
|
||||
NOT MESSAGE("Pointed stones float in the air around the opposing team!");
|
||||
|
||||
MESSAGE("2 sent out Wynaut!");
|
||||
HP_BAR(opponent, damage: maxHP / 8);
|
||||
MESSAGE("Pointed stones dug into Foe Wynaut!");
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ SINGLE_BATTLE_TEST("Spikes damage on switch in")
|
||||
s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP);
|
||||
for (count = 0; count < layers; ++count) {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player);
|
||||
MESSAGE("Spikes were scattered all around the opponent's side!");
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
}
|
||||
MESSAGE("2 sent out Wynaut!");
|
||||
HP_BAR(opponent, damage: maxHP / divisor);
|
||||
@ -51,11 +51,11 @@ SINGLE_BATTLE_TEST("Spikes fails after 3 layers")
|
||||
} SCENE {
|
||||
s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player);
|
||||
MESSAGE("Spikes were scattered all around the opponent's side!");
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player);
|
||||
MESSAGE("Spikes were scattered all around the opponent's side!");
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player);
|
||||
MESSAGE("Spikes were scattered all around the opponent's side!");
|
||||
MESSAGE("Spikes were scattered all around the opposing team!");
|
||||
MESSAGE("Wobbuffet used Spikes!");
|
||||
MESSAGE("But it failed!");
|
||||
MESSAGE("2 sent out Wynaut!");
|
||||
|
144
test/move_effect_tri_attack.c
Normal file
144
test/move_effect_tri_attack.c
Normal file
@ -0,0 +1,144 @@
|
||||
#include "global.h"
|
||||
#include "test_battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gBattleMoves[MOVE_TRI_ATTACK].effect == EFFECT_TRI_ATTACK);
|
||||
}
|
||||
|
||||
// found by brute-force
|
||||
#define RNG_PARALYSIS 0xcb0
|
||||
#define RNG_BURN 0x2BE
|
||||
#define RNG_FREEZE 5
|
||||
|
||||
SINGLE_BATTLE_TEST("Tri Attack can inflict paralysis, burn or freeze")
|
||||
{
|
||||
u8 statusAnim;
|
||||
u32 rng;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = RNG_BURN; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = RNG_FREEZE; }
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
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
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_RAICHU;}
|
||||
#endif // B_PARALYZE_ELECTRIC
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = RNG_BURN; species = SPECIES_ARCANINE; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = RNG_FREEZE; species = SPECIES_GLALIE; }
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(species);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TRI_ATTACK); }
|
||||
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;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_RAICHU; ability = ABILITY_LIGHTNING_ROD; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_JOLTEON; ability = ABILITY_VOLT_ABSORB; }
|
||||
#if P_GEN_4_POKEMON == TRUE
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; species = SPECIES_ELECTIVIRE; ability = ABILITY_MOTOR_DRIVE; }
|
||||
#endif // P_GEN_4_POKEMON
|
||||
#if P_GEN_7_POKEMON == TRUE
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = RNG_BURN; species = SPECIES_DEWPIDER; ability = ABILITY_WATER_BUBBLE; }
|
||||
#endif // P_GEN_7_POKEMON
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = RNG_BURN; species = SPECIES_SEAKING; ability = ABILITY_WATER_VEIL; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = RNG_FREEZE; species = SPECIES_CAMERUPT; ability = ABILITY_MAGMA_ARMOR; }
|
||||
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(species) {Ability(ability);}
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TRI_ATTACK); }
|
||||
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;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = RNG_PARALYSIS; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = RNG_BURN; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = RNG_FREEZE; }
|
||||
GIVEN {
|
||||
RNGSeed(rng);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) {Status1(STATUS1_SLEEP);}
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TRI_ATTACK); }
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
27
test/move_effect_venoshock.c
Normal file
27
test/move_effect_venoshock.c
Normal file
@ -0,0 +1,27 @@
|
||||
#include "global.h"
|
||||
#include "test_battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gBattleMoves[MOVE_VENOSHOCK].effect == EFFECT_VENOSHOCK);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Venoshock's power doubles if the target is poisoned/badly poisoned", s16 damage)
|
||||
{
|
||||
u32 status1;
|
||||
PARAMETRIZE { status1 = 0; }
|
||||
PARAMETRIZE { status1 = STATUS1_POISON; }
|
||||
PARAMETRIZE { status1 = STATUS1_TOXIC_POISON; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) {Status1(status1);}
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_VENOSHOCK); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_VENOSHOCK, player);
|
||||
HP_BAR(opponent, captureDamage: &results[i].damage);
|
||||
} FINALLY {
|
||||
EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage);
|
||||
EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[2].damage);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user