Fixes Hyperspace Fury not breaking protection (#8999)
This commit is contained in:
parent
5308124191
commit
7722ebf470
@ -3471,7 +3471,7 @@ void SetMoveEffect(u32 battler, u32 effectBattler, enum MoveEffect moveEffect, c
|
|||||||
if (i)
|
if (i)
|
||||||
{
|
{
|
||||||
BattleScriptPush(battleScript);
|
BattleScriptPush(battleScript);
|
||||||
if (gCurrentMove == MOVE_HYPERSPACE_FURY)
|
if (GetMoveEffect(gCurrentMove) == EFFECT_HYPERSPACE_FURY)
|
||||||
gBattlescriptCurrInstr = BattleScript_HyperspaceFuryRemoveProtect;
|
gBattlescriptCurrInstr = BattleScript_HyperspaceFuryRemoveProtect;
|
||||||
else
|
else
|
||||||
gBattlescriptCurrInstr = BattleScript_MoveEffectFeint;
|
gBattlescriptCurrInstr = BattleScript_MoveEffectFeint;
|
||||||
|
|||||||
@ -15981,7 +15981,9 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
|||||||
.metronomeBanned = TRUE,
|
.metronomeBanned = TRUE,
|
||||||
.sketchBanned = (B_SKETCH_BANS >= GEN_9),
|
.sketchBanned = (B_SKETCH_BANS >= GEN_9),
|
||||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||||
// Feint move effect handled in script as it goes before animation
|
.moveEffect = MOVE_EFFECT_FEINT, // TODO: Is this supposed to happen before the attack animation?
|
||||||
|
},
|
||||||
|
{
|
||||||
.moveEffect = MOVE_EFFECT_DEF_MINUS_1,
|
.moveEffect = MOVE_EFFECT_DEF_MINUS_1,
|
||||||
.self = TRUE,
|
.self = TRUE,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
#include "global.h"
|
|
||||||
#include "test/battle.h"
|
|
||||||
|
|
||||||
TO_DO_BATTLE_TEST("TODO: Write Hyperspace Fury (Move Effect) test titles")
|
|
||||||
97
test/battle/move_effects_combined/hyperspace_fury.c
Normal file
97
test/battle/move_effects_combined/hyperspace_fury.c
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "test/battle.h"
|
||||||
|
|
||||||
|
ASSUMPTIONS
|
||||||
|
{
|
||||||
|
ASSUME(GetMoveEffect(MOVE_HYPERSPACE_FURY) == EFFECT_HYPERSPACE_FURY);
|
||||||
|
ASSUME(MoveHasAdditionalEffect(MOVE_HYPERSPACE_FURY, MOVE_EFFECT_FEINT));
|
||||||
|
ASSUME(MoveHasAdditionalEffectSelf(MOVE_HYPERSPACE_FURY, MOVE_EFFECT_DEF_MINUS_1));
|
||||||
|
ASSUME(GetMoveEffect(MOVE_PROTECT) == EFFECT_PROTECT);
|
||||||
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Hyperspace Fury fails if used by a Pokémon other than Hoopa Unbound")
|
||||||
|
{
|
||||||
|
u32 species;
|
||||||
|
PARAMETRIZE { species = SPECIES_WOBBUFFET; }
|
||||||
|
PARAMETRIZE { species = SPECIES_HOOPA_CONFINED; }
|
||||||
|
PARAMETRIZE { species = SPECIES_HOOPA_UNBOUND; }
|
||||||
|
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(species);
|
||||||
|
OPPONENT(SPECIES_REGIROCK);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(player, MOVE_HYPERSPACE_FURY); }
|
||||||
|
} SCENE {
|
||||||
|
switch (species)
|
||||||
|
{
|
||||||
|
case SPECIES_HOOPA_UNBOUND:
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPERSPACE_FURY, player);
|
||||||
|
break;
|
||||||
|
case SPECIES_HOOPA_CONFINED:
|
||||||
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPERSPACE_FURY, player);
|
||||||
|
MESSAGE("But Hoopa can't use it the way it is now!");
|
||||||
|
break;
|
||||||
|
case SPECIES_WOBBUFFET:
|
||||||
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPERSPACE_FURY, player);
|
||||||
|
MESSAGE("But Wobbuffet can't use the move!");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPERSPACE_FURY, player);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DOUBLE_BATTLE_TEST("Hyperspace Fury hits the target through Protect and breaks it")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_HOOPA_UNBOUND);
|
||||||
|
PLAYER(SPECIES_WOBBUFFET);
|
||||||
|
OPPONENT(SPECIES_REGIROCK);
|
||||||
|
OPPONENT(SPECIES_WYNAUT);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(opponentLeft, MOVE_PROTECT); MOVE(playerLeft, MOVE_HYPERSPACE_FURY, target: opponentLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); }
|
||||||
|
} SCENE {
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_PROTECT, opponentLeft);
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPERSPACE_FURY, playerLeft);
|
||||||
|
HP_BAR(opponentLeft);
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, playerRight);
|
||||||
|
HP_BAR(opponentLeft);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Hyperspace Fury lowers the user's Defense by 1 stage after hitting the target")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_HOOPA_UNBOUND);
|
||||||
|
OPPONENT(SPECIES_REGIROCK);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(player, MOVE_HYPERSPACE_FURY); }
|
||||||
|
} SCENE {
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPERSPACE_FURY, player);
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(player->statStages[STAT_DEF], DEFAULT_STAT_STAGE - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DOUBLE_BATTLE_TEST("Hyperspace Fury breaks protection and lowers the user's Defense by 1 stage")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_HOOPA_UNBOUND);
|
||||||
|
PLAYER(SPECIES_WOBBUFFET);
|
||||||
|
OPPONENT(SPECIES_REGIROCK);
|
||||||
|
OPPONENT(SPECIES_WYNAUT);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(opponentLeft, MOVE_PROTECT); MOVE(playerLeft, MOVE_HYPERSPACE_FURY, target: opponentLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); }
|
||||||
|
} SCENE {
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_PROTECT, opponentLeft);
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPERSPACE_FURY, playerLeft);
|
||||||
|
HP_BAR(opponentLeft);
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, playerRight);
|
||||||
|
HP_BAR(opponentLeft);
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(playerLeft->statStages[STAT_DEF], DEFAULT_STAT_STAGE - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user