Understanding the workings of the Counterstrike effect

Have a really dumb question? Ask it here to get help from the experts (or those with too much time on their hands)

Moderator: Moderator

Post Reply
Message
Author
GeekOfGeekAndDad
Posts: 4
Joined: Fri Mar 07, 2014 7:52 am

Understanding the workings of the Counterstrike effect

#1 Post 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

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Understanding the workings of the Counterstrike effect

#2 Post 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.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

GeekOfGeekAndDad
Posts: 4
Joined: Fri Mar 07, 2014 7:52 am

Re: Understanding the workings of the Counterstrike effect

#3 Post 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.

Post Reply