Skip to content

Commit b5536f4

Browse files
committed
[lua, sql, cpp] DRK era audit
1 parent 2fc1e95 commit b5536f4

File tree

14 files changed

+213
-13
lines changed

14 files changed

+213
-13
lines changed

modules/abyssea/lua/job_adjustments.lua

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
require('modules/module_utils')
88
-----------------------------------
99

10-
local m = Module:new('job_adjustments')
10+
local m = Module:new('abyssea_job_adjustments')
1111

1212
-----------------------------------
1313
-- Warrior
@@ -66,4 +66,65 @@ m:addOverride('xi.job_utils.white_mage.useDevotion', function(player, target, ab
6666
return healMP
6767
end)
6868

69+
-----------------------------------
70+
-- Dark Knight
71+
-----------------------------------
72+
73+
-- Arcane Circle: Revert duration from 3 minutes to 1 minute
74+
-- Source: https://www.bg-wiki.com/ffxi/Version_Update_(02/13/2012)
75+
m:addOverride('xi.job_utils.dark_knight.useArcaneCircle', function(player, target, ability)
76+
local duration = 60 + player:getMod(xi.mod.ARCANE_CIRCLE_DURATION)
77+
local power = 15
78+
79+
if player:getMainJob() ~= xi.job.DRK then
80+
power = 5
81+
end
82+
83+
power = power + player:getMod(xi.mod.ARCANE_CIRCLE_POTENCY)
84+
85+
-- Handle simplified message for other party members.
86+
if player:getID() ~= target:getID() then
87+
ability:setMsg(xi.msg.basic.FORTIFIED_ARCANA)
88+
end
89+
90+
target:addStatusEffect(xi.effect.ARCANE_CIRCLE, power, 0, duration)
91+
92+
return xi.effect.ARCANE_CIRCLE
93+
end)
94+
95+
-- Last Resort: Revert duration from 3 minutes to 30 seconds
96+
m:addOverride('xi.job_utils.dark_knight.useLastResort', function(player, target, ability)
97+
player:addStatusEffect(xi.effect.LAST_RESORT, 0, 0, 30)
98+
99+
return xi.effect.LAST_RESORT
100+
end)
101+
102+
-- Dark Seal: Remove extra duration and cast speed from merits
103+
m:addOverride('xi.effects.warriors_charge.onEffectGain', function(target, effect)
104+
-- Overwrites
105+
target:delStatusEffectSilent(xi.effect.DIVINE_EMBLEM)
106+
target:delStatusEffectSilent(xi.effect.DIVINE_SEAL)
107+
target:delStatusEffectSilent(xi.effect.ELEMENTAL_SEAL)
108+
end)
109+
110+
-- Dark Seal: Apply merit recast reduction
111+
m:addOverride('xi.job_utils.dark_knight.useDarkSeal', function(player, target, ability, action)
112+
local recastReduction = player:getMerit(xi.merit.DARK_SEAL) - 150
113+
action:setRecast(action:getRecast() - recastReduction)
114+
115+
player:addStatusEffect(xi.effect.DARK_SEAL, 1, 0, 60)
116+
117+
return xi.effect.DARK_SEAL
118+
end)
119+
120+
-- Diabolic Eye: Remove extra duration and potency from merits and apply merit recast reduction
121+
m:addOverride('xi.job_utils.dark_knight.useDiabolicEye', function(player, target, ability, action)
122+
local recastReduction = player:getMerit(xi.merit.DIABOLIC_EYE) - 150
123+
action:setRecast(action:getRecast() - recastReduction)
124+
125+
player:addStatusEffect(xi.effect.DIABOLIC_EYE, 20, 0, 180)
126+
127+
return xi.effect.DIABOLIC_EYE
128+
end)
129+
69130
return m

modules/abyssea/sql/job_adjustments.sql

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,33 @@ UPDATE spell_list SET castTime = 3000 WHERE name = 'blindna';
5252

5353
-- Cursna: Revert cast time from 1 to 3 seconds
5454
UPDATE spell_list SET castTime = 3000 WHERE name = 'cursna';
55+
56+
------------------------------------
57+
-- Dark Knight
58+
-- Source: https://www.bg-wiki.com/ffxi/Version_Update_(02/13/2012)
59+
------------------------------------
60+
61+
-- Arcane Circle: Revert recast from 5 to 10 minutes
62+
UPDATE abilities SET recastTime = 600 WHERE name = 'arcane_circle';
63+
64+
-- Arcane Circle merit: Revert value to 20 seconds per level
65+
UPDATE merits SET value = 20 WHERE name = 'arcane_circle_recast';
66+
67+
-- Weapon Bash: Revert recast from 3 to 5 minutes
68+
UPDATE abilities SET recastTime = 300 WHERE name = 'weapon_bash';
69+
70+
-- Weapon Bash merit: Revert value to 10 seconds per level
71+
UPDATE merits SET value = 10 WHERE name = 'weapon_bash_recast';
72+
73+
-- Dark Seal: Revert recast from 5 to 15 minutes
74+
-- Source: https://www.bg-wiki.com/ffxi/Version_Update_(03/26/2012)
75+
UPDATE abilities SET recastTime = 900 WHERE name = 'dark_seal';
76+
77+
-- Dark Seal merit: Revert value to 150 seconds per level
78+
UPDATE merits SET value = 150 WHERE name = 'dark_seal';
79+
80+
-- Diabolic Eye: Revert recast from 5 to 15 minutes
81+
UPDATE abilities SET recastTime = 900 WHERE name = 'diabolic_eye';
82+
83+
-- Diabolic Eye merit: Revert value to 150 seconds per level
84+
UPDATE merits SET value = 150 WHERE name = 'diabolic_eye';

modules/init.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@
3838

3939
custom/commands/
4040
custom/lua/test_npcs_in_gm_home.lua
41+
rov/
42+
soa/
43+
abyssea/
44+
wotg/

modules/rov/lua/job_adjustments.lua

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-----------------------------------
77
require('modules/module_utils')
88
-----------------------------------
9-
local m = Module:new('job_adjustments')
9+
local m = Module:new('rov_job_adjustments')
1010

1111
-----------------------------------
1212
-- Monk
@@ -105,4 +105,21 @@ end)
105105
-- effect:addMod(xi.mod.HASTE_MAGIC, -6000)
106106
-- end)
107107

108+
-----------------------------------
109+
-- Dark Knight
110+
-----------------------------------
111+
112+
-- Dread Spikes: Revert duration from 3 minutes to 1 minute.
113+
-- Source: https://forum.square-enix.com/ffxi/threads/48564-Sep-16-2015-%28JST%29-Version-Update
114+
m:addOverride('xi.effects.dread_spikes.onEffectGain', function(target, effect)
115+
super(target, effect)
116+
effect:setDuration(60000)
117+
end)
118+
119+
-- TODO Absorb-STAT: Add decay tick and set 90 second duration to boost effects
120+
-- TODO Drain II: Set duration of max HP boost to 60 seconds.
121+
-- Source:
122+
-- Decay Removal: http://forum.square-enix.com/ffxi/threads/46531-Mar-26-2015-%28JST%29-Version-Update
123+
-- Duration Change: https://forum.square-enix.com/ffxi/threads/48564-Sep-16-2015-%28JST%29-Version-Update
124+
108125
return m
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
-----------------------------------
2+
-- Module: Job Adjustments (Seekers of Adoulin era)
3+
-- Desc: Removes traits/abilities/effects that were added to jobs during the SoA era
4+
-----------------------------------
5+
require('modules/module_utils')
6+
-----------------------------------
7+
local m = Module:new('soa_job_adjustments')
8+
9+
-----------------------------------
10+
-- Dark Knight
11+
-----------------------------------
12+
13+
-- Last Resort: Reduces attack bonus from 25% to 15%
14+
-- Source: https://forum.square-enix.com/ffxi/threads/46976-May-14-2015-%28JST%29-Version-Update
15+
m:addOverride('xi.effects.last_resort.onEffectGain', function(target, effect)
16+
local targetMerit = target:getMerit(xi.merit.LAST_RESORT_EFFECT)
17+
18+
-- Merit effect
19+
effect:addMod(xi.mod.ATTP, 15 + targetMerit)
20+
effect:addMod(xi.mod.RATTP, 15 + targetMerit)
21+
effect:addMod(xi.mod.DEFP, -15 - targetMerit)
22+
23+
effect:addMod(xi.mod.TWOHAND_HASTE_ABILITY, target:getMod(xi.mod.DESPERATE_BLOWS) + target:getMerit(xi.merit.DESPERATE_BLOWS))
24+
end)
25+
26+
return m
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
------------------------------------
2+
-- Seekers of Adoulin Job SQL Adjustments
3+
-- This module reverts relevant SQL tables for jobs to their pre-SoA values
4+
------------------------------------
5+
6+
------------------------------------
7+
-- Dark Knight
8+
-- Source: https://www.bg-wiki.com/ffxi/Version_Update_(04/29/2013)
9+
------------------------------------
10+
11+
-- Desperate Blows: Revert job trait to be merit unlocked
12+
UPDATE traits SET meritid = 2502, level = 75 WHERE name = 'desperate blows';
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
-----------------------------------
2+
-- Module: Job Adjustments (Wings of the Goddess Era)
3+
-- Desc: Removes traits/abilities/effects that were added to jobs during the WotG era
4+
-----------------------------------
5+
require('modules/module_utils')
6+
-----------------------------------
7+
local m = Module:new('wotg_job_adjustments')
8+
9+
-----------------------------------
10+
-- Dark Knight
11+
-----------------------------------
12+
13+
-- Arcane Circle: Removes WotG resist/defense/attack circle mods
14+
-- Source: https://www.bg-wiki.com/ffxi/Version_Update_(07/20/2009)
15+
m:addOverride('xi.effects.arcane_circle.onEffectGain', function(target, effect)
16+
effect:addMod(xi.mod.ARCANA_KILLER, effect:getPower())
17+
end)
18+
19+
return m

scripts/actions/abilities/dark_seal.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ abilityObject.onAbilityCheck = function(player, target, ability)
1212
return 0, 0
1313
end
1414

15-
abilityObject.onUseAbility = function(player, target, ability)
16-
return xi.job_utils.dark_knight.useDarkSeal(player, target, ability)
15+
abilityObject.onUseAbility = function(player, target, ability, action)
16+
return xi.job_utils.dark_knight.useDarkSeal(player, target, ability, action)
1717
end
1818

1919
return abilityObject

scripts/actions/abilities/diabolic_eye.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ abilityObject.onAbilityCheck = function(player, target, ability)
1212
return 0, 0
1313
end
1414

15-
abilityObject.onUseAbility = function(player, target, ability)
16-
return xi.job_utils.dark_knight.useDiabolicEye(player, target, ability)
15+
abilityObject.onUseAbility = function(player, target, ability, action)
16+
return xi.job_utils.dark_knight.useDiabolicEye(player, target, ability, action)
1717
end
1818

1919
return abilityObject

scripts/actions/abilities/weapon_bash.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ abilityObject.onAbilityCheck = function(player, target, ability)
1212
return xi.job_utils.dark_knight.checkWeaponBash(player, target, ability)
1313
end
1414

15-
abilityObject.onUseAbility = function(player, target, ability)
16-
return xi.job_utils.dark_knight.useWeaponBash(player, target, ability)
15+
abilityObject.onUseAbility = function(player, target, ability, action)
16+
return xi.job_utils.dark_knight.useWeaponBash(player, target, ability, action)
1717
end
1818

1919
return abilityObject

0 commit comments

Comments
 (0)