forked from quisquous/cactbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shatter.js
53 lines (49 loc) · 1.36 KB
/
shatter.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
'use strict';
// Frontlines: Shatter
[{
zoneRegex: /^The Fields Of Glory \(Shatter\)$/,
triggers: [
{
id: 'Shatter Big Ice',
regex: /The icebound tomelith A([1-4]) activates and begins to emit heat/,
regexDe: /Vereister Echolith A([1-4]) activates and begins to emit heat/,
regexFr: /Mémolithe Congelé A([1-4]) activates and begins to emit heat/,
preRun: function(data, matches) {
data.iceDir = undefined;
let ice_lang = {
en: {
'1': 'Center',
'2': 'North',
'3': 'Southeast',
'4': 'Southwest',
},
de: {
'1': 'Mitte',
'2': 'Norden',
'3': 'Süden',
'4': 'Südwesten',
},
fr: {
'1': 'Milieu',
'2': 'Nord',
'3': 'Sud-Est',
'4': 'Sud-Ouest',
},
};
let big_ice_dir = ice_lang['en'];
if (data.lang in ice_lang)
big_ice_dir = ice_lang[data.lang];
if (!(matches[1] in big_ice_dir))
return;
data.iceDir = {
en: 'Big Ice: ' + big_ice_dir[matches[1]],
de: 'Grosses Eis: ' + big_ice_dir[matches[1]],
fr: 'Grosse Glace :' + big_ice_dir[matches[1]],
};
},
alertText: function(data) {
return data.iceDir;
},
},
],
}];