Skip to content

Commit

Permalink
fix psychic terrain blocking moves it shouldnt block (#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
DizzyEggg authored Nov 3, 2023
1 parent 90d9334 commit 8b359c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -3824,6 +3824,8 @@ u8 AtkCanceller_UnableToUseMove2(void)
if (gFieldStatuses & STATUS_FIELD_PSYCHIC_TERRAIN
&& IsBattlerGrounded(gBattlerTarget)
&& GetChosenMovePriority(gBattlerAttacker) > 0
&& gBattleMoves[gCurrentMove].target != MOVE_TARGET_ALL_BATTLERS
&& gBattleMoves[gCurrentMove].target != MOVE_TARGET_OPPONENTS_FIELD
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget))
{
CancelMultiTurnMoves(gBattlerAttacker);
Expand Down
3 changes: 0 additions & 3 deletions test/battle/terrain/psychic.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the

SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all battlers")
{
KNOWN_FAILING;
GIVEN {
PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); }
OPPONENT(SPECIES_WOBBUFFET);
Expand All @@ -93,7 +92,6 @@ SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all

SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all opponents")
{
KNOWN_FAILING;
GIVEN {
PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); }
OPPONENT(SPECIES_WOBBUFFET);
Expand Down Expand Up @@ -124,7 +122,6 @@ DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all

SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority field moves")
{
KNOWN_FAILING;
GIVEN {
PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); }
OPPONENT(SPECIES_WOBBUFFET);
Expand Down

0 comments on commit 8b359c2

Please sign in to comment.