-
Notifications
You must be signed in to change notification settings - Fork 383
/
Copy patho3s.js
198 lines (198 loc) · 6.51 KB
/
o3s.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
// O3S - Deltascape 3.0 Savage
[{
zoneRegex: /(Deltascape V3.0 \(Savage\)|Unknown Zone \(2B9\))/,
timelineFile: 'o3s.txt',
triggers: [
{
id: 'O3S Phase Counter',
regex: /:Halicarnassus starts using Panel Swap/,
run: function(data) {
data.phase = (data.phase || 0) + 1;
delete data.seenHolyThisPhase;
},
},
{
// Look for spellblade holy so that the last noisy waltz
// books message in the library phase can be ignored.
id: 'Spellblade holy counter',
regex: /:Halicarnassus:22EF:Spellblade Holy:/,
run: function(data) {
// In case something went awry, clean up any holy targets
// so the next spellblade holy can start afresh.
delete data.holyTargets;
data.seenHolyThisPhase = true;
},
},
{
// Normal spellblade holy with tethers and one stack point.
// "64" is a stack marker. "65" is the prey marker.
// The debuff order in the logs is:
// (1) stack marker (tethered to #2)
// (2) prey marker (tethered to #1)
// (3) prey marker (tethered to #4)
// (4) prey marker (tethered to #3)
// So, #2 is the person everybody should stack on.
id: 'O3S Spellblade Holy',
regex: /1B:........:(\y{Name}):....:....:006[45]:0000:0000:0000:/,
alarmText: function(data) {
if (data.holyTargets[1] != data.me)
return '';
return 'Stack on YOU';
},
alertText: function(data) {
if (data.holyTargets[1] == data.me)
return;
for (var i = 0; i < 4; ++i) {
if (data.holyTargets[i] == data.me)
return 'Get out';
}
return 'Stack on ' + data.holyTargets[1];
},
infoText: function(data) {
for (var i = 0; i < 4; ++i) {
if (data.holyTargets[i] == data.me)
return 'others stack on ' + data.holyTargets[1];
}
},
condition: function(data, matches) {
// Library phase stack markers behave differently.
if (data.phase == 3)
return false;
data.holyTargets = data.holyTargets || [];
data.holyTargets.push(matches[1]);
return data.holyTargets.length == 4;
},
tts: function(data) {
if (data.holyTargets[1] == data.me)
return 'stack on you';
for (var i = 0; i < 4; ++i) {
if (data.holyTargets[i] == data.me)
return 'get out';
}
return 'stack on ' + data.holyTargets[i];
},
run: function(data) {
delete data.holyTargets;
},
},
{
// Library phase spellblade holy with 2 stacks / 4 preys / 2 unmarked.
id: 'O3S Library Spellblade',
regex: /1B:........:(\y{Name}):....:....:(006[45]):0000:0000:0000:/,
alertText: function(data) {
if (data.librarySpellbladePrinted)
return;
data.librarySpellbladePrinted = true;
if (data.librarySpellbladeMe == '0064')
return 'go south: stack on you';
if (data.librarySpellbladeMe == '0065')
return 'go north';
return 'go south: stack on friend';
},
// Because people can be dead and there are eight marks, delay to
// accumulate logs instead of counting marks. Instantly print if
// anything is on you. The 6 triggers will all have condition=true
// and run, but only the first one will print.
delaySeconds: function(data, matches) {
return matches[1] == data.me ? 0 : 0.5;
},
condition: function(data, matches) {
// This is only for library phase.
if (data.phase != 3)
return false;
if (matches[1] == data.me)
data.librarySpellbladeMe = matches[2];
return true;
},
tts: function(data) {
if (data.librarySpellbladePrinted)
return;
data.librarySpellbladePrinted = true;
if (data.librarySpellbladeMe == '0064')
return 'stack outside';
if (data.librarySpellbladeMe == '0065')
return 'go north';
return 'stack inside';
}
},
{
id: 'O3S Right Face',
regex: /(\y{Name}) gains the effect of (?:Unknown_510|Right Face) from/,
infoText: 'Mindjack: Right',
durationSeconds: 8,
condition: function(data, matches) { return matches[1] == data.me; },
tts: 'mindjack right',
},
{
id: 'O3S Forward March',
regex: /(\y{Name}) gains the effect of (?:Unknown_50D|Forward March) from/,
infoText: 'Mindjack: Forward',
durationSeconds: 8,
condition: function(data, matches) { return matches[1] == data.me; },
tts: 'mindjack forward',
},
{
id: 'O3S Left Face',
regex: /(\y{Name}) gains the effect of (?:Unknown_50F|Left Face) from/,
infoText: 'Mindjack: Left',
durationSeconds: 8,
condition: function(data, matches) { return matches[1] == data.me; },
tts: 'mindjack left',
},
{
id: 'O3S About Face',
regex: /(\y{Name}) gains the effect of (?:Unknown_50E|About Face) from/,
infoText: 'Mindjack: Back',
durationSeconds: 8,
condition: function(data, matches) { return matches[1] == data.me; },
tts: 'mindjack back',
},
{
id: 'O3S Ribbit',
regex: /:22F7:Halicarnassus starts using/,
alertText: 'Ribbit: Get behind',
tts: 'ribbit',
},
{
id: 'O3S Oink',
regex: /:22F9:Halicarnassus starts using/,
infoText: 'Oink: Stack',
tts: 'oink',
},
{
id: 'O3S Squelch',
regex: /:22F8:Halicarnassus starts using/,
alarmText: 'Squelch: Look away',
tts: 'look away',
},
{
id: 'O3S The Queen\'s Waltz: Books',
regex: /:230E:Halicarnassus starts using/,
condition: function(data) {
// Deliberately skip printing the waltz message for the
// spellblade holy -> waltz that ends the library phase.
return data.phase != 3 || !data.seenHolyThisPhase;
},
alertText: 'The Queen\'s Waltz: Books',
tts: 'books',
},
{
id: 'O3S The Queen\'s Waltz: Clock',
regex: /:2306:Halicarnassus starts using/,
infoText: 'The Queen\'s Waltz: Clock',
tts: 'clock',
},
{
id: 'O3S The Queen\'s Waltz: Crystal Square',
regex: /:230A:Halicarnassus starts using/,
infoText: 'The Queen\'s Waltz: Crystal Square',
tts: 'blue square',
},
{
id: 'O3S The Queen\'s Waltz: Tethers',
regex: /:2308:Halicarnassus starts using/,
infoText: 'The Queen\'s Waltz: Tethers',
tts: 'tethers',
},
]
}]