dewkl wrote...
How do you properly apply debuffs to a creature, what constructor do you use?
My function is:
ApplyEffectOnObject(EFFECT_DURATION_TYPE_TEMPORARY, eEffect, oFriend, 10.0, GetHero(), 11100);
I'm trying to apply the spell Death Hex on oFriend. The spell gives this debuff, which I need; The target suffers a hex of lethal bad luck. Every normal hit it suffers becomes a critical hit.
The effect itself does nothing other than place an effect on the creature. Usually, this effect is tied to an ability so they can't be stacked and may have a vfx.
The actual code that does the normal hit to critical hit usually works like this (you will have to decide where to put it depending on your requirements):
if (attack result is a hit)
{ if (has death hex effect)
{ flag as critical hit }
calculate damage using above flag
apply damage effect to creature }
About the logs, you can ignore the Log_Trace calls. Those aren't supported for the released toolset. Only PrintToLog works.