Skip to content

Commit 9089ccd

Browse files
committed
Add the acrolith family of skills
Addresses #5494 by adding the acrolith family skills. There are TODOs left where more capture is needed.
1 parent 5f49b15 commit 9089ccd

10 files changed

Lines changed: 248 additions & 2 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
-----------------------------------
2+
-- Detonating Grip
3+
-- Family: Acrolith
4+
-- Type: Physical
5+
-- Can be dispelled: N/A
6+
-- Utsusemi/Blink absorb: Ignores shadows
7+
-- Range: Aoe on target, TODO capture
8+
-----------------------------------
9+
---@type TMobSkill
10+
local mobskillObject = {}
11+
12+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
13+
if mob:getHPP() > 35 then
14+
return 1
15+
end
16+
17+
if mob:getLocalVar('lost_r_arm') == 1 then
18+
-- Lost right arm, filtering out Detonating grip!
19+
return 1
20+
end
21+
22+
return 0
23+
end
24+
25+
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
26+
local numhits = 1
27+
local accmod = 10
28+
local ftp = 1
29+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT)
30+
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, xi.mobskills.shadowBehavior.IGNORE_SHADOWS)
31+
32+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
33+
return dmg
34+
end
35+
36+
return mobskillObject
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-----------------------------------
2+
-- Dire Straight
3+
-- Family: Acrolith
4+
-- Type: Physical
5+
-- Can be dispelled: N/A
6+
-- Utsusemi/Blink absorb: Wipe shadows
7+
-- Range: Single Target TODO Capture
8+
-----------------------------------
9+
---@type TMobSkill
10+
local mobskillObject = {}
11+
12+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
13+
if mob:getLocalVar('lost_r_arm') == 1 then
14+
-- Lost right arm, filtering out Detonating grip!
15+
return 1
16+
end
17+
18+
return 0
19+
end
20+
21+
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
22+
local numhits = 1
23+
local accmod = 1
24+
local ftp = 1
25+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT)
26+
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, xi.mobskills.shadowBehavior.WIPE_SHADOWS)
27+
28+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
29+
return dmg
30+
end
31+
32+
return mobskillObject
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
-----------------------------------
2+
-- Dismemberment
3+
-- Family: Acrolith
4+
-- Type: Physical
5+
-- Can be dispelled: N/A
6+
-- Utsusemi/Blink absorb: Ignore shadows
7+
-- Range: Single Target TODO Capture
8+
-----------------------------------
9+
---@type TMobSkill
10+
local mobskillObject = {}
11+
12+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
13+
if mob:getHPP() > 35 then
14+
return 1
15+
end
16+
17+
if mob:getLocalVar('lost_r_arm') == 1 then
18+
-- I have never observed acrolith use Dismemberment with right arm lost
19+
return 1
20+
end
21+
22+
return 0
23+
end
24+
25+
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
26+
local numhits = 1
27+
local accmod = 1
28+
local ftp = 1
29+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT)
30+
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, xi.mobskills.shadowBehavior.IGNORE_SHADOWS)
31+
32+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
33+
return dmg
34+
end
35+
36+
return mobskillObject
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-----------------------------------
2+
-- Earth Shatter
3+
-- Family: Acrolith
4+
-- Type: Physical
5+
-- Can be dispelled: N/A
6+
-- Utsusemi/Blink absorb: Wipes shadows
7+
-- Range: Aoe on mob, TODO Capture
8+
-----------------------------------
9+
---@type TMobSkill
10+
local mobskillObject = {}
11+
12+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
13+
if mob:getLocalVar('lost_r_arm') == 1 then
14+
-- I have never observed acrolith use earth shatter with right arm lost
15+
return 1
16+
end
17+
return 0
18+
end
19+
20+
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
21+
local numhits = 1
22+
local accmod = 1
23+
local ftp = 1
24+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT)
25+
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, xi.mobskills.shadowBehavior.WIPE_SHADOWS)
26+
27+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
28+
return dmg
29+
end
30+
31+
return mobskillObject
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-----------------------------------
2+
-- Sinker Drill
3+
-- Family: Acrolith
4+
-- Type: Physical
5+
-- Can be dispelled: N/A
6+
-- Utsusemi/Blink absorb: Up to 5 shadows
7+
-- Range: Single Target TODO Capture
8+
-----------------------------------
9+
---@type TMobSkill
10+
local mobskillObject = {}
11+
12+
mobskillObject.onMobSkillCheck = function(target, mob, skill)
13+
if mob:getLocalVar('lost_body') == 1 then
14+
-- Lost body, filtering out Sinker Drill!
15+
return 1
16+
end
17+
18+
return 0
19+
end
20+
21+
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
22+
local numhits = 5
23+
local accmod = 1
24+
local ftp = 1
25+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT)
26+
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, info.hitslanded)
27+
28+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
29+
return dmg
30+
end
31+
32+
return mobskillObject

scripts/enum/mob_skills.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ xi.mobSkill =
211211

212212
BOREAS_MANTLE = 1980, -- Unique entry.
213213

214+
DISMEMBERMENT = 2070,
215+
DIRE_STRAIGHT = 2071,
216+
EARTH_SHATTER = 2072,
217+
SINKER_DRILL = 2073,
218+
DETONATING_GRIP = 2074,
219+
214220
NOCTURNAL_SERVITUDE = 2112,
215221

216222
HELLSNAP = 2113,
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
-- Acrolith family mixin
2+
-- Customization:
3+
-- Acrolith family of mobs have a behavior of losing body parts based on what skills
4+
-- they perform. All acrolith type mobs can mix in this lua. This was sourced from
5+
-- bg wiki which had the most detail: https://www.bg-wiki.com/ffxi/Category:Acrolith
6+
7+
require('scripts/globals/mixins')
8+
9+
g_mixins = g_mixins or {}
10+
g_mixins.families = g_mixins.families or {}
11+
12+
g_mixins.families.acrolith = function(acrolithMob)
13+
acrolithMob:addListener('WEAPONSKILL_USE', 'ACROLITH_WEAPONSKILL_USE', function(mob, target, wsid, tp, action)
14+
if wsid == xi.mobSkill.DETONATING_GRIP then
15+
mob:setLocalVar('lost_r_arm', 1)
16+
return
17+
end
18+
19+
if wsid == xi.mobSkill.DISMEMBERMENT then
20+
-- Dismemberment takes right arm first
21+
if mob:getLocalVar('lost_r_arm') == 0 then
22+
mob:setLocalVar('lost_r_arm', 1)
23+
return
24+
end
25+
end
26+
end)
27+
28+
acrolithMob:addListener('WEAPONSKILL_STATE_EXIT', 'ACROLITH_WEAPONSKILL_STATE_EXIT', function(mob, skillID)
29+
if skillID == xi.mobSkill.DETONATING_GRIP then
30+
mob:setAnimationSub(5)
31+
end
32+
33+
if skillID == xi.mobSkill.DISMEMBERMENT then
34+
mob:setAnimationSub(5)
35+
end
36+
end)
37+
38+
-- TODO find rate of fall apart crit event
39+
acrolithMob:addListener('CRITICAL_TAKE', 'ACROLITH_CRITICAL_TAKE', function(mob)
40+
local random = math.random(1, 100)
41+
42+
if
43+
random <= 20 and
44+
mob:getLocalVar('lost_r_arm') == 1 and
45+
mob:getLocalVar('lost_body') == 0
46+
then
47+
-- Fall apart
48+
mob:setAnimationSub(6)
49+
mob:setAutoAttackEnabled(false)
50+
mob:setLocalVar('lost_r_arm', 1)
51+
mob:setLocalVar('lost_body', 1)
52+
end
53+
end)
54+
end
55+
56+
return g_mixins.families.acrolith
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-----------------------------------
2+
-- Area: Al Zahbi
3+
-- Mob: Acrolith
4+
-----------------------------------
5+
mixins = { require('scripts/mixins/families/acrolith') }
6+
-----------------------------------
7+
---@type TMobEntity
8+
local entity = {}
9+
10+
entity.onMobDeath = function(mob, player, optParams)
11+
end
12+
13+
return entity

sql/mob_skill_lists.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ CREATE TABLE IF NOT EXISTS `mob_skill_lists` (
2121
-- Contenu de la table `mob_skill_lists`
2222
--
2323

24-
-- 1: Acrolith
24+
INSERT INTO `mob_skill_lists` VALUES ('Acrolith',1,2070);
25+
INSERT INTO `mob_skill_lists` VALUES ('Acrolith',1,2071);
26+
INSERT INTO `mob_skill_lists` VALUES ('Acrolith',1,2072);
27+
INSERT INTO `mob_skill_lists` VALUES ('Acrolith',1,2073);
28+
INSERT INTO `mob_skill_lists` VALUES ('Acrolith',1,2074);
2529
INSERT INTO `mob_skill_lists` VALUES ('Adamantoise',2,804);
2630
INSERT INTO `mob_skill_lists` VALUES ('Adamantoise',2,805);
2731
INSERT INTO `mob_skill_lists` VALUES ('Adamantoise',2,806);

sql/mob_skills.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2088,7 +2088,7 @@ INSERT INTO `mob_skills` VALUES (2070,1411,'dismemberment',0,0.0,7.0,2000,1000,4
20882088
INSERT INTO `mob_skills` VALUES (2071,1412,'dire_straight',0,0.0,7.0,2000,1000,4,0,0,0,0,0,0);
20892089
INSERT INTO `mob_skills` VALUES (2072,1413,'earth_shatter',1,0.0,15.0,2000,1000,4,0,0,0,0,0,0);
20902090
INSERT INTO `mob_skills` VALUES (2073,1414,'sinker_drill',0,0.0,7.0,2000,1000,4,0,0,0,0,0,0);
2091-
INSERT INTO `mob_skills` VALUES (2074,1415,'detonating_grip',0,0.0,7.0,2000,1000,4,0,0,0,0,0,0);
2091+
INSERT INTO `mob_skills` VALUES (2074,1415,'detonating_grip',2,0.0,7.0,2000,1000,4,0,0,0,0,0,0);
20922092
-- INSERT INTO `mob_skills` VALUES (2075,1819,'overthrow',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
20932093
-- INSERT INTO `mob_skills` VALUES (2076,1820,'rock_smash',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
20942094
-- INSERT INTO `mob_skills` VALUES (2077,1821,'diamondhide',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);

0 commit comments

Comments
 (0)