Skip to content

Commit ce854c4

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 ce854c4

10 files changed

Lines changed: 225 additions & 2 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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: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 = 10
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.IGNORE_SHADOWS)
27+
28+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
29+
return dmg
30+
end
31+
32+
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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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:getLocalVar('lost_l_arm') == 1 and
14+
mob:getLocalVar('lost_r_arm') == 1 and
15+
mob:getLocalVar('lost_Body') == 1 then
16+
-- Lost all limbs, cant use Dismemberment!
17+
return 1
18+
end
19+
20+
return 0
21+
end
22+
23+
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
24+
local numhits = 1
25+
local accmod = 1
26+
local ftp = 1
27+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT)
28+
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, xi.mobskills.shadowBehavior.IGNORE_SHADOWS)
29+
30+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
31+
return dmg
32+
end
33+
34+
return mobskillObject
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
return 0
14+
end
15+
16+
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
17+
local numhits = 1
18+
local accmod = 1
19+
local ftp = 1
20+
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT)
21+
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, xi.mobskills.shadowBehavior.WIPE_SHADOWS)
22+
23+
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE)
24+
return dmg
25+
end
26+
27+
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_l_arm') == 1 then
14+
-- Lost left arm, 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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
-- First we lose left arm on Dismemberment
21+
if mob:getLocalVar('lost_l_arm') == 0 then
22+
mob:setLocalVar('lost_l_arm', 1)
23+
-- TODO Set animation to left arm dismemberment
24+
action:setAnimation(target:getID(), 1411)
25+
return
26+
end
27+
28+
-- If we still have a right arm, we lose that next
29+
if mob:getLocalVar('lost_r_arm') == 0 then
30+
mob:setLocalVar('lost_r_arm', 1)
31+
action:setAnimation(target:getID(), 1411)
32+
return
33+
end
34+
35+
-- Nothing left to lose but body
36+
mob:setLocalVar('lost_Body', 1)
37+
-- TODO Set animation to body dismemberment
38+
action:setAnimation(target:getID(), 1411)
39+
end
40+
end)
41+
end
42+
43+
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)