BloodRage.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : Spells/Fighter/Warrior/Berserker/BloodRage.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.14 08:10:40
  5. Script Purpose :
  6. :
  7. --]]
  8. -- When damaged with a melee weapon this spell has a 33% chance to cast Adrenal Flow on caster.
  9. -- Heals caster for 1.3 - 1.9% of max health
  10. -- This effect cannot be critically applied.
  11. -- This effect can only trigger once every 0.2 seconds.
  12. function cast(Caster, Target, pctHealMin, pctHealMax, Chance)
  13. AddProc(Caster, 16, Chance)
  14. Say(Caster, "trigger limit not implemented. this spell also no longer has higher level versions, it scales instead and heals for a formula based amount.")
  15. end
  16. function proc(Caster, Target, Type, pctHealMin, pctHealMax, Chance)
  17. local Val1 = pctHealMin
  18. local Val2 = pctHealMax
  19. local HealAmt = randomFloat(Val1, Val2)
  20. SpellHealPct("Heal", HealAmt, false, true, Caster, 1, true, "Adrenal Flow")
  21. end
  22. function randomFloat(Val1, Val2)
  23. return Val1 + math.random() * (Val2 - Val1);
  24. end
  25. function remove(Caster, Target)
  26. RemoveProc(Target)
  27. end