-
Notifications
You must be signed in to change notification settings - Fork 383
/
Copy pathunending_coil_ultimate.js
2318 lines (2318 loc) · 87.1 KB
/
unending_coil_ultimate.js
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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const resetTrio = (data, trio) => {
data.trio = trio;
data.shakers = [];
data.megaStack = [];
};
const centerX = 0;
const centerY = 0;
const isClockwise = (start, compare) => {
// assumes both start and compare are 0-360.
// returns false if start = compare
let isCW = false;
if (compare > start)
isCW = compare - start <= 180;
else if (compare < start)
isCW = start - compare >= 180;
return isCW;
};
// Begin copy and paste from dragon_test.js.
const modDistance = (mark, dragon) => {
const oneWay = (dragon - mark + 8) % 8;
const otherWay = (mark - dragon + 8) % 8;
const distance = Math.min(oneWay, otherWay);
console.assert(distance >= 0);
return distance;
};
const badSpots = (mark, dragon) => {
// All spots between mark and dragon are bad. If distance == 1,
// then the dragon hits the spot behind the mark too. e.g. N
// mark, NE dragon will also hit NW.
const bad = [];
const distance = modDistance(mark, dragon);
console.assert(distance > 0);
console.assert(distance <= 2);
if ((mark + distance + 8) % 8 === dragon) {
// Clockwise.
for (let i = 0; i <= distance; ++i)
bad.push((mark + i) % 8);
if (distance === 1)
bad.push((mark - 1 + 8) % 8);
} else {
// Widdershins.
for (let i = 0; i <= distance; ++i)
bad.push((mark - i + 8) % 8);
if (distance === 1)
bad.push((mark + 1) % 8);
}
return bad;
};
const findDragonMarks = (array) => {
const marks = [-1, -1, -1];
let isWideThirdDive = false;
const dragons = [];
for (let i = 0; i < 8; ++i) {
if (array[i])
dragons.push(i);
}
if (dragons.length !== 5)
return;
const [d0, d1, d2, d3, d4] = dragons;
if (
d0 === undefined || d1 === undefined || d2 === undefined ||
d3 === undefined || d4 === undefined
)
return;
// MARK 1: counterclockwise of #1 if adjacent, clockwise if not.
if (d0 + 1 === d1) {
// If the first two dragons are adjacent, they *must* go CCW.
// In the scenario of N, NE, SE, S, W dragons, the first marker
// could be E, but that forces the second mark to be S (instead
// of E), making SW unsafe for putting the mark between S and W.
// Arguably, NW could be used here for the third mark, but then
// the S dragon would cut off more of the middle of the arena
// than desired. This still could happen anyway in the
// "tricksy" edge case below, but should be avoided if possible.
marks[0] = (d0 - 1 + 8) % 8;
} else {
// Split dragons. Bias towards first dragon.
marks[0] = Math.floor((d0 + d1) / 2);
}
// MARK 2: go counterclockwise, unless dragon 2 is adjacent to 3.
if (d1 === d2 - 1) {
// Go clockwise.
marks[1] = d2 + 1;
} else {
// Go counterclockwise.
marks[1] = d2 - 1;
}
// MARK 3: if split, between 4 & 5. If adjacent, clockwise of 5.
if (d3 + 1 === d4) {
// Adjacent dragons.
// Clockwise is always ok.
marks[2] = (d4 + 1) % 8;
// Minor optimization:
// See if counterclockwise is an option to avoid having mark 3
// in a place that the first pair covers.
//
// If dragon 3 is going counterclockwise, then only need one
// hole between #3 and #4, otherwise need all three holes.
// e.g. N, NE, E, W, NW dragon pattern should prefer third
// mark SW instead of N.
const distance = marks[1] === d2 - 1 ? 2 : 4;
if (d3 >= d2 + distance)
marks[2] = d3 - 1;
} else {
// Split dragons. Common case: bias towards last dragon, in case
// 2nd charge is going towards this pair.
marks[2] = Math.ceil((d3 + d4) / 2);
if (marks[1] === d3 && marks[2] === marks[1] + 1) {
// Tricksy edge case, e.g. N, NE, E, SE, SW. S not safe for
// third mark because second mark is at SE, and E dragon will
// clip S. Send all dragons CW even if this means eating more
// arena space.
marks[2] = (d4 + 1) % 8;
isWideThirdDive = true;
}
}
const bad = badSpots(marks[0], d0);
bad.concat(badSpots(marks[0], d1));
return {
// Third drive is on a dragon three squares away and will cover
// more of the middle than usual, e.g. SE dragon, SW dragon,
// mark W (because S is unsafe from 2nd dive).
wideThirdDive: isWideThirdDive,
// Third mark spot is covered by the first dive so needs to be
// patient. Third mark should always be patient, but you never
// know.
unsafeThirdMark: bad.includes(marks[2]),
marks: marks,
};
};
// End copy and paste.
// UCU - The Unending Coil Of Bahamut (Ultimate)
Options.Triggers.push({
id: 'TheUnendingCoilOfBahamutUltimate',
zoneId: ZoneId.TheUnendingCoilOfBahamutUltimate,
timelineFile: 'unending_coil_ultimate.txt',
initData: () => {
return {
partyList: {},
monitoringHP: false,
hpThresholds: [0, 0, 0.75, 0.45],
currentPhase: 2,
fireDebuff: false,
iceDebuff: false,
thunderDebuffs: [],
thunderOnYou: false,
naelFireballCount: 0,
fireballs: {
1: [],
2: [],
3: [],
4: [],
},
seenDragon: {},
naelDragons: [0, 0, 0, 0, 0, 0, 0, 0],
calledNaelDragons: false,
wideThirdDive: false,
unsafeThirdMark: false,
naelDiveMarkerCount: 0,
trioSourceIds: {},
combatantData: [],
shakers: [],
megaStack: [],
octetMarker: [],
exaflareCount: 0,
akhMornCount: 0,
mornAfahCount: 0,
};
},
timelineTriggers: [
{
id: 'UCU Bahamut\'s Claw',
regex: /Bahamut's Claw x5/,
beforeSeconds: 5,
// It's tough to track who this is on, especially for the first one.
// Both tanks should care about the tankbuster because they can throw
// mitigation on the other, so just always play this for both tanks.
suppressSeconds: 1,
response: Responses.tankBuster(),
},
{
id: 'UCU Plummet',
regex: /Plummet/,
beforeSeconds: 3,
suppressSeconds: 10,
response: Responses.tankCleave(),
},
{
id: 'UCU Flare Breath',
regex: /Flare Breath/,
beforeSeconds: 4,
suppressSeconds: 10,
response: Responses.tankCleave(),
},
],
triggers: [
// --- State ---
{
id: 'UCU Firescorched Gain',
type: 'GainsEffect',
netRegex: { effectId: '1D0' },
condition: Conditions.targetIsYou(),
run: (data) => data.fireDebuff = true,
},
{
id: 'UCU Firescorched Lose',
type: 'LosesEffect',
netRegex: { effectId: '1D0' },
condition: Conditions.targetIsYou(),
run: (data) => data.fireDebuff = false,
},
{
id: 'UCU Icebitten Gain',
type: 'GainsEffect',
netRegex: { effectId: '1D1' },
condition: Conditions.targetIsYou(),
run: (data) => data.iceDebuff = true,
},
{
id: 'UCU Icebitten Lose',
type: 'LosesEffect',
netRegex: { effectId: '1D1' },
condition: Conditions.targetIsYou(),
run: (data) => data.iceDebuff = false,
},
{
id: 'UCU Fireball Counter',
type: 'Ability',
netRegex: { id: '26C5', source: 'Firehorn' },
run: (data, matches) => {
(data.fireballs[data.naelFireballCount] ??= []).push(matches.target);
},
},
{
id: 'UCU Quickmarch Phase',
type: 'StartsUsing',
netRegex: { id: '26E2', source: 'Bahamut Prime', capture: false },
run: (data) => resetTrio(data, 'quickmarch'),
},
{
id: 'UCU Blackfire Phase',
type: 'StartsUsing',
netRegex: { id: '26E3', source: 'Bahamut Prime', capture: false },
run: (data) => resetTrio(data, 'blackfire'),
},
{
id: 'UCU Fellruin Phase',
type: 'StartsUsing',
netRegex: { id: '26E4', source: 'Bahamut Prime', capture: false },
run: (data) => resetTrio(data, 'fellruin'),
},
{
id: 'UCU Heavensfall Phase',
type: 'StartsUsing',
netRegex: { id: '26E5', source: 'Bahamut Prime', capture: false },
run: (data) => resetTrio(data, 'heavensfall'),
},
{
id: 'UCU Tenstrike Phase',
type: 'StartsUsing',
netRegex: { id: '26E6', source: 'Bahamut Prime', capture: false },
run: (data) => resetTrio(data, 'tenstrike'),
},
{
id: 'UCU Octet Phase',
type: 'StartsUsing',
netRegex: { id: '26E7', source: 'Bahamut Prime', capture: false },
run: (data) => resetTrio(data, 'octet'),
},
{
id: 'UCU Ragnarok Party Tracker',
type: 'Ability',
netRegex: { id: '26B8', source: 'Ragnarok' },
run: (data, matches) => {
// This happens once during the nael transition and again during
// the heavensfall trio. This should proooobably hit all 8
// people by the time you get to octet.
data.partyList[matches.target] = true;
},
},
// --- Twintania ---
{
id: 'UCU Twisters',
type: 'StartsUsing',
netRegex: { id: '26AA', source: 'Twintania', capture: false },
alertText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Twisters',
de: 'Wirbelstürme',
fr: 'Tornades',
ja: '大竜巻',
cn: '旋风',
ko: '회오리',
},
},
},
{
id: 'UCU Death Sentence',
type: 'StartsUsing',
netRegex: { id: '26A9', source: 'Twintania' },
response: Responses.tankBusterSwap(),
},
{
id: 'UCU Hatch Collect',
type: 'HeadMarker',
netRegex: { id: '0076' },
run: (data, matches) => {
data.hatch ??= [];
data.hatch.push(matches.target);
},
},
{
id: 'UCU Hatch Marker YOU',
type: 'HeadMarker',
netRegex: { id: '0076' },
condition: Conditions.targetIsYou(),
alarmText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Hatch on YOU',
de: 'Ausbrüten auf DIR',
fr: 'Éclosion sur VOUS',
ja: '自分に魔力爆散',
cn: '点名魔力爆散',
ko: '나에게 마력연성',
},
},
},
{
id: 'UCU Hatch Callouts',
type: 'HeadMarker',
netRegex: { id: '0076', capture: false },
delaySeconds: 0.25,
infoText: (data, _matches, output) => {
if (!data.hatch)
return;
const hatches = data.hatch.map((n) => data.party.member(n));
delete data.hatch;
return output.text({ players: hatches });
},
outputStrings: {
text: {
en: 'Hatch: ${players}',
de: 'Ausbrüten: ${players}',
fr: 'Éclosion : ${players}',
ja: '魔力爆散${players}',
cn: '魔力爆散${players}',
ko: '마력연성: ${players}',
},
},
},
{
id: 'UCU Hatch Cleanup',
type: 'HeadMarker',
netRegex: { id: '0076', capture: false },
delaySeconds: 5,
run: (data) => delete data.hatch,
},
{
id: 'UCU Twintania Phase Change Watcher',
type: 'StartsUsing',
// On Twister or Generate.
netRegex: { id: '26A[AE]', source: 'Twintania' },
condition: (data) => !data.monitoringHP && data.hpThresholds[data.currentPhase] !== undefined,
preRun: (data) => data.monitoringHP = true,
promise: (data, matches) =>
Util.watchCombatant({
ids: [parseInt(matches.sourceId, 16)],
}, (ret) => {
return ret.combatants.some((c) => {
const currentHPCheck = data.hpThresholds[data.currentPhase] ?? -1;
return c.CurrentHP / c.MaxHP <= currentHPCheck;
});
}),
sound: 'Long',
infoText: (data, _matches, output) => output.text({ num: data.currentPhase }),
run: (data) => {
data.currentPhase++;
data.monitoringHP = false;
},
outputStrings: {
text: {
en: 'Phase ${num} Push',
de: 'Phase ${num} Stoß',
fr: 'Phase ${num} poussée',
ja: 'フェーズ${num}',
cn: 'P${num}准备',
ko: '트윈 페이즈${num}',
},
},
},
// --- Nael ---
{
// https://xivapi.com/NpcYell/6497?pretty=true
id: 'UCU Nael Quote 1',
type: 'GameLog',
netRegex: {
line: 'From on high I descend, the hallowed moon to call.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 6,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Spread => In',
de: 'Verteilen => Rein',
fr: 'Dispersez-vous => Intérieur',
ja: '散開 => 密着',
cn: '分散 => 靠近',
ko: '산개 => 안으로',
},
},
},
{
// https://xivapi.com/NpcYell/6496?pretty=true
id: 'UCU Nael Quote 2',
type: 'GameLog',
netRegex: {
line: 'From on high I descend, the iron path to walk.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 6,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Spread => Out',
de: 'Verteilen => Raus',
fr: 'Dispersez-vous => Extérieur',
ja: '散開 => 離れ',
cn: '分散 => 远离',
ko: '산개 => 밖으로',
},
},
},
{
// https://xivapi.com/NpcYell/6495?pretty=true
id: 'UCU Nael Quote 3',
type: 'GameLog',
netRegex: {
line: 'Take fire, O hallowed moon.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 6,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Stack => In',
de: 'Stack => Rein',
fr: 'Packez-vous => Intérieur',
ja: '頭割り => 密着',
cn: '集合 => 靠近',
ko: '쉐어 => 안으로',
},
},
},
{
// https://xivapi.com/NpcYell/6494?pretty=true
id: 'UCU Nael Quote 4',
type: 'GameLog',
netRegex: {
line: 'Blazing path, lead me to iron rule.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Stack => Out',
de: 'Stack => Raus',
fr: 'Packez-vous => Extérieur',
ja: '頭割り => 離れ',
cn: '集合 => 远离',
ko: '쉐어 => 밖으로',
},
},
},
{
// https://xivapi.com/NpcYell/6493?pretty=true
id: 'UCU Nael Quote 5',
type: 'GameLog',
netRegex: {
line: 'O hallowed moon, take fire and scorch my foes.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'In => Stack',
de: 'Rein => Stack',
fr: 'Intérieur => Packez-vous',
ja: '密着 => 頭割り',
cn: '靠近 => 集合',
ko: '안으로 => 쉐어',
},
},
},
{
// https://xivapi.com/NpcYell/6492?pretty=true
id: 'UCU Nael Quote 6',
type: 'GameLog',
netRegex: {
line: 'O hallowed moon, shine you the iron path.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'In => Out',
de: 'Rein => Raus',
fr: 'Intérieur => Extérieur',
ja: '密着 => 離れ',
cn: '靠近 => 远离',
ko: '안으로 => 밖으로',
},
},
},
{
// https://xivapi.com/NpcYell/6501?pretty=true
id: 'UCU Nael Quote 7',
type: 'GameLog',
netRegex: {
line: 'Fleeting light! \'Neath the red moon, scorch you the earth.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
delaySeconds: 4,
durationSeconds: 6,
// Make this alert so it doesn't overlap with the dive infoText occuring here.
alertText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Away from Tank => Stack',
de: 'Weg vom Tank => Stack',
fr: 'Éloignez-vous du tank => Packez-vous',
ja: 'タンクから離れ => 頭割り',
cn: '远离坦克 => 集合',
ko: '탱커 피하기 => 쉐어',
},
},
},
{
// https://xivapi.com/NpcYell/6500?pretty=true
id: 'UCU Nael Quote 8',
type: 'GameLog',
netRegex: {
line: 'Fleeting light! Amid a rain of stars, exalt you the red moon.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
delaySeconds: 4,
durationSeconds: 6,
// Make this alert so it doesn't overlap with the dive infoText occuring here.
alertText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Spread => Away from Tank',
de: 'Verteilen => Weg vom Tank',
fr: 'Dispersez-vous => Éloignez-vous du Tank',
ja: '散開 => タンクから離れ',
cn: '分散 => 远离坦克',
ko: '산개 => 탱커 피하기',
},
},
},
{
// https://xivapi.com/NpcYell/6502?pretty=true
id: 'UCU Nael Quote 9',
type: 'GameLog',
netRegex: {
line: 'From on high I descend, the moon and stars to bring.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 9,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Spread => In',
de: 'Verteilen => Rein',
fr: 'Dispersez-vous => Intérieur',
ja: '散開 => 密着',
cn: '分散 => 靠近',
ko: '산개 => 안으로',
},
},
},
{
// https://xivapi.com/NpcYell/6503?pretty=true
id: 'UCU Nael Quote 10',
type: 'GameLog',
netRegex: {
line: 'From hallowed moon I descend, a rain of stars to bring.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 9,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'In => Spread',
de: 'Rein => Verteilen',
fr: 'Intérieur => Dispersez-vous',
ja: '密着 => 散開',
cn: '靠近 => 分散',
ko: '안으로 => 산개',
},
},
},
{
// https://xivapi.com/NpcYell/6507?pretty=true
id: 'UCU Nael Quote 11',
type: 'GameLog',
netRegex: {
line: 'From hallowed moon I bare iron, in my descent to wield.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 9,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'In => Out => Spread',
de: 'Rein => Raus => Verteilen',
fr: 'Intérieur => Extérieur => Dispersion',
ja: '密着 => 離れ => 散開',
cn: '靠近 => 远离 => 分散',
ko: '안으로 => 밖으로 => 산개',
},
},
},
{
// https://xivapi.com/NpcYell/6506?pretty=true
id: 'UCU Nael Quote 12',
type: 'GameLog',
netRegex: {
line: 'From hallowed moon I descend, upon burning earth to tread.*?',
capture: false,
},
durationSeconds: 9,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'In => Spread => Stack',
de: 'Rein => Verteilen => Stack',
fr: 'Intérieur => Dispersion => Package',
ja: '密着 => 散開 => 頭割り',
cn: '靠近 => 分散 => 集合',
ko: '안으로 => 산개 => 쉐어',
},
},
},
{
// https://xivapi.com/NpcYell/6504?pretty=true
id: 'UCU Nael Quote 13',
type: 'GameLog',
netRegex: {
line: 'Unbending iron, take fire and descend.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 9,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Out => Stack => Spread',
de: 'Raus => Stack => Verteilen',
fr: 'Extérieur => Package => Dispersion',
ja: '離れ => 頭割り => 散開',
cn: '远离 => 集合 => 分散',
ko: '밖으로 => 쉐어 => 산개',
},
},
},
{
// https://xivapi.com/NpcYell/6505?pretty=true
id: 'UCU Nael Quote 14',
type: 'GameLog',
netRegex: {
line: 'Unbending iron, descend with fiery edge.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
durationSeconds: 9,
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
en: 'Out => Spread => Stack',
de: 'Raus => Verteilen => Stack',
fr: 'Extérieur => Dispersion => Package',
ja: '離れ => 散開 => 頭割り',
cn: '远离 => 分散 => 集合',
ko: '밖으로 => 산개 => 쉐어',
},
},
},
{
id: 'UCU Nael Thunder Collect',
type: 'Ability',
netRegex: { source: 'Thunderwing', id: '26C7' },
run: (data, matches) => {
data.thunderDebuffs.push(matches.target);
if (data.me === matches.target)
data.thunderOnYou = true;
},
},
{
id: 'UCU Nael Thunderstruck',
type: 'Ability',
// Note: The 0A event happens before 'gains the effect' and 'starts
// casting on' only includes one person.
netRegex: { source: 'Thunderwing', id: '26C7', capture: false },
delaySeconds: 0.5,
suppressSeconds: 5,
alarmText: (data, _matches, output) => {
if (data.thunderOnYou)
return output.thunderOnYou();
},
infoText: (data, _matches, output) => {
if (!data.thunderOnYou) {
const [thunder1, thunder2] = data.thunderDebuffs.map((p) => data.party.member(p));
return output.thunderOnOthers({ player1: thunder1, player2: thunder2 });
}
},
run: (data) => {
data.thunderDebuffs = [];
data.thunderOnYou = false;
},
outputStrings: {
thunderOnYou: {
en: 'Thunder on YOU',
de: 'Blitz auf DIR',
fr: 'Foudre sur VOUS',
ja: '自分にサンダー',
cn: '雷点名',
ko: '나에게 번개',
},
thunderOnOthers: {
en: 'Thunder on ${player1}, ${player2}',
de: 'Blitz auf ${player1}, ${player2}',
cn: '雷点 ${player1}, ${player2}',
ko: '번개 ${player1}, ${player2}',
},
},
},
{
id: 'UCU Nael Your Doom',
type: 'GainsEffect',
netRegex: { effectId: 'D2' },
condition: (data, matches) => {
return data.me === matches.target;
},
durationSeconds: (_data, matches) => {
if (parseFloat(matches.duration) <= 6)
return 3;
if (parseFloat(matches.duration) <= 10)
return 6;
return 9;
},
suppressSeconds: 20,
alarmText: (_data, matches, output) => {
if (parseFloat(matches.duration) <= 6)
return output.doom1();
if (parseFloat(matches.duration) <= 10)
return output.doom2();
return output.doom3();
},
tts: (_data, matches, output) => {
if (parseFloat(matches.duration) <= 6)
return output.justNumber({ num: '1' });
if (parseFloat(matches.duration) <= 10)
return output.justNumber({ num: '2' });
return output.justNumber({ num: '3' });
},
outputStrings: {
doom1: {
en: 'Doom #1 on YOU',
de: 'Verhängnis #1 auf DIR',
fr: 'Glas #1 sur VOUS',
ja: '自分に一番目死の宣告',
cn: '死宣一号点名',
ko: '죽음의 선고 1번',
},
doom2: {
en: 'Doom #2 on YOU',
de: 'Verhängnis #2 auf DIR',
fr: 'Glas #2 sur VOUS',
ja: '自分に二番目死の宣告',
cn: '死宣二号点名',
ko: '죽음의 선고 2번',
},
doom3: {
en: 'Doom #3 on YOU',
de: 'Verhängnis #3 auf DIR',
fr: 'Glas #3 sur VOUS',
ja: '自分に三番目死の宣告',
cn: '死宣三号点名',
ko: '죽음의 선고 3번',
},
justNumber: {
en: '${num}',
de: '${num}',
fr: '${num}',
ja: '${num}',
cn: '${num}',
ko: '${num}',
},
},
},
{
id: 'UCU Doom Init',
type: 'GainsEffect',
netRegex: { effectId: 'D2' },
run: (data, matches) => {
data.dooms ??= [null, null, null];
let order = null;
if (parseFloat(matches.duration) < 9)
order = 0;
else if (parseFloat(matches.duration) < 14)
order = 1;
else
order = 2;
// FIXME: temporary workaround for multiple gains effects messages.
// https://github.com/ravahn/FFXIV_ACT_Plugin/issues/223#issuecomment-513486275
if (order !== null && data.dooms[order] === null)
data.dooms[order] = matches.target;
},
},
{
id: 'UCU Doom Cleanup',
type: 'GainsEffect',
netRegex: { effectId: 'D2', capture: false },
delaySeconds: 20,
run: (data) => {
delete data.dooms;
delete data.doomCount;
},
},
{
id: 'UCU Nael Cleanse Callout',
type: 'Ability',
netRegex: { source: 'Fang Of Light', id: '26CA', capture: false },
infoText: (data, _matches, output) => {
data.doomCount ??= 0;
let name;
if (data.dooms)
name = data.dooms[data.doomCount];
data.doomCount++;
if (typeof name === 'string')
return output.text({ num: data.doomCount, player: data.party.member(name) });
},
outputStrings: {
text: {
en: 'Cleanse #${num}: ${player}',
de: 'Medica #${num}: ${player}',
fr: 'Purifiez #${num}: ${player}',
ja: '解除に番目${num}: ${player}',
cn: '解除死宣 #${num}: ${player}',
ko: '선고 해제 ${num}: ${player}',
},
},
},
{
id: 'UCU Nael Fireball 1',
type: 'Ability',
netRegex: { source: 'Ragnarok', id: '26B8', capture: false },
delaySeconds: 35,
suppressSeconds: 99999,
infoText: (_data, _matches, output) => output.text(),
run: (data) => data.naelFireballCount = 1,
outputStrings: {
text: {
en: 'Fire IN',
de: 'Feuer INNEN',
fr: 'Feu à l\'INTÉRIEUR',
ja: 'ファイアボールは密着',
cn: '火1 分摊',
ko: '불 같이맞기',
},
},
},
{
id: 'UCU Nael Fireball 2',
type: 'Ability',
netRegex: { source: 'Ragnarok', id: '26B8', capture: false },
delaySeconds: 51,
suppressSeconds: 99999,
alertText: (data, _matches, output) => {
// All players should be neutral by the time fire #2 happens.
// If you have ice at this point, it means you missed the first
// stack. Therefore, make sure you stack. It's possible you
// can survive until fire 3 happens, but it's not 100%.
// See: https://www.reddit.com/r/ffxiv/comments/78mdwd/bahamut_ultimate_mechanics_twin_and_nael_minutia/
if (!data.fireballs[1]?.includes(data.me))
return output.fireOutBeInIt();
},
infoText: (data, _matches, output) => {
if (data.fireballs[1]?.includes(data.me))
return output.fireOut();
},
run: (data) => data.naelFireballCount = 2,
outputStrings: {
fireOut: {
en: 'Fire OUT',
de: 'Feuer AUßEN',
fr: 'Feu à l\'EXTÉRIEUR',
ja: 'ファイアボールは離れ',
cn: '火2 出人群',
ko: '불 대상자 밖으로',
},
fireOutBeInIt: {
en: 'Fire OUT: Be in it',
de: 'Feuer AUßEN: Drin sein',
fr: 'Feu à l\'EXTÉRIEUR : Allez dessus',
ja: 'ファイアボールは離れ: 自分に密着',
cn: '火2 补火',
ko: '불 대상자 밖으로: 나는 같이 맞기',
},
},
},
{
id: 'UCU Nael Fireball 3',
type: 'Ability',
netRegex: { source: 'Ragnarok', id: '26B8', capture: false },
delaySeconds: 77,
suppressSeconds: 99999,
alertText: (data, _matches, output) => {
// If you were the person with fire tether #2, then you could
// have fire debuff here and need to not stack.
if (data.fireballs[1]?.includes(data.me) && data.fireballs[2]?.includes(data.me))
return output.fireInAvoid();
},
infoText: (data, _matches, output) => {
const tookTwo = data.fireballs[1]?.filter((p) => {
return data.fireballs[2]?.includes(p);
});
if (tookTwo?.includes(data.me))
return;
if (tookTwo && tookTwo.length > 0) {
const players = tookTwo.map((name) => data.party.member(name));
return output.fireInPlayersOut({ players: players });
}
return output.fireIn();
},
run: (data) => data.naelFireballCount = 3,
outputStrings: {
fireIn: {
en: 'Fire IN',
de: 'Feuer INNEN',
fr: 'Feu à l\'INTÉRIEUR',
ja: 'ファイアボールは密着',
cn: '火3 分摊',
ko: '불 같이맞기',
},
fireInPlayersOut: {
en: 'Fire IN (${players} out)',
de: 'Feuer INNEN (${players} raus)',
fr: 'Feu à l\'INTÉRIEUR (${players} évitez)',
ja: 'ファイアボールは密着 (${players}は外へ)',
cn: '火3 (${players}躲避)',
ko: '불 같이맞기 (${players} 는 피하기)',
},
fireInAvoid: {
en: 'Fire IN: AVOID!',
de: 'Feuer INNEN: AUSWEICHEN!',
fr: 'Feu à l\'INTÉRIEUR : ÉVITEZ !',
ja: 'ファイアボールは密着: 自分に離れ',
cn: '火3 躲避!',
ko: '불 같이맞기: 나는 피하기',
},
},
},
{
id: 'UCU Nael Fireball 4',
type: 'Ability',
netRegex: { source: 'Ragnarok', id: '26B8', capture: false },
delaySeconds: 98,
suppressSeconds: 99999,
alertText: (data, _matches, output) => {
const tookTwo = data.fireballs[1]?.filter((p) => {
return data.fireballs[2]?.includes(p);
});
const tookThree = (tookTwo ?? []).filter((p) => {
return data.fireballs[3]?.includes(p);
});
data.tookThreeFireballs = tookThree.includes(data.me);
// It's possible that you can take 1, 2, and 3 even if nobody dies with
// careful ice debuff luck. However, this means you probably shouldn't
// take 4.
if (data.tookThreeFireballs)
return output.fireInAvoid();
},
infoText: (data, _matches, output) => {
if (!data.tookThreeFireballs)
return output.fireIn();