pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Implement Heal Bell + Aromatherapy

Open shayebeadling opened this issue 10 months ago • 8 comments

  1. Adds a PartyStatusCureAttr to handle Heal Bell + Aromatherapy; Originally I created a more general use StatusCureAttr that hooked into our targeting properly, however the current targeting system can not handle pokemon not currently on the field. So without refactoring it, these abilities needed their own way of handling the party targeting.

  2. Adds a PartyStatusCurePhase to handle the unique case of modifying pokemon without a BattlerIndex; Takes a condition that specifies what would disqualify the pokemon from being cured. Heal Bell = Soundproof, Aromatherapy = Sap Sipper. These need to be provided since we're circumventing the targeting system.

  3. Modifies pokemon.resetStatus() to have an optional flag to not revive. Simple override for this case.

NOTE: This implementation is hacky because of the current targeting system. If anyone has any suggestions for improvements let me know, or maybe this warrants a refactor of the targeting system for these special cases.

shayebeadling avatar Apr 22 '24 16:04 shayebeadling

Just re-tested it to make sure it still works and seems good. Tested by giving opp willowisp and myself heal bell, getting burned in a double battle, and healing my teammate. Then doing the same with a pokemon not on the field.

shayebeadling avatar May 06 '24 16:05 shayebeadling

Maybe I'm missing something, but the conditions for soundproof and sap sipper don't seem to be triggering

bennybroseph avatar May 08 '24 23:05 bennybroseph

Can you explain what you're seeing? The expected behavior should be that Heal Bell doesn't cure a party member with soundproof, and Aromatherapy doesn't cure a party member with sap sipper.

shayebeadling avatar May 08 '24 23:05 shayebeadling

Sorry, should have explained better. The UI that comes up for abilities doesn't trigger in this case due to the way this was coded. It checks for the ability directly. The functionality is there, but there's no indication that Soundproof stopped the status heal.

https://github.com/pagefaultgames/pokerogue/assets/13838608/206a8937-6e2a-4764-9d84-f39c34d12c4a

bennybroseph avatar May 08 '24 23:05 bennybroseph

The ability doesn't pop up because the pokemon is not out on the field and cannot be targeted, so it's not hooking into the ability system at all. A cleaner implementation would require a rework to the targeting system since it's based off of battlerindex, which would be an endeavor to say the least.

I think these moves may be a unique case in procing abilities of mons not on the field, so we don't really have a precedent set. Do you think it would make sense to have the abilities of the party mon pop up in a case like this?

shayebeadling avatar May 08 '24 23:05 shayebeadling

Party pokemon always get healed, that's not the issue. I'm referring to pokemon on the field in the double battle. They don't get healed and there is no feedback as to why.

bennybroseph avatar May 08 '24 23:05 bennybroseph

ah I gotcha, the reason for that is that they are being healed the same way that the other mon are. I figured it would be cleaner to cure all party members the same way rather than the field mon being cured through the existing targeting system, and then the pokemon not on the field cured a different way. I could change it to be separate, but it would ugly up the code substantially to handle this edge case. What're your feelings on it with that in mind?

shayebeadling avatar May 09 '24 00:05 shayebeadling

Unfortunately I'd rather the consistency of abilities stating that they activated. Makes for a cleaner UX. No pressure to continue working on it, but I think that's the end result we need.

bennybroseph avatar May 09 '24 00:05 bennybroseph

Added a manual call to show the ability bar, since this ability has to circumvent the targeting system. The expected behavior according to showdown seems to be;

  1. User gets cure regardless of ability
  2. 'Other active pokemon' (ally on field) will not be cured if they have the corresponding immunity ability
  3. Party members not on field cured regardless of ability

Let me know if this implementation is not correct and I will fix

shayebeadling avatar May 09 '24 16:05 shayebeadling

Testing done: -Used heal bell in a double battle with a soundproof voltorb as secondary slot. No crashes or console logs Move successfully blocked Ability popup successfully engaged

https://github.com/pagefaultgames/pokerogue/assets/25878877/e0a2d892-8743-4169-b008-482bc0f53b0c

chacolah avatar May 09 '24 18:05 chacolah