-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect 'NOT x; NOT y;' #3459
Detect 'NOT x; NOT y;' #3459
Conversation
Fix Purifying Salt to be immune to statuses from secondary effects.
When merging to diff --git a/test/battle/move_effect/syrup_bomb.c b/test/battle/move_effect/syrup_bomb.c
index ae689b3629..18b032f5cb 100644
--- a/test/battle/move_effect/syrup_bomb.c
+++ b/test/battle/move_effect/syrup_bomb.c
@@ -33,8 +33,10 @@ SINGLE_BATTLE_TEST("Syrup Bomb is prevented by Bulletproof")
} SCENE {
ABILITY_POPUP(opponent, ABILITY_BULLETPROOF);
MESSAGE("Foe Chespin's Bulletproof blocks Syrup Bomb!");
- NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
- NOT HP_BAR(opponent);
+ NONE_OF {
+ ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
+ HP_BAR(opponent);
+ }
}
}
@@ -75,8 +77,10 @@ SINGLE_BATTLE_TEST("Clear Body, White Smoke and Full Metal Body prevent Sticky S
ABILITY_POPUP(opponent, ABILITY_FULL_METAL_BODY);
MESSAGE("Foe Solgaleo's Full Metal Body prevents stat loss!");
}
- NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
- NOT MESSAGE("Foe Beldum's Speed fell!");
+ NONE_OF {
+ ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
+ MESSAGE("Foe Beldum's Speed fell!");
+ }
}
}
@@ -92,7 +96,9 @@ SINGLE_BATTLE_TEST("Clear Amulet prevents Sticky Syrup speed reduction")
HP_BAR(opponent);
MESSAGE("Foe Wobbuffet got covered in sticky syrup!");
MESSAGE("Foe Wobbuffet's Speed was not lowered!");
- NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
- NOT MESSAGE("Foe Wobbuffet's Speed fell!");
+ NONE_OF {
+ ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
+ MESSAGE("Foe Wobbuffet's Speed fell!");
+ }
}
} |
Should an issue be opened as a reminder? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I liked to do those, sorry 😅
Me too 😂 I think the vast majority of the fixes were to code I wrote 😅 |
Fixed in #3437 |
NOT x; NOT y;
does not behave how you would expect, so this PR detects uses of that and tells the developer to writeNONE_OF { x; y; }
instead.Purifying Salt's can't-be-frozen test was erroneously passing because of this, so that has been fixed too.