mmm there is no event for a unit recives a buff, and the damage system will only work for the debuffs that does damage.
i belive that the only way is checking that every time a unit finishes the effect of an ability. Make a list of all abilitys that have a debuff and if the ability being cast is in that list you remove all debuff from the target of the ability being cast.
I Quote: "I'm making a passive ability which when learned, it removes all debuffs (stun, purge, etc) from the unit. For example, if you casted storm bolt on this unit, the unit will still take damage from the stormbolt but will no be stunned from it."
Purge does not do damage, he only give an example with storm bolt.
Merlinds i don't see your point, you stated something entirely irrelevant, plus the example on storm bolt makes pretty clear that abilities that place buffs will do the damage, but the buff will be removed anyways.
Sadly there's no such thing as "unit gains buff" event, if you want your ability to be passive or have a specific duration you would have to do the periodic timer that removes all harmful buffs.
Another way to make things more accurate is removing the harmful buffs from the unit when it takes damage because most (not every) buff is applied that way.
Maybe you could make your passive ability more interesting, instead of it being constant, make it proc-based. So there is like a 50% chance whenever the hero takes damage to remove all negative buffs, or something like that. :thup:
Dirac, i was answering to gfreak, using a damage detect system will not work because some debuffs does not deal damage.
And again, it is not "accurate" if it does not applies to all debuffs.
So, please read before posting.
And in my opinion the most accurated way is to check when the effect of the ability starts. It will take more work, but will work for every debuff.
Reddit, Slack, Google, Facebook, Instagram — these companies use our data — directly or indirectly — to train the next generation of AI language models. Yet, I don’t remember anyone asking our permission, and in doing so, these companies have proven the adage that customers’ data is their main...
Our new website went up early yesterday. Health Empowers You. 200 smoothie recipe guide and soon we will have detox, cognitive enhancement, weightloss teas and some coffee blends. https://healthempowersyou.net/products/smoothie-recipe-guide
It never fails that as soon as I say something about the bots they come back - this time they are under a whole new IP range - one thing in common though, Chinese!