fix tests when B_USE_FROSTBITE is TRUE (#4986)
This commit is contained in:
parent
cfcac0b0f9
commit
0625c90277
6 changed files with 52 additions and 18 deletions
|
@ -1006,6 +1006,8 @@ void SendOut(u32 sourceLine, struct BattlePokemon *, u32 partyIndex);
|
|||
// Static const is needed to make the modern compiler put the pattern variable in the .rodata section, instead of putting it on stack(which can break the game).
|
||||
#define MESSAGE(pattern) do {static const u8 msg[] = _(pattern); QueueMessage(__LINE__, msg);} while (0)
|
||||
#define STATUS_ICON(battler, status) QueueStatus(__LINE__, battler, (struct StatusEventContext) { status })
|
||||
#define FREEZE_OR_FROSTBURN_STATUS(battler, isFrostbite) \
|
||||
(B_USE_FROSTBITE ? STATUS_ICON(battler, frostbite: isFrostbite) : STATUS_ICON(battler, freeze: isFrostbite))
|
||||
|
||||
enum QueueGroupType
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ SINGLE_BATTLE_TEST("Shaymin-Sky reverts to Shaymin-Land when frozen or frostbitt
|
|||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
if (move == MOVE_POWDER_SNOW) {
|
||||
STATUS_ICON(player, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(player, TRUE);
|
||||
NOT HP_BAR(player); // Regression caused by Mimikyu form change
|
||||
MESSAGE("Shaymin transformed!");
|
||||
} else {
|
||||
|
|
|
@ -72,7 +72,7 @@ SINGLE_BATTLE_TEST("Rawst and Lum Berries cure burn")
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Aspear and Lum Berries cure freeze")
|
||||
SINGLE_BATTLE_TEST("Aspear and Lum Berries cure freeze or frostbite")
|
||||
{
|
||||
u16 item;
|
||||
|
||||
|
@ -88,9 +88,9 @@ SINGLE_BATTLE_TEST("Aspear and Lum Berries cure freeze")
|
|||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ICE_PUNCH, player);
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent);
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
||||
STATUS_ICON(opponent, freeze: FALSE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,11 @@ ASSUMPTIONS
|
|||
ASSUME(gMovesInfo[MOVE_BLIZZARD].accuracy == 70);
|
||||
}
|
||||
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Powder Snow inflicts frostbite")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Powder Snow inflicts freeze")
|
||||
#endif
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
|
@ -18,11 +22,15 @@ SINGLE_BATTLE_TEST("Powder Snow inflicts freeze")
|
|||
ANIMATION(ANIM_TYPE_MOVE, MOVE_POWDER_SNOW, player);
|
||||
HP_BAR(opponent);
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent);
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Powder Snow cannot frostbite an Ice-type Pokémon")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Powder Snow cannot freeze an Ice-type Pokémon")
|
||||
#endif
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gSpeciesInfo[SPECIES_SNORUNT].types[0] == TYPE_ICE);
|
||||
|
@ -35,7 +43,7 @@ SINGLE_BATTLE_TEST("Powder Snow cannot freeze an Ice-type Pokémon")
|
|||
HP_BAR(opponent);
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent);
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,10 +76,18 @@ SINGLE_BATTLE_TEST("Blizzard bypasses accuracy checks in Hail and Snow")
|
|||
}
|
||||
|
||||
#if B_STATUS_TYPE_IMMUNITY > GEN_1
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Freezing Glare should frostbite Psychic-types")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Freezing Glare should freeze Psychic-types")
|
||||
#endif
|
||||
#else
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Freezing Glare shouldn't freeze Psychic-types")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Freezing Glare shouldn't freeze Psychic-types")
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gSpeciesInfo[SPECIES_ARTICUNO_GALARIAN].types[0] == TYPE_PSYCHIC);
|
||||
|
@ -86,11 +102,11 @@ SINGLE_BATTLE_TEST("Freezing Glare shouldn't freeze Psychic-types")
|
|||
HP_BAR(opponent);
|
||||
#if B_STATUS_TYPE_IMMUNITY > GEN_1
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent);
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
#else
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent);
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -6,7 +6,11 @@ ASSUMPTIONS
|
|||
ASSUME(MoveHasAdditionalEffect(MOVE_TRI_ATTACK, MOVE_EFFECT_TRI_ATTACK) == TRUE);
|
||||
}
|
||||
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Tri Attack can inflict paralysis, burn or frostbite")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Tri Attack can inflict paralysis, burn or freeze")
|
||||
#endif
|
||||
{
|
||||
u8 statusAnim;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; }
|
||||
|
@ -26,14 +30,18 @@ SINGLE_BATTLE_TEST("Tri Attack can inflict paralysis, burn or freeze")
|
|||
if (statusAnim == B_ANIM_STATUS_BRN) {
|
||||
STATUS_ICON(opponent, burn: TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/frostbite electric/fire/ice types respectively")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze electric/fire/ice types respectively")
|
||||
#endif
|
||||
{
|
||||
u8 statusAnim;
|
||||
u16 species;
|
||||
|
@ -42,7 +50,7 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze electric/fire/ice typ
|
|||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_RAICHU; }
|
||||
#endif // B_PARALYZE_ELECTRIC
|
||||
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; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE_OR_FROSTBITE; species = SPECIES_GLALIE; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(species);
|
||||
|
@ -57,7 +65,7 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze electric/fire/ice typ
|
|||
if (statusAnim == B_ANIM_STATUS_BRN) {
|
||||
STATUS_ICON(opponent, burn: TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
|
@ -65,7 +73,11 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze electric/fire/ice typ
|
|||
}
|
||||
}
|
||||
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/frostbite pokemon with abilities preventing respective statuses")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze pokemon with abilities preventing respective statuses")
|
||||
#endif
|
||||
{
|
||||
u8 statusAnim;
|
||||
u16 species, ability;
|
||||
|
@ -75,8 +87,8 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze pokemon with abilitie
|
|||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_DEWPIDER; ability = ABILITY_WATER_BUBBLE; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_SEAKING; ability = ABILITY_WATER_VEIL; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; species = SPECIES_CAMERUPT; ability = ABILITY_MAGMA_ARMOR; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE_OR_FROSTBITE; species = SPECIES_CAMERUPT; ability = ABILITY_MAGMA_ARMOR; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE_OR_FROSTBITE; species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; }
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
|
@ -92,7 +104,7 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze pokemon with abilitie
|
|||
if (statusAnim == B_ANIM_STATUS_BRN) {
|
||||
STATUS_ICON(opponent, burn: TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
|
@ -100,13 +112,17 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze pokemon with abilitie
|
|||
}
|
||||
}
|
||||
|
||||
#if B_USE_FROSTBITE == TRUE
|
||||
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/frostbite a mon which is already statused")
|
||||
#else
|
||||
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze a mon which is already statused")
|
||||
#endif
|
||||
{
|
||||
u8 statusAnim;
|
||||
u32 rng;
|
||||
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; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE_OR_FROSTBITE; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
|
||||
|
@ -121,7 +137,7 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze a mon which is alread
|
|||
if (statusAnim == B_ANIM_STATUS_BRN) {
|
||||
STATUS_ICON(opponent, burn: TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_FRZ) {
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
} else if (statusAnim == B_ANIM_STATUS_PRZ) {
|
||||
STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ ASSUMPTIONS
|
|||
{
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_THUNDER_FANG, MOVE_EFFECT_PARALYSIS) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_THUNDER_FANG, MOVE_EFFECT_FLINCH) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_ICE_FANG, MOVE_EFFECT_FREEZE) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_ICE_FANG, MOVE_EFFECT_FREEZE_OR_FROSTBITE) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_ICE_FANG, MOVE_EFFECT_FLINCH) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_FIRE_FANG, MOVE_EFFECT_BURN) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_FIRE_FANG, MOVE_EFFECT_FLINCH) == TRUE);
|
||||
|
@ -33,7 +33,7 @@ SINGLE_BATTLE_TEST("Thunder, Ice and Fire Fang inflict status 10% of the time")
|
|||
STATUS_ICON(opponent, paralysis: TRUE);
|
||||
} if (move == MOVE_ICE_FANG) {
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent);
|
||||
STATUS_ICON(opponent, freeze: TRUE);
|
||||
FREEZE_OR_FROSTBURN_STATUS(opponent, TRUE);
|
||||
} if (move == MOVE_FIRE_FANG) {
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_BRN, opponent);
|
||||
STATUS_ICON(opponent, burn: TRUE);
|
||||
|
|
Loading…
Reference in a new issue