-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Move] Implement Heal Block #4120
Conversation
Co-authored-by: Lugiad' <[email protected]> Co-authored-by: José Ricardo Fleury Oliveira <[email protected]> Co-authored-by: Jannik Tappert <[email protected]> Co-authored-by: Asdar <[email protected]>
Fixed the git history and added the code from the previous PR (also updated the tests to use the latest functions/etc). |
Still needs implementation of disabling healing moves (see #2051 for details if necessary).
|
Co-authored-by: NightKev <[email protected]>
Co-authored-by: NightKev <[email protected]>
Co-authored-by: NightKev <[email protected]>
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 might want to look into modifying getMoveTargets
in data/move.ts
to add the Pollen Puff interaction. Enforcing it at the UI level (or within the select target phase in general) still allows enemies to target their allies under Heal Block.
@innerthunder I'm confused about some of your comments because I think it's not accurate to how the move actually works. I attached a video of Pollen Puff now, so hopefully it'll answer some of your comments. |
Doesn't showdown just prevent you from selecting the ally when they're Heal Blocked? I haven't looked into how it works in mainline (like when the ally target is hit with Psychic Noise). In any case, the way it works right now probably requires some changes to the AI to have the enemy properly respond to Heal Block, but you don't have to worry about it too much. |
Not a blocker. Seems to work ok on the UI side
Showdown's implementation is technically correct. However, in PokeRogue, doing so means placing TargetSelectPhase into a while-loop or something similar until the user chooses a valid target or exits out (targets = []), which I feel will lead to more unintended effects than booting the user back into command phase. Technically, you can't select the ally Pokemon too, so I think it's fine. |
Old PRs: #3326 #3047
What are the changes the user will see?
Heal Block will be implemented.
Psychic Noise will have its secondary effect implemented - Heal Block will be applied to the opponent for two turns.
Why am I making these changes?
Attempt to get rid of partial tags.
What are the changes from a developer perspective?
HealBlockTag prevents healing in HealPhase. The Regenerator ability is unaffected by Heal Block because it does not use Heal Phase for its healing. but also extends upon the MoveRestrictionBattlerTag to restrict the use of healing moves while the tag is still in effect. The move restriction is based on if the move is a status move and has a TRIAGE_MOVE flag. This avoids adding another redundant flag since attacking moves that heal are not banned with Heal Block. In addition, Heal Block-exempt moves like Pain Split do not have the Triage Flag. There is one exception to this condition however - Pollen Puff.
Pollen Puff has two different effects depending on the move's target. If it targets an opponent, it is a 90 BP attack. If it targets an ally, it is a healing move. Heal Block prevents the affected from using Heal Block towards allies, but allows for it to be used against opponents. This means that it cannot be disabled in Command Phase, like most moves, and must be disabled in Select Target Phase. MoveRestrictionBattlerTag was created based on preventing the use of moves in Command Phase, not Select Target Phase, so I added new functions and parameters to check that Pollen Puff had an allowed use case. Pollen Puff has an attribute StatusCategoryOnAllyAttr but because it was never applied in-game until now, it didn't work. This attribute was fixed to check if the user and the target are allies. Arguably, these new additions should help with Taunt's implementation.
Psychic Noise and Heal Block share similar implementations. However, Psychic Noise is allowed to hit the user again even when Heal Block is active while Heal Block (the move) should fail when the user already has an Heal Block tag.
Screenshots/Videos
Pollen Puff
freecompress-Screen.Recording.2024-09-20.at.5.05.02.PM.mp4
How to test the changes?
Use heal block on a Pokemon and damage it afterwards to see if it can heal or not.
Checklist
beta
as my base branchnpm run test
)