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
Adds Raging Bull and various fixes #3552
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2117e73
Adds Raging Bull and various fixes
AlexOn1ine 904306e
fix compiling on abgcc
AlexOn1ine 525e71a
syrup bomb anim fix
AlexOn1ine c3c3206
sticky syrup anim in link battles
AlexOn1ine 9940cb5
fix sticky syrup in link battles
AlexOn1ine 7b51dfe
Merge remote-tracking branch 'rhh/upcoming' into move_fixes
AlexOn1ine 6a16355
fix battler index
AlexOn1ine a9c51a0
Merge branch 'upcoming' into move_fixes
Bassoonian 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
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,160 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_BRICK_BREAK].effect == EFFECT_BRICK_BREAK); | ||
ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOWSCAPE); | ||
ASSUME(gBattleMoves[MOVE_LIGHT_SCREEN].effect == EFFECT_LIGHT_SCREEN); | ||
ASSUME(gBattleMoves[MOVE_REFLECT].effect == EFFECT_REFLECT); | ||
ASSUME(gBattleMoves[MOVE_AURORA_VEIL].effect == EFFECT_AURORA_VEIL); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Brick Break removes Light Screen, Reflect and Aurora Veil from the target's side of the field") | ||
{ | ||
u16 move; | ||
|
||
PARAMETRIZE { move = MOVE_LIGHT_SCREEN; } | ||
PARAMETRIZE { move = MOVE_REFLECT; } | ||
PARAMETRIZE { move = MOVE_AURORA_VEIL; } | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_SNOWSCAPE); } | ||
TURN { MOVE(opponent, move); MOVE(player, MOVE_BRICK_BREAK); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SNOWSCAPE, player); | ||
ANIMATION(ANIM_TYPE_MOVE, move, opponent); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BRICK_BREAK, player); | ||
MESSAGE("The wall shattered!"); | ||
HP_BAR(opponent); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Brick Break doesn't remove Light Screen, Reflect and Aurora Veil if the target is immune") | ||
{ | ||
u16 move; | ||
|
||
PARAMETRIZE { move = MOVE_LIGHT_SCREEN; } | ||
PARAMETRIZE { move = MOVE_REFLECT; } | ||
PARAMETRIZE { move = MOVE_AURORA_VEIL; } | ||
|
||
KNOWN_FAILING; | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_GASTLY); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_SNOWSCAPE); } | ||
TURN { MOVE(opponent, move); MOVE(player, MOVE_BRICK_BREAK); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SNOWSCAPE, player); | ||
ANIMATION(ANIM_TYPE_MOVE, move, opponent); | ||
NONE_OF { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BRICK_BREAK, player); | ||
MESSAGE("The wall shattered!"); | ||
HP_BAR(opponent); | ||
} | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Brick Break doesn't remove Light Screen, Reflect and Aurora Veil if the target Protected") | ||
{ | ||
u16 move; | ||
|
||
PARAMETRIZE { move = MOVE_LIGHT_SCREEN; } | ||
PARAMETRIZE { move = MOVE_REFLECT; } | ||
PARAMETRIZE { move = MOVE_AURORA_VEIL; } | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_SNOWSCAPE); MOVE(opponent, move); } | ||
TURN { MOVE(player, MOVE_BRICK_BREAK); MOVE(opponent, MOVE_PROTECT); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SNOWSCAPE, player); | ||
ANIMATION(ANIM_TYPE_MOVE, move, opponent); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_PROTECT, opponent); | ||
NONE_OF { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BRICK_BREAK, player); | ||
MESSAGE("The wall shattered!"); | ||
HP_BAR(opponent); | ||
} | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Brick Break doesn't remove Light Screen, Reflect and Aurora Veil if it misses") | ||
{ | ||
u16 move; | ||
|
||
PARAMETRIZE { move = MOVE_LIGHT_SCREEN; } | ||
PARAMETRIZE { move = MOVE_REFLECT; } | ||
PARAMETRIZE { move = MOVE_AURORA_VEIL; } | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_BRIGHT_POWDER); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_SNOWSCAPE); MOVE(opponent, move); } | ||
TURN { MOVE(player, MOVE_BRICK_BREAK, hit: FALSE); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SNOWSCAPE, player); | ||
ANIMATION(ANIM_TYPE_MOVE, move, opponent); | ||
NONE_OF { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BRICK_BREAK, player); | ||
MESSAGE("The wall shattered!"); | ||
HP_BAR(opponent); | ||
} | ||
} | ||
} | ||
|
||
DOUBLE_BATTLE_TEST("Brick Break can remove Light Screen, Reflect and Aurora Veil on users side") | ||
{ | ||
u16 move; | ||
|
||
PARAMETRIZE { move = MOVE_LIGHT_SCREEN; } | ||
PARAMETRIZE { move = MOVE_REFLECT; } | ||
PARAMETRIZE { move = MOVE_AURORA_VEIL; } | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { | ||
MOVE(opponentLeft, MOVE_SNOWSCAPE); | ||
MOVE(playerLeft, move); | ||
MOVE(playerRight, MOVE_BRICK_BREAK, target: playerLeft); | ||
} | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SNOWSCAPE, opponentLeft); | ||
ANIMATION(ANIM_TYPE_MOVE, move, playerLeft); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BRICK_BREAK, playerRight); | ||
MESSAGE("The wall shattered!"); | ||
HP_BAR(playerLeft); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Move Raging Bull changes it's type depending on the Tauros Form") | ||
{ | ||
u16 speciesPlayer; | ||
u16 speciesOpponent; | ||
|
||
PARAMETRIZE { speciesPlayer = SPECIES_TAUROS_PALDEAN_COMBAT_BREED; speciesOpponent = SPECIES_CHARIZARD; } | ||
PARAMETRIZE { speciesPlayer = SPECIES_TAUROS_PALDEAN_BLAZE_BREED; speciesOpponent = SPECIES_BLASTOISE; } | ||
PARAMETRIZE { speciesPlayer = SPECIES_TAUROS_PALDEAN_AQUA_BREED; speciesOpponent = SPECIES_VENUSAUR; } | ||
|
||
GIVEN { | ||
PLAYER(speciesPlayer); | ||
OPPONENT(speciesOpponent); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_RAGING_BULL); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_RAGING_BULL, player); | ||
HP_BAR(opponent); | ||
MESSAGE("It's not very effective…"); | ||
} | ||
} |
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.
Again, you need to test the specific case where the target is first hit by a non-shiny Syrup Bomb and then a shiny one in a link battle.
gStatuses4
is never updated on the slave GBA, so the second time the target gets hit by the attack, on one GBA the shiny animation will start to play (since the condition!(gStatuses4[gBattleAnimTarget] & STATUS4_SYRUP_BOMB)
will always be true).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.
Yeah, you are correct! Sorry, I didn't fully understand what you meant previously.
What would be a good replacement in this case?
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.
Set
gDisableStructs[gBattleAnimTarget].syrupBombIsShiny
when the status4 is originally set inSetMoveEffect
. You've been setting it in the attack animation functions this entire time which has been the problem. The disable struct is passed through for the attack animation, so once you move the shininess setting there, you can change this code to begBattleAnimArgs[0] = gDisableStructs[gBattleAnimTarget].syrupBombIsShiny
.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 pushed a commit with current changes but I can't get it to work
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.
Okay, so this still is not working because of how the special battle animations are set up. Unlike when a move animation is used, the disable struct is not passed along to the special battle animations.
To fix this, copy the line
memcpy(&sBattleBuffersTransferData[16], disableStructPtr, sizeof(struct DisableStruct));
fromBtlController_EmitMoveAnimation
, and add it toBtlController_EmitBattleAnimation
, changing the16
to wherever the current data struct leaves of (and modify the amount of data transferred over). Then, modify all...HandleBattleAnimation
functions to accept the disable struct as well (see how the...HandleMoveAnimation
functions do it). Finally, in the sticky syrup animation, you should be able to access the value viagAnimDisableStructPtr->syrupBombIsShiny
.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.
That worked, thank you!
Though I didn't know what I was doing and relied on your description only so not sure if all of it is correct. 😅