33 lines
1 KiB
Lua
33 lines
1 KiB
Lua
-----------------------------------
|
|
-- Ability: Tranquility
|
|
-- Your next white magic spell will generate less enmity.
|
|
-- Obtained: Scholar Level 75 Tier 2 Merit Points
|
|
-- Recast Time: Stratagem Charge
|
|
-- Duration: 1 white magic spell or 60 seconds, whichever occurs first
|
|
--
|
|
-- Level |Charges |Recharge Time per Charge
|
|
-- ----- -------- ---------------
|
|
-- 10 |1 |4:00 minutes
|
|
-- 30 |2 |2:00 minutes
|
|
-- 50 |3 |1:20 minutes
|
|
-- 70 |4 |1:00 minute
|
|
-- 90 |5 |48 seconds
|
|
-----------------------------------
|
|
---@type TAbility
|
|
local abilityObject = {}
|
|
|
|
abilityObject.onAbilityCheck = function(player, target, ability)
|
|
if player:hasStatusEffect(xi.effect.TRANQUILITY) then
|
|
return xi.msg.basic.EFFECT_ALREADY_ACTIVE, 0
|
|
end
|
|
|
|
return 0, 0
|
|
end
|
|
|
|
abilityObject.onUseAbility = function(player, target, ability)
|
|
player:addStatusEffect(xi.effect.TRANQUILITY, { power = player:getMerit(xi.merit.TRANQUILITY), duration = 60, origin = player })
|
|
|
|
return xi.effect.TRANQUILITY
|
|
end
|
|
|
|
return abilityObject
|