Page 1 of 1

Understanding the workings of the Counterstrike effect

Posted: Mon Mar 17, 2014 8:31 am
by GeekOfGeekAndDad
I'm trying to make a talent (in an add-on) that allows spells to gain the counterstrike bonus damage the same way melee attacks do, and looking at the Counterstrike timed effect in timed_effects.lua, I realize I don't actually understand the mechanism by which it works. It appears to set a 'counterstrike' flag on the actor, which never actually seems to be checked. Is there something I'm missing? Does anyone know (1) how Counterstrike works, and (2) have any suggestions towards making it apply to spells as well? Pointing me in the right direction would be greatly appreciated.

Thanks,
Geek

Re: Understanding the workings of the Counterstrike effect

Posted: Mon Mar 17, 2014 8:59 am
by Doctornull
The Counterstrike effect is checked in class/interface/Combat.lua around line 450 or so (line varies with version).

You'd probably want to check in the default damage projector; look for where Daze and Stun are checked.

Re: Understanding the workings of the Counterstrike effect

Posted: Mon Mar 17, 2014 9:38 pm
by GeekOfGeekAndDad
Thank you very much, Doctornull. For some reason I seem to have missed that file - I think I may have forgotten to check the mod directory. :oops:
Also, thanks for the pointer to the damage projection daze/stun code. It looks like I can probably use the DamageProjector:base hook.
Your advice is much appreciated.