Skip to content
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 MOVE_SHELL_TRAP Effect #2716

Merged
merged 8 commits into from
Feb 22, 2023
Merged

Conversation

DizzyEggg
Copy link
Collaborator

Fixes #2476

Replaces #2132

I used AgustinGDLV's branch as a base and worked on that. Everything should be covered here.
Also added tests for Shell Trap effect.

Copy link
Collaborator

@mrgriffin mrgriffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the tests :)

@@ -5725,6 +5726,22 @@ static void Cmd_moveend(void)
else
gBattleStruct->lastMoveFailed &= ~(gBitTable[gBattlerAttacker]);

// Set ShellTrap to activate after the attacker's turn if target was hit by a physical move.
if (gBattleMoves[gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]]].effect == EFFECT_SHELL_TRAP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ridiculously narrow, but in a double-battle where I KO one of the foes and replace the move I chose with Shell Trap, could it then activate on the same turn despite not having been chosen?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're totally right, I think this is exactly what would happen. I think it could be easily fixed tho

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

mrgriffin
mrgriffin previously approved these changes Feb 22, 2023
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
test/move_effect_shell_trap.c Outdated Show resolved Hide resolved
@mrgriffin mrgriffin merged commit e0b76e9 into rh-hideout:upcoming Feb 22, 2023
@AsparagusEduardo AsparagusEduardo mentioned this pull request May 31, 2023
@DizzyEggg DizzyEggg deleted the shell_trap branch June 23, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MOVE_SHELL_TRAP Effect
3 participants