2021-01-18 12:51:02 -05:00
|
|
|
-----------------------------------
|
2013-02-11 15:21:27 +00:00
|
|
|
-- ID: 11788
|
2017-11-11 00:34:58 -05:00
|
|
|
-- Item: Jester's Hat
|
|
|
|
|
-- Item Effect: Casts Cure II
|
2021-01-18 12:51:02 -05:00
|
|
|
-----------------------------------
|
2024-08-24 12:32:37 -04:00
|
|
|
---@type TItem
|
2022-10-06 17:25:46 +03:00
|
|
|
local itemObject = {}
|
2013-02-11 15:21:27 +00:00
|
|
|
|
2026-05-25 20:42:11 -06:00
|
|
|
itemObject.onItemCheck = function(target, item, caster)
|
2018-08-07 19:36:44 -04:00
|
|
|
return 0
|
|
|
|
|
end
|
2013-02-11 15:21:27 +00:00
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
itemObject.onItemUse = function(target)
|
2018-08-07 19:36:44 -04:00
|
|
|
local hpHeal = 90
|
|
|
|
|
local dif = target:getMaxHP() - target:getHP()
|
2022-11-03 11:13:19 -04:00
|
|
|
if hpHeal > dif then
|
2018-08-07 19:36:44 -04:00
|
|
|
hpHeal = dif
|
2013-02-11 15:21:27 +00:00
|
|
|
end
|
2022-11-22 14:59:19 -05:00
|
|
|
|
2018-08-07 19:36:44 -04:00
|
|
|
target:addHP(hpHeal)
|
2020-07-27 19:35:52 -07:00
|
|
|
target:updateEnmityFromCure(target, hpHeal)
|
2021-04-01 15:10:15 -04:00
|
|
|
target:messageBasic(xi.msg.basic.RECOVERS_HP, 0, hpHeal)
|
2020-03-19 18:41:42 -07:00
|
|
|
end
|
2021-01-17 11:55:03 -05:00
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
return itemObject
|