Skip to content

Commit 99092bf

Browse files
authored
Merge pull request #9856 from Skold177/Gale-Axe
[lua] Add Choke Effect to Gale Axe
2 parents e1dc1d2 + c60b2c6 commit 99092bf

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

scripts/actions/weaponskills/gale_axe.lua

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- Gale Axe
33
-- Axe weapon skill
44
-- Skill level: 70
5-
-- Chokes enemy. Duration of effect varies with TP.
5+
-- Deals wind elemental damage. Chokes target. Chance of choking varies with TP.
66
-- Will stack with Sneak Attack.
77
-- Aligned with the Breeze Gorget.
88
-- Aligned with the Breeze Belt.
@@ -15,16 +15,26 @@
1515
local weaponskillObject = {}
1616

1717
weaponskillObject.onUseWeaponSkill = function(player, target, wsID, tp, primary, action, taChar)
18-
local params = {}
18+
local params = {}
1919
params.numHits = 1
20-
params.ftpMod = { 1.0, 1.0, 1.0 }
20+
params.ftpMod = { 1.0, 1.0, 1.0 }
2121
params.str_wsc = 0.3
2222

2323
if xi.settings.main.USE_ADOULIN_WEAPON_SKILL_CHANGES then
2424
params.str_wsc = 1.0
2525
end
2626

2727
local damage, criticalHit, tpHits, extraHits = xi.weaponskills.doPhysicalWeaponskill(player, target, wsID, params, tp, action, primary, taChar)
28+
29+
-- Handle status effect
30+
local effectId = xi.effect.CHOKE
31+
local actionElement = xi.element.WIND
32+
local power = 5
33+
local skillType = xi.skill.AXE
34+
local resist = xi.combat.magicHitRate.calculateResistRate(player, target, 0, skillType, 0, actionElement, 0, effectId, 0)
35+
local duration = math.floor(60 * resist)
36+
xi.weaponskills.handleWeaponskillEffect(player, target, effectId, actionElement, damage, power, duration)
37+
2838
return tpHits, extraHits, criticalHit, damage
2939
end
3040

0 commit comments

Comments
 (0)