heals event?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
white_haired_uncle
Posts: 1207
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

heals event?

Post by white_haired_uncle »

I can't find an event that occurs on healing. Kind of surprising. I'd like to make a healer who takes "damage" when healing others. I've also thought about having "healing experience" where for example a shaman who heals N units or M amount of damage advances to druid (why would a unit on a path towards becoming a healer advance via combat?).

I guess I'd have to roll my own based on turn refresh? I don't like that, as I can't think of a good way to avoid double-healing.
Speak softly, and carry Doombringer.
User avatar
lhybrideur
Posts: 369
Joined: July 9th, 2019, 1:46 pm

Re: heals event?

Post by lhybrideur »

Healing experience exists in some mods, such as Hyperactive Novice Healers.
You could check them to see how it is implemented.
white_haired_uncle
Posts: 1207
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

Re: heals event?

Post by white_haired_uncle »

Thank you both.
Doesn't that have the double healing issue? Looks to me like if you have a normal healer next to an injured unit and a sacrificial healer of the same side as the healer also next to that unit, said unit will be healed twice (8+12), once by the built-in healing that occurs before turn refresh and then once by turn refresh. I'm hoping to exploit the built-in behaviour where only one healer per side will heal a specific unit on any given turn.
Speak softly, and carry Doombringer.
User avatar
Ravana
Forum Moderator
Posts: 3015
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: heals event?

Post by Ravana »

There is no custom healing. Event only reduces hp.
white_haired_uncle
Posts: 1207
Joined: August 26th, 2018, 11:46 pm
Location: A country place, far outside the Wire

Re: heals event?

Post by white_haired_uncle »

Okay, I see that now. But I still think it has basically the same problem. How do we know that THIS unit performed healing? We know it has the ability and it's next to one or more units that it could have healed but we don't know that this unit actually performed any healing.

I think there's a "need" for a heals event, assuming there's not already one I'm missing, I'm just trying to prove it to myself.
Speak softly, and carry Doombringer.
User avatar
Ravana
Forum Moderator
Posts: 3015
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: heals event?

Post by Ravana »

When iterating sacrificial_units then for each feeding_units exclude duplicate sacrificial_units-feeding_units pairs.
Post Reply