rename to reflect type definition Annotate xi.itemUtils.foodOnItemCheck Make TItemFood functions optional, since the definition does not include types
20 lines
561 B
Lua
20 lines
561 B
Lua
-----------------------------------
|
|
-- ID: 16119
|
|
-- Nomad Cap
|
|
-- Transports the user to their Home Nation
|
|
-- TODO: Confirm wiki claims of random zone destinations among a same nation.
|
|
-----------------------------------
|
|
require('scripts/globals/teleports')
|
|
-----------------------------------
|
|
---@type TItem
|
|
local itemObject = {}
|
|
|
|
itemObject.onItemCheck = function(target, item, param, caster)
|
|
return 0
|
|
end
|
|
|
|
itemObject.onItemUse = function(target)
|
|
target:addStatusEffectEx(xi.effect.TELEPORT, 0, xi.teleport.id.HOME_NATION, 0, 4)
|
|
end
|
|
|
|
return itemObject
|