DeadlyWarp, and applying crits to other skills

Has anyone been able to add a crit like deadly warp does?

It doesn't seem to work. (in the skills function, add the crit buff if the special ability is picked as a skill)

One thing I have noticed in warpstrike 4 there is a category that might be a clue.

WarpBuff = 'HDemonDeadlyWarpBuff',

I grepped all the files for demigod, and that is the only place you can find WarpBuff... so am I far off in assuming that this is buried in the executable somewhere, and you won't be able to add crits to other skills? (on the skill damage itself, not AutoAttack, auto attacks are easy to add crits to)

1,776 views 4 replies
Reply #1 Top

Should have looked right at the top of the same file:

Code: c++
  1.     if Validate.HasAbility(unit, 'HDemonDeadlyWarp') then
  2.         Abil.AddAbility(unit, 'HDemonDeadlyWarpBuff', true)
  3.     end

It adds that ability at the beginning of a warp strike.  The ability adds a crit chance that would apply to everything, but it is removed as warp strike finishes, preventing it from ever applying to normal attacks.  Meanwhile, the warp strike function (where this code is from) specifies that it can only crit from this ability in its damagedata table:

Code: c++
  1. CanCrit = true,
  2. CanCritFrom = {HDemonDeadlyWarpBuff = true},

 

The actual 'WarpBuff' part of the ability blueprint is never used, and the function refers to the ability directly by name.

Reply #2 Top

That doesn't work anywhere else though. Guess I should have explained that better (in the skills function, add the crit buff if the special ability is picked as a skill). I tried that... but it does not crit.

Unless maybe I did it wrong. But I have improved enough to say I am at least 75% confident I can copy an existing ability mechanism now. :)

Reply #3 Top

It should work fine on any ability that uses DealDamage and whose damagetable has CanCrit = true and CanCritFrom = {AbilityName = true}.

Reply #4 Top

havent seen this in an ability before, nice :)