-
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 MOVE_SHELL_TRAP Effect #2716
Conversation
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.
Love the tests :)
src/battle_script_commands.c
Outdated
@@ -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 |
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.
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?
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.
You're totally right, I think this is exactly what would happen. I think it could be easily fixed tho
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.
Fixed
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.