Decimate.lua 783 B

1234567891011121314151617181920212223242526272829
  1. --[[
  2. Script Name : Spells/Fighter/Warrior/Guardian/Decimate.lua
  3. Script Author : Dello
  4. Script Date : 10/06/2014
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, DefSkills)
  9. Say(Caster, "cannot be parry etc... not implemented.")
  10. AddSkillBonus(Target, GetSkillIDByName("Parry"), DefSkills)
  11. AddSkillBonus(Target, GetSkillIDByName("Defense"), DefSkills)
  12. AddSkillBonus(Target, GetSkillIDByName("Deflection"), DefSkills)
  13. if MaxVal ~= nil and MinVal < MaxVal then
  14. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  15. else
  16. SpellDamage(Target, DmgType, MinVal)
  17. end
  18. end
  19. function remove(Caster, Target)
  20. RemoveSkillBonus(Target)
  21. end