41 lines
1.4 KiB
Lua
41 lines
1.4 KiB
Lua
-----------------------------------
|
|
-- Viper Bite
|
|
-- Dagger weapon skill
|
|
-- Skill level: 100
|
|
-- Deals double damage and Poisons target. Duration of poison varies with TP.
|
|
-- Doubles attack and not damage.
|
|
-- Despite the animation showing two swings, this is a single-hit weapon skill.
|
|
-- Will stack with Sneak Attack.
|
|
-- Aligned with the Soil Gorget.
|
|
-- Aligned with the Soil Belt.
|
|
-- Element: None
|
|
-- Modifiers: :
|
|
-- 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.atkVaries = { 2, 2, 2 }
|
|
|
|
if xi.settings.main.USE_ADOULIN_WEAPON_SKILL_CHANGES then
|
|
params.dex_wsc = 1
|
|
end
|
|
|
|
local damage, criticalHit, tpHits, extraHits = xi.weaponskills.doPhysicalWeaponskill(player, target, wsID, params, tp, action, primary, taChar)
|
|
|
|
-- Handle status effect
|
|
local effectId = xi.effect.POISON
|
|
local actionElement = xi.element.WATER
|
|
local power = 3
|
|
local duration = math.floor((30 + 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
|