forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add newer generation Heal Bell interactions with Soundproof #4732
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gMovesInfo[MOVE_HEAL_BELL].effect == EFFECT_HEAL_BELL); | ||
ASSUME(gMovesInfo[MOVE_AROMATHERAPY].effect == EFFECT_HEAL_BELL); | ||
} | ||
|
||
DOUBLE_BATTLE_TEST("Heal Bell cures the entire party") | ||
{ | ||
u32 move; | ||
|
||
PARAMETRIZE { move = MOVE_HEAL_BELL; } | ||
PARAMETRIZE { move = MOVE_AROMATHERAPY; } | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } | ||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } | ||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } | ||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } | ||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } | ||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } | ||
OPPONENT(SPECIES_WYNAUT); | ||
OPPONENT(SPECIES_WYNAUT); | ||
} WHEN { | ||
TURN { MOVE(playerLeft, move, target: playerLeft); } | ||
TURN { SWITCH(playerLeft, 2); SWITCH(playerRight, 3); } | ||
} SCENE { | ||
int i; | ||
|
||
ANIMATION(ANIM_TYPE_MOVE, move, playerLeft); | ||
NOT MESSAGE("Wobbuffet is hurt by poison!"); | ||
for (i = 0; i < 6; i++) | ||
EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_STATUS), STATUS1_NONE); | ||
} | ||
} | ||
|
||
DOUBLE_BATTLE_TEST("Heal Bell does not cure soundproof partners") | ||
{ | ||
u32 ability; | ||
|
||
PARAMETRIZE { ability = ABILITY_SCRAPPY; } | ||
PARAMETRIZE { ability = ABILITY_SOUNDPROOF; } | ||
|
||
ASSUME(B_HEAL_BELL_SOUNDPROOF != GEN_5); | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
PLAYER(SPECIES_EXPLOUD) { Ability(ability); Status1(STATUS1_POISON); } | ||
OPPONENT(SPECIES_WYNAUT); | ||
OPPONENT(SPECIES_WYNAUT); | ||
} WHEN { | ||
TURN { MOVE(playerLeft, MOVE_HEAL_BELL, target: playerLeft); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_HEAL_BELL, playerLeft); | ||
if (ability == ABILITY_SOUNDPROOF) { | ||
MESSAGE("Exploud is hurt by poison!"); | ||
} else { | ||
NOT MESSAGE("Exploud is hurt by poison!"); | ||
} | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Heal Bell cures inactive soundproof Pokemon") | ||
{ | ||
u32 ability; | ||
|
||
PARAMETRIZE { ability = ABILITY_SCRAPPY; } | ||
PARAMETRIZE { ability = ABILITY_SOUNDPROOF; } | ||
|
||
ASSUME(B_HEAL_BELL_SOUNDPROOF >= GEN_5); | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } | ||
PLAYER(SPECIES_EXPLOUD) { Ability(ability); Status1(STATUS1_POISON); } | ||
OPPONENT(SPECIES_WYNAUT); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_HEAL_BELL, target: player); } | ||
TURN { SWITCH(player, 1); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_HEAL_BELL, player); | ||
SEND_IN_MESSAGE("Exploud"); | ||
NOT MESSAGE("Exploud is hurt by poison!"); | ||
} | ||
} | ||
|
||
|
||
SINGLE_BATTLE_TEST("Heal Bell cures a soundproof user") | ||
{ | ||
ASSUME(B_HEAL_BELL_SOUNDPROOF == GEN_5 || B_HEAL_BELL_SOUNDPROOF >= GEN_9); | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_EXPLOUD) { Ability(ABILITY_SOUNDPROOF); Status1(STATUS1_POISON); } | ||
OPPONENT(SPECIES_WYNAUT); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_HEAL_BELL, target: player); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_HEAL_BELL, player); | ||
NOT MESSAGE("Exploud is hurt by poison!"); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I would make 2 bools for those things since they are checked twice and would make the code a little bit cleaner
You could go even as far as making a bool for the whole soundproof condition or at least part of it.
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.
Sadly these aren't checked twice, it's a different battler in each case.