forked from Bluefissure/cactbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
general.js
86 lines (85 loc) · 2.18 KB
/
general.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
'use strict';
// General mistakes; these apply everywhere.
[{
zoneRegex: /.*/,
triggers: [
{
// Trigger id for internally generated early pull warning.
id: 'General Early Pull',
},
{
id: 'General Food Buff',
losesEffectRegex: gLang.kEffect.WellFed,
condition: function(e, data) {
// Prevent "Eos loses the effect of Well Fed from Critlo Mcgee"
return e.targetName == e.attackerName;
},
mistake: function(e, data) {
data.lostFood = data.lostFood || {};
// Well Fed buff happens repeatedly when it falls off (WHY),
// so suppress multiple occurrences.
if (!data.inCombat || data.lostFood[e.targetName])
return;
data.lostFood[e.targetName] = true;
return {
type: 'warn',
blame: e.targetName,
text: {
en: 'lost food buff',
de: 'Nahrungsbuff verloren',
},
};
},
},
{
gainsEffectRegex: gLang.kEffect.WellFed,
run: function(e, data) {
if (!data.lostFood)
return;
delete data.lostFood[e.targetName];
},
},
{
id: 'General Rabbit Medium',
abilityRegex: gLang.kAbility.RabbitMedium,
condition: function(e, data) {
return data.IsPlayerId(e.attackerId);
},
mistake: function(e, data) {
return {
type: 'warn',
blame: e.attackerName,
text: {
en: 'bunny',
de: 'Hase',
de: e.abilityName,
fr: e.abilityName,
ja: e.abilityName,
},
};
},
},
{
id: 'General Missed Trick',
condition: function(e, data) {
return data.IsPlayerId(e.attackerId);
},
damageRegex: gLang.kAbility.TrickAttack,
condition: function(e) {
// 28710?03 == success
// 710?03 == failure
return e.flags.substr(-8, 2) != '28';
},
mistake: function(e, data) {
return {
type: 'warn',
blame: e.attackerName,
text: {
en: 'missed trick',
de: 'Trickattacke daneben',
},
};
},
},
],
}];