Skip to content

Commit 58a5df5

Browse files
authored
Merge pull request #9853 from Skold177/greatsword
[lua] [sql] Great Sword Mobskills
2 parents 73d3aaf + 8512dd8 commit 58a5df5

16 files changed

Lines changed: 277 additions & 45 deletions

scripts/actions/mobskills/crescent_moon.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-----------------------------------
22
-- Crescent Moon
3-
-- Family: Avatar (Fenrir)
4-
-- Description: Delivers a powerful strike to a single target.
3+
-- Family: Humanoid Great Sword Weaponskill
4+
-- Description: Delivers a single-hit attack. Damage varies with TP.
55
-----------------------------------
66
---@type TMobSkill
77
local mobskillObject = {}
@@ -15,9 +15,10 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
1515

1616
params.baseDamage = mob:getWeaponDmg()
1717
params.numHits = 1
18-
params.fTP = { 3.0, 3.0, 3.0 }
18+
params.fTP = { 1.0, 1.75, 2.5 }
19+
-- params.str_wSC = 0.35 -- TODO: Capture if mobskill weaponskills have wSC.
1920
params.attackType = xi.attackType.PHYSICAL
20-
params.damageType = xi.damageType.BLUNT
21+
params.damageType = xi.damageType.SLASHING
2122
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1
2223

2324
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
-----------------------------------
2+
-- Dimidiation
3+
-- Family: Humanoid Great Sword Weaponskill
4+
-- Description: Delivers a twofold attack. Damage varies with TP.
5+
-----------------------------------
6+
---@type TMobSkill
7+
local mobskillObject = {}
8+
9+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
10+
return 0
11+
end
12+
13+
mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
14+
local params = {}
15+
16+
params.baseDamage = mob:getWeaponDmg()
17+
params.numHits = 2
18+
params.fTP = { 2.25, 4.5, 6.75 }
19+
-- params.dex_wSC = 0.8 -- TODO: Capture if mobskill weaponskills have wSC.
20+
params.attackType = xi.attackType.PHYSICAL
21+
params.damageType = xi.damageType.SLASHING
22+
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2
23+
params.attackMultiplier = { 1.25, 1.25, 1.25 }
24+
25+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params)
26+
27+
if xi.mobskills.processDamage(mob, target, skill, action, info) then
28+
target:takeDamage(info.damage, mob, info.attackType, info.damageType)
29+
end
30+
31+
return info.damage
32+
end
33+
34+
return mobskillObject
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
-----------------------------------
2+
-- Fimbulvetr
3+
-- Family: Humanoid Great Sword Weaponskill
4+
-- Description: Damage varies with TP.
5+
-----------------------------------
6+
---@type TMobSkill
7+
local mobskillObject = {}
8+
9+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
10+
return 0
11+
end
12+
13+
mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
14+
local params = {}
15+
16+
params.baseDamage = mob:getWeaponDmg()
17+
params.numHits = 1
18+
params.fTP = { 3.3, 6.6, 9.9 }
19+
-- params.str_wSC = 0.6 -- TODO: Capture if mobskill weaponskills have wSC.
20+
-- params.vit_wSC = 0.6 -- TODO: Capture if mobskill weaponskills have wSC.
21+
params.attackType = xi.attackType.PHYSICAL
22+
params.damageType = xi.damageType.SLASHING
23+
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1
24+
25+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params)
26+
27+
if xi.mobskills.processDamage(mob, target, skill, action, info) then
28+
target:takeDamage(info.damage, mob, info.attackType, info.damageType)
29+
end
30+
31+
return info.damage
32+
end
33+
34+
return mobskillObject

scripts/actions/mobskills/freezebite.lua

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-----------------------------------
22
-- Freezebite
33
-- Family: Humanoid Greatsword Weaponskill
4-
-- Description: Delivers an Ice elemental attack.
4+
-- Description: Delivers an ice elemental attack. Damage varies with TP.
55
-----------------------------------
66
---@type TMobSkill
77
local mobskillObject = {}
@@ -13,12 +13,17 @@ end
1313
mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
1414
local params = {}
1515

16-
params.baseDamage = mob:getMainLvl() + 2
17-
params.fTP = { 4, 4, 4 } -- TODO: Capture fTP Scalings
18-
params.element = xi.element.ICE
19-
params.attackType = xi.attackType.MAGICAL
20-
params.damageType = xi.damageType.ICE
21-
params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior
16+
params.baseDamage = mob:getMainLvl() + 2
17+
params.fTP = { 1.0, 1.5, 3.0 }
18+
-- params.str_wSC = 0.3 -- TODO: Capture if mobskill weaponskills have wSC.
19+
-- params.int_wSC = 0.2 -- TODO: Capture if mobskill weaponskills have wSC.
20+
params.element = xi.element.ICE
21+
params.attackType = xi.attackType.MAGICAL
22+
params.damageType = xi.damageType.ICE
23+
params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS
24+
params.dStatMultiplier = 1
25+
params.dStatAttackerMod = xi.mod.INT
26+
params.dStatDefenderMod = xi.mod.INT
2227

2328
local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params)
2429

scripts/actions/mobskills/frostbite.lua

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-----------------------------------
22
-- Frostbite
33
-- Family: Humanoid Greatsword Weaponskill
4-
-- Description: Delivers an Ice elemental attack.
4+
-- Description: Delivers an ice elemental attack. Damage varies with TP.
55
-----------------------------------
66

77
---@type TMobSkill
@@ -14,12 +14,17 @@ end
1414
mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
1515
local params = {}
1616

17-
params.baseDamage = mob:getMainLvl() + 2
18-
params.fTP = { 4, 4, 4 } -- TODO: Capture fTP scaling
19-
params.element = xi.element.ICE
20-
params.attackType = xi.attackType.MAGICAL
21-
params.damageType = xi.damageType.ICE
22-
params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior
17+
params.baseDamage = mob:getMainLvl() + 2
18+
params.fTP = { 1.0, 2.0, 2.5 }
19+
-- params.str_wSC = 0.2 -- TODO: Capture if mobskill weaponskills have wSC.
20+
-- params.int_wSC = 0.2 -- TODO: Capture if mobskill weaponskills have wSC.
21+
params.element = xi.element.ICE
22+
params.attackType = xi.attackType.MAGICAL
23+
params.damageType = xi.damageType.ICE
24+
params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS
25+
params.dStatMultiplier = 1
26+
params.dStatAttackerMod = xi.mod.INT
27+
params.dStatDefenderMod = xi.mod.INT
2328

2429
local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params)
2530

scripts/actions/mobskills/ground_strike.lua

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-----------------------------------
22
-- Ground Strike
33
-- Family: Humanoid Great Sword Weaponskill
4-
-- Description: Delivers a single target attack.
4+
-- Description: Delivers a single attack. Damage varies with TP.
55
-----------------------------------
66
---@type TMobSkill
77
local mobskillObject = {}
@@ -13,12 +13,15 @@ end
1313
mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
1414
local params = {}
1515

16-
params.baseDamage = mob:getWeaponDmg()
17-
params.numHits = 1
18-
params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs
19-
params.attackType = xi.attackType.PHYSICAL
20-
params.damageType = xi.damageType.SLASHING
21-
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1
16+
params.baseDamage = mob:getWeaponDmg()
17+
params.numHits = 1
18+
params.fTP = { 1.5, 1.75, 3.0 }
19+
-- params.str_wSC = 0.5 -- TODO: Capture if mobskill weaponskills have wSC.
20+
-- params.int_wSC = 0.5 -- TODO: Capture if mobskill weaponskills have wSC.
21+
params.attackType = xi.attackType.PHYSICAL
22+
params.damageType = xi.damageType.SLASHING
23+
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1
24+
params.attackMultiplier = { 1.75, 1.75, 1.75 }
2225

2326
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params)
2427

scripts/actions/mobskills/hard_slash.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-----------------------------------
22
-- Hard Slash
33
-- Family: Humanoid Great Sword Weaponskill
4-
-- Description: Delivers a single-hit attack.
4+
-- Description: Delivers a single-hit attack. Damage varies with TP.
55
-----------------------------------
66
---@type TMobSkill
77
local mobskillObject = {}
@@ -15,7 +15,8 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
1515

1616
params.baseDamage = mob:getWeaponDmg()
1717
params.numHits = 1
18-
params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs
18+
params.fTP = { 1.5, 1.75, 2.0 }
19+
-- params.str_wSC = 0.3 -- TODO: Capture if mobskill weaponskills have wSC.
1920
params.attackType = xi.attackType.PHYSICAL
2021
params.damageType = xi.damageType.SLASHING
2122
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
-----------------------------------
2+
-- Herculean Slash
3+
-- Family: Humanoid Great Sword Weaponskill
4+
-- Description: Paralyzes target. Duration of effect varies with TP.
5+
-----------------------------------
6+
---@type TMobSkill
7+
local mobskillObject = {}
8+
9+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
10+
return 0
11+
end
12+
13+
mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
14+
local params = {}
15+
local duration = xi.mobskills.calculateDuration(skill:getTP(), 60, 180)
16+
17+
params.baseDamage = mob:getMainLvl() + 2
18+
params.fTP = { 3.5, 3.5, 3.5 }
19+
-- params.vit_wSC = 0.6 -- TODO: Capture if mobskill weaponskills have wSC.
20+
params.element = xi.element.ICE
21+
params.attackType = xi.attackType.MAGICAL
22+
params.damageType = xi.damageType.ICE
23+
params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS
24+
25+
local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params)
26+
27+
if xi.mobskills.processDamage(mob, target, skill, action, info) then
28+
target:takeDamage(info.damage, mob, info.attackType, info.damageType)
29+
xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 30, 0, duration)
30+
end
31+
32+
return info.damage
33+
end
34+
35+
return mobskillObject

scripts/actions/mobskills/power_slash.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-----------------------------------
2-
-- Power slash
2+
-- Power Slash
33
-- Family: Humanoid Great Sword Weaponskill
4-
-- Description: Delivers a powerful strike to a single target.
4+
-- Description: Delivers a single-hit attack. Chance of critical varies with TP.
55
-----------------------------------
66
---@type TMobSkill
77
local mobskillObject = {}
@@ -15,10 +15,14 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
1515

1616
params.baseDamage = mob:getWeaponDmg()
1717
params.numHits = 1
18-
params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs
18+
params.fTP = { 1.0, 1.0, 1.0 }
19+
-- params.str_wSC = 0.2 -- TODO: Capture if mobskill weaponskills have wSC.
20+
-- params.vit_wSC = 0.2 -- TODO: Capture if mobskill weaponskills have wSC.
1921
params.attackType = xi.attackType.PHYSICAL
20-
params.damageType = xi.damageType.BLUNT
22+
params.damageType = xi.damageType.SLASHING
2123
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1
24+
params.canCrit = true
25+
params.criticalChance = { 0.2, 0.4, 0.6 }
2226

2327
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params)
2428

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
-----------------------------------
2+
-- Resolution
3+
-- Family: Humanoid Great Sword Weaponskill
4+
-- Description: Delivers a fivefold attack.
5+
-----------------------------------
6+
---@type TMobSkill
7+
local mobskillObject = {}
8+
9+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
10+
return 0
11+
end
12+
13+
mobskillObject.onMobWeaponSkill = function(mob, target, skill, action)
14+
local params = {}
15+
16+
params.baseDamage = mob:getWeaponDmg()
17+
params.numHits = 5
18+
params.fTP = { 0.71875, 0.84375, 0.96875 }
19+
params.fTPSubsequentHits = { 0.71875, 0.84375, 0.96875 }
20+
-- params.str_wSC = 0.85 -- TODO: Capture if mobskill weaponskills have wSC.
21+
params.attackType = xi.attackType.PHYSICAL
22+
params.damageType = xi.damageType.SLASHING
23+
params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5
24+
params.attackMultiplier = { 0.85, 0.85, 0.85 }
25+
26+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params)
27+
28+
if xi.mobskills.processDamage(mob, target, skill, action, info) then
29+
target:takeDamage(info.damage, mob, info.attackType, info.damageType)
30+
end
31+
32+
return info.damage
33+
end
34+
35+
return mobskillObject

0 commit comments

Comments
 (0)