-
Notifications
You must be signed in to change notification settings - Fork 157
/
NIN.lua
467 lines (385 loc) · 23.3 KB
/
NIN.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Migawari = buffactive.migawari or false
state.Buff.Doom = buffactive.doom or false
state.Buff.Yonin = buffactive.Yonin or false
state.Buff.Innin = buffactive.Innin or false
state.Buff.Futae = buffactive.Futae or false
determine_haste_group()
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('Normal', 'Acc')
state.HybridMode:options('Normal', 'Evasion', 'PDT')
state.WeaponskillMode:options('Normal', 'Acc', 'Mod')
state.CastingMode:options('Normal', 'Resistant')
state.PhysicalDefenseMode:options('PDT', 'Evasion')
gear.MovementFeet = {name="Danzo Sune-ate"}
gear.DayFeet = "Danzo Sune-ate"
gear.NightFeet = "Hachiya Kyahan"
select_movement_feet()
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Precast sets
--------------------------------------
-- Precast sets to enhance JAs
sets.precast.JA['Mijin Gakure'] = {legs="Mochizuki Hakama"}
sets.precast.JA['Futae'] = {legs="Iga Tekko +2"}
sets.precast.JA['Sange'] = {legs="Mochizuki Chainmail"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {ammo="Sonia's Plectrum",
head="Felistris Mask",
body="Hachiya Chainmail +1",hands="Buremte Gloves",ring1="Spiral Ring",
back="Iximulew Cape",waist="Caudata Belt",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
-- Uk'uxkaj Cap, Daihanshi Habaki
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Set for acc on steps, since Yonin drops acc a fair bit
sets.precast.Step = {
head="Whirlpool Mask",neck="Ej Necklace",
body="Otronif Harness +1",hands="Buremte Gloves",ring1="Patricius Ring",
back="Yokaze Mantle",waist="Chaac Belt",legs="Manibozho Brais",feet="Otronif Boots +1"}
sets.precast.Flourish1 = {waist="Chaac Belt"}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",ear2="Loquacious Earring",hands="Thaumas Gloves",ring1="Prolix Ring"}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads",body="Mochizuki Chainmail"})
-- Snapshot for ranged
sets.precast.RA = {hands="Manibozho Gloves",legs="Nahtirah Trousers",feet="Wurrukatte Boots"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Qaaxo Harness",hands="Mochizuki Tekko",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist=gear.ElementalBelt,legs="Manibozho Brais",feet="Otronif Boots +1"}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {ammo="Jukukik Feather",hands="Buremte Gloves",
back="Yokaze Mantle"})
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Blade: Jin'] = set_combine(sets.precast.WS,
{neck="Rancor Collar",ear1="Brutal Earring",ear2="Moonshade Earring",feet="Daihanshi Habaki"})
sets.precast.WS['Blade: Hi'] = set_combine(sets.precast.WS,
{head="Felistris Mask",hands="Hachiya Tekko",ring1="Stormsoul Ring",legs="Nahtirah Trousers"})
sets.precast.WS['Blade: Shun'] = set_combine(sets.precast.WS, {feet="Daihanshi Habaki"})
sets.precast.WS['Aeolian Edge'] = {
head="Wayfarer Circlet",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Moonshade Earring",
body="Wayfarer Robe",hands="Wayfarer Cuffs",ring1="Acumen Ring",ring2="Demon's Ring",
back="Toro Cape",waist="Thunder Belt",legs="Shneddick Tights +1",feet="Daihanshi Habaki"}
--------------------------------------
-- Midcast sets
--------------------------------------
sets.midcast.FastRecast = {
head="Felistris Mask",ear2="Loquacious Earring",
body="Hachiya Chainmail +1",hands="Mochizuki Tekko",ring1="Prolix Ring",
legs="Hachiya Hakama",feet="Qaaxo Leggings"}
sets.midcast.Utsusemi = set_combine(sets.midcast.SelfNinjutsu, {feet="Iga Kyahan +2"})
sets.midcast.ElementalNinjutsu = {
head="Hachiya Hatsuburi",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Hachiya Chainmail +1",hands="Iga Tekko +2",ring1="Icesoul Ring",ring2="Acumen Ring",
back="Toro Cape",waist=gear.ElementalObi,legs="Nahtirah Trousers",feet="Hachiya Kyahan"}
sets.midcast.ElementalNinjutsu.Resistant = set_combine(sets.midcast.Ninjutsu, {ear1="Lifestorm Earring",ear2="Psystorm Earring",
back="Yokaze Mantle"})
sets.midcast.NinjutsuDebuff = {
head="Hachiya Hatsuburi",neck="Stoicheion Medal",ear1="Lifestorm Earring",ear2="Psystorm Earring",
hands="Mochizuki Tekko",ring2="Sangoma Ring",
back="Yokaze Mantle",feet="Hachiya Kyahan"}
sets.midcast.NinjutsuBuff = {head="Hachiya Hatsuburi",neck="Ej Necklace",back="Yokaze Mantle"}
sets.midcast.RA = {
head="Felistris Mask",neck="Ej Necklace",
body="Hachiya Chainmail +1",hands="Hachiya Tekko",ring1="Beeline Ring",
back="Yokaze Mantle",legs="Nahtirah Trousers",feet="Qaaxo Leggings"}
-- Hachiya Hakama/Thurandaut Tights +1
--------------------------------------
-- Idle/resting/defense/etc sets
--------------------------------------
-- Resting sets
sets.resting = {head="Ocelomeh Headpiece +1",neck="Wiglen Gorget",
ring1="Sheltered Ring",ring2="Paguroidea Ring"}
-- Idle sets
sets.idle = {
head="Whirlpool Mask",neck="Wiglen Gorget",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Hachiya Chainmail +1",hands="Otronif Gloves",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Flume Belt",legs="Hachiya Hakama",feet=gear.MovementFeet}
sets.idle.Town = {main="Raimitsukane",sub="Kaitsuburi",ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Wiglen Gorget",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Hachiya Chainmail +1",hands="Otronif Gloves",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Atheling Mantle",waist="Patentia Sash",legs="Hachiya Hakama",feet=gear.MovementFeet}
sets.idle.Weak = {
head="Whirlpool Mask",neck="Wiglen Gorget",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Hachiya Chainmail +1",hands="Otronif Gloves",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Shadow Mantle",waist="Flume Belt",legs="Hachiya Hakama",feet=gear.MovementFeet}
-- Defense sets
sets.defense.Evasion = {
head="Felistris Mask",neck="Ej Necklace",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Beeline Ring",
back="Yokaze Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
sets.defense.PDT = {ammo="Iron Gobbet",
head="Whirlpool Mask",neck="Twilight Torque",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
sets.defense.MDT = {ammo="Demonry Stone",
head="Whirlpool Mask",neck="Twilight Torque",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Engulfer Cape",waist="Flume Belt",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
sets.Kiting = {feet=gear.MovementFeet}
--------------------------------------
-- Engaged sets
--------------------------------------
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {ammo="Qirmiz Tathlum",
head="Iga Zukin +2",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Hachiya Chainmail +1",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Patentia Sash",legs="Mochizuki Hakama",feet="Otronif Boots +1"}
sets.engaged.Acc = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Mochizuki Chainmail",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Manibozho Boots"}
sets.engaged.Evasion = {ammo="Qirmiz Tathlum",
head="Felistris Mask",neck="Ej Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Hachiya Chainmail +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Patentia Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.Acc.Evasion = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Ej Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.PDT = {ammo="Qirmiz Tathlum",
head="Felistris Mask",neck="Twilight Torque",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Patentia Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.Acc.PDT = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
-- Custom melee group: High Haste (~20% DW)
sets.engaged.HighHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Hachiya Chainmail +1",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Patentia Sash",legs="Hachiya Hakama",feet="Manibozho Boots"}
sets.engaged.Acc.HighHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Mochizuki Chainmail",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Manibozho Boots"}
sets.engaged.Evasion.HighHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Ej Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Hachiya Chainmail +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Patentia Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.Acc.Evasion.HighHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Ej Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.PDT.HighHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Patentia Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.Acc.PDT.HighHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
-- Custom melee group: Embrava Haste (7% DW)
sets.engaged.EmbravaHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Qaaxo Harness",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Manibozho Boots"}
sets.engaged.Acc.EmbravaHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Mochizuki Chainmail",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Manibozho Boots"}
sets.engaged.Evasion.EmbravaHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Ej Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Windbuffet Belt",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.Acc.Evasion.EmbravaHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Ej Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.PDT.EmbravaHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Otronif Boots +1"}
sets.engaged.Acc.PDT.EmbravaHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Otronif Boots +1"}
-- Custom melee group: Max Haste (0% DW)
sets.engaged.MaxHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Qaaxo Harness",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Manibozho Boots"}
sets.engaged.Acc.MaxHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Manibozho Boots"}
sets.engaged.Evasion.MaxHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Ej Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Windbuffet Belt",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.Acc.Evasion.MaxHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Ej Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Beeline Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Hachiya Hakama",feet="Otronif Boots +1"}
sets.engaged.PDT.MaxHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Otronif Boots +1"}
sets.engaged.Acc.PDT.MaxHaste = {ammo="Qirmiz Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Epona's Ring",
back="Yokaze Mantle",waist="Hurch'lan Sash",legs="Manibozho Brais",feet="Otronif Boots +1"}
--------------------------------------
-- Custom buff sets
--------------------------------------
sets.buff.Migawari = {body="Iga Ningi +2"}
sets.buff.Doom = {ring2="Saida Ring"}
sets.buff.Yonin = {}
sets.buff.Innin = {}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Run after the general midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
if state.Buff.Doom then
equip(sets.buff.Doom)
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if not spell.interrupted and spell.english == "Migawari: Ichi" then
state.Buff.Migawari = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- If we gain or lose any haste buffs, adjust which gear set we target.
if S{'haste','march','embrava','haste samba'}:contains(buff:lower()) then
determine_haste_group()
handle_equipping_gear(player.status)
elseif state.Buff[buff] ~= nil then
handle_equipping_gear(player.status)
end
end
function job_status_change(new_status, old_status)
if new_status == 'Idle' then
select_movement_feet()
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Get custom spell maps
function job_get_spell_map(spell, default_spell_map)
if spell.skill == "Ninjutsu" then
if not default_spell_map then
if spell.target.type == 'SELF' then
return 'NinjutsuBuff'
else
return 'NinjutsuDebuff'
end
end
end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.Buff.Migawari then
idleSet = set_combine(idleSet, sets.buff.Migawari)
end
if state.Buff.Doom then
idleSet = set_combine(idleSet, sets.buff.Doom)
end
return idleSet
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
if state.Buff.Migawari then
meleeSet = set_combine(meleeSet, sets.buff.Migawari)
end
if state.Buff.Doom then
meleeSet = set_combine(meleeSet, sets.buff.Doom)
end
return meleeSet
end
-- Called by the default 'update' self-command.
function job_update(cmdParams, eventArgs)
select_movement_feet()
determine_haste_group()
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function determine_haste_group()
-- We have three groups of DW in gear: Hachiya body/legs, Iga head + Patentia Sash, and DW earrings
-- Standard gear set reaches near capped delay with just Haste (77%-78%, depending on HQs)
-- For high haste, we want to be able to drop one of the 10% groups.
-- Basic gear hits capped delay (roughly) with:
-- 1 March + Haste
-- 2 March
-- Haste + Haste Samba
-- 1 March + Haste Samba
-- Embrava
-- High haste buffs:
-- 2x Marches + Haste Samba == 19% DW in gear
-- 1x March + Haste + Haste Samba == 22% DW in gear
-- Embrava + Haste or 1x March == 7% DW in gear
-- For max haste (capped magic haste + 25% gear haste), we can drop all DW gear.
-- Max haste buffs:
-- Embrava + Haste+March or 2x March
-- 2x Marches + Haste
-- So we want four tiers:
-- Normal DW
-- 20% DW -- High Haste
-- 7% DW (earrings) - Embrava Haste (specialized situation with embrava and haste, but no marches)
-- 0 DW - Max Haste
classes.CustomMeleeGroups:clear()
if buffactive.embrava and (buffactive.march == 2 or (buffactive.march and buffactive.haste)) then
classes.CustomMeleeGroups:append('MaxHaste')
elseif buffactive.march == 2 and buffactive.haste then
classes.CustomMeleeGroups:append('MaxHaste')
elseif buffactive.embrava and (buffactive.haste or buffactive.march) then
classes.CustomMeleeGroups:append('EmbravaHaste')
elseif buffactive.march == 1 and buffactive.haste and buffactive['haste samba'] then
classes.CustomMeleeGroups:append('HighHaste')
elseif buffactive.march == 2 then
classes.CustomMeleeGroups:append('HighHaste')
end
end
function select_movement_feet()
if world.time >= 17*60 or world.time < 7*60 then
gear.MovementFeet.name = gear.NightFeet
else
gear.MovementFeet.name = gear.DayFeet
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(4, 3)
elseif player.sub_job == 'THF' then
set_macro_page(5, 3)
else
set_macro_page(1, 3)
end
end