Advertisement
Guest User

Untitled

a guest
Feb 12th, 2019
1,226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. local mana_get = damage/5
  2. if mana_get > 50 then
  3. mana_get = 50
  4. end
  5. mana_get = RandomInt(mana_get/2,mana_get)
  6.  
  7. if caster:FindModifierByName("modifier_item_jixianfaqiu") ~= nil then
  8. mana_get = math.floor(mana_get * 1.25)
  9. end
  10. if caster:FindModifierByName("modifier_item_yangdao") ~= nil then
  11. mana_get = math.floor(mana_get * 1.5)
  12. end
  13. caster:SetMana(caster:GetMana()+mana_get)
  14.  
  15. --造成伤害回蓝
  16. if attacker ~= nil then
  17. if attacker:FindAbilityByName('is_mage') or attacker:FindAbilityByName('is_warlock') or attacker:FindAbilityByName('is_shaman') then
  18. mana_get = damage/2.5
  19. if mana_get > 20 then
  20. mana_get = 20
  21. end
  22. else
  23. if mana_get > 10 then
  24. mana_get = 10
  25. end
  26. end
  27.  
  28. if attacker:FindModifierByName("modifier_item_wangguan") ~= nil or attacker:FindModifierByName("item_hongzhang_1") ~= nil or attacker:FindModifierByName("item_hongzhang_2") ~= nil or attacker:FindModifierByName("item_hongzhang_3") ~= nil or attacker:FindModifierByName("item_hongzhang_4") ~= nil or attacker:FindModifierByName("item_hongzhang_5") ~= nil then
  29. mana_get = math.floor(mana_get * 1.5)
  30. end
  31. if attacker:FindModifierByName("modifier_item_xuwubaoshi") ~= nil or attacker:FindModifierByName("modifier_item_yangdao") ~= nil or caster:FindModifierByName("modifier_item_shenmifazhang") ~= nil then
  32. mana_get = math.floor(mana_get * 2)
  33. end
  34. if attacker:FindModifierByName("modifier_item_jianrenqiu") ~= nil then
  35. mana_get = math.floor(mana_get * 2)
  36. end
  37. if attacker:FindModifierByName("modifier_item_shuaxinqiu") ~= nil then
  38. mana_get = math.floor(mana_get * 3)
  39. end
  40.  
  41. attacker:SetMana(attacker:GetMana()+mana_get)
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement