landsandboat/scripts/actions/weaponskills/shockwave.lua

36 lines
1.3 KiB
Lua

-----------------------------------
-- Shockwave
-- Great Sword weapon skill
-- Skill level: 150
-- Delivers an area of effect attack. Sleeps enemies. Duration of effect varies with TP.
-- Will stack with Sneak Attack.
-- Aligned with the Aqua Gorget.
-- Aligned with the Aqua Belt.
-- Element: None
-- Modifiers: STR:30% MND:30%
-- 100%TP 200%TP 300%TP
-- 1.00 1.00 1.00
-----------------------------------
---@type TWeaponSkill
local weaponskillObject = {}
weaponskillObject.onUseWeaponSkill = function(player, target, wsID, tp, primary, action, taChar)
local params = {}
params.numHits = 1
params.ftpMod = { 1, 1, 1 }
params.str_wsc = 0.3
params.mnd_wsc = 0.3
local damage, criticalHit, tpHits, extraHits = xi.weaponskills.doPhysicalWeaponskill(player, target, wsID, params, tp, action, primary, taChar)
-- Handle status effect
local effectId = xi.effect.SLEEP_I
local actionElement = xi.element.DARK
local power = 1
local duration = math.floor(6 * tp / 100 * applyResistanceAddEffect(player, target, actionElement, 0))
xi.weaponskills.handleWeaponskillEffect(player, target, effectId, actionElement, damage, power, duration)
return tpHits, extraHits, criticalHit, damage
end
return weaponskillObject