22 lines
704 B
Lua
22 lines
704 B
Lua
-----------------------------------
|
|
-- Ability: Trance
|
|
-- While in effect, lowers TP cost of dances and steps to 0.
|
|
-- Obtained: Dancer Level 1
|
|
-- Recast Time: 1:00:00
|
|
-- Duration: 1:00
|
|
-----------------------------------
|
|
---@type TAbility
|
|
local abilityObject = {}
|
|
|
|
abilityObject.onAbilityCheck = function(player, target, ability)
|
|
ability:setRecast(math.max(0, ability:getRecast() - player:getMod(xi.mod.ONE_HOUR_RECAST) * 60))
|
|
|
|
return 0, 0
|
|
end
|
|
|
|
abilityObject.onUseAbility = function(player, target, ability)
|
|
player:addStatusEffect(xi.effect.TRANCE, { power = 1, duration = 60, origin = player })
|
|
player:addTP(100 * player:getJobPointLevel(xi.jp.TRANCE_EFFECT))
|
|
end
|
|
|
|
return abilityObject
|