landsandboat/scripts/actions/weaponskills/sunburst.lua
Skold177 55cb6c11a3 [lua] Minor Staff Weaponskills fixes
Fixes a few things for staff weaponskills and leaves some useful comments for the future
2026-01-11 17:23:25 -05:00

38 lines
1.2 KiB
Lua

-----------------------------------
-- Sunburst
-- Staff weapon skill
-- Skill Level: 150
-- Deals light or darkness elemental damage. Damage varies with TP.
-- Aligned with the Shadow Gorget & Aqua Gorget.
-- Aligned with the Shadow Belt & Aqua Belt.
-- Element: Light/Dark
-- Modifiers: : STR:40% MND:40%
-- 100%TP 200%TP 300%TP
-- 1.00 2.50 4.00
-----------------------------------
---@type TWeaponSkill
local weaponskillObject = {}
weaponskillObject.onUseWeaponSkill = function(player, target, wsID, tp, primary, action, taChar)
local params = {}
params.ftpMod = { 1.0, 2.5, 4.0 }
params.str_wsc = 0.4
params.mnd_wsc = 0.4
params.skill = xi.skill.STAFF
params.includemab = true
params.dStat = xi.mod.INT
-- 50/50 shot of being light or dark
params.ele = xi.element.LIGHT
if math.random(1, 100) <= 50 then
params.ele = xi.element.DARK
end
if xi.settings.main.USE_ADOULIN_WEAPON_SKILL_CHANGES then
params.str_wsc = 0.4 params.mnd_wsc = 0.4
end
local damage, criticalHit, tpHits, extraHits = xi.weaponskills.doMagicWeaponskill(player, target, wsID, params, tp, action, primary)
return tpHits, extraHits, criticalHit, damage
end
return weaponskillObject