-
Notifications
You must be signed in to change notification settings - Fork 5
/
mitigation.html
231 lines (213 loc) · 5.95 KB
/
mitigation.html
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
<html>
<head>
<title>Damage data analysis</title>
<script type="text/javascript" src="js/libs/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/libs/underscore-min.js"></script>
<script type="text/javascript" src="js/libs/backbone-min.js"></script>
<script type="text/javascript" src="js/libs/highcharts.js"></script>
<script type="text/javascript" src="js/analysis/attacks_clean.js"></script>
<script type="text/javascript" src="js/models/Hit.js"></script>
<script type="text/javascript" src="js/settings.js"></script>
</head>
<!--
{
"burster_level": 7,
"hits": [
{
"level": 3,
"critical_hit": false,
"distance": 11.84386541006067,
"target_destroyed": false,
"damage": 1743,
"energy": 2000,
"portal_mitigation": [
null,
null,
null,
null
]
},
{
"level": 4,
"critical_hit": false,
"distance": 12.384402668462617,
"target_destroyed": false,
"damage": 1549,
"energy": 2500,
"portal_mitigation": [
null,
null,
null,
null
]
},
-->
<body>
This data is courtesy of the Copenhagen Resistance. <cite>A lot of Enlightened Portals were hurt collecting this
data!!!</cite>
<h3>Attacks</h3>
L1:
<div id="l1"></div>
<br>
L2:
<div id="l2"></div>
<br>
L3:
<div id="l3"></div>
<br>
L4:
<div id="l4"></div>
<br>
L5:
<div id="l5"></div>
<br>
L6:
<div id="l6"></div>
<br>
L7:
<div id="l7"></div>
<br>
L8:
<div id="l8"></div>
<br>
<script type="text/javascript">
var damageData = [
[],
[],
[],
[],
[],
[],
[],
[]
];
var damageCount = [
[],
[],
[],
[],
[],
[],
[],
[]
];
var damageTotal = [
[],
[],
[],
[],
[],
[],
[],
[]
];
var damageAvg = [
[],
[],
[],
[],
[],
[],
[],
[]
];
var hc = new HitCollection();
_.each(ATTACKS, function (a, i) {
var l = a.burster_level;
hc.reset(a.hits);
hc.each(function (h, i) {
//skip destroy
if (h.get("target_destroyed")) return true;
var totMit = h.getTotalMitigation();
var x = h.get("distance");
var y = h.get("damage");
//normalize critical to half
if (h.get("critical_hit")) y /= 2;
var step = burster_steps[l - 1];
var circle = Math.floor(x / step);
//linearize
y = y * Math.pow(2,circle);
damageData[l - 1].push([totMit, y]);
if (typeof damageCount[l-1][totMit] === "undefined")
damageCount[l-1][totMit] =0;
if (typeof damageTotal[l-1][totMit] === "undefined")
damageTotal[l-1][totMit] =0;
damageCount[l - 1][totMit]++;
damageTotal[l - 1][totMit]+=y;
})
});
_.each(damageData, function (d, i) {
_.each(damageCount[i],function(c,m) {
damageAvg[i].push([m+.2,damageTotal[i][m] / damageCount[i][m]]);
});
console.log(i);
console.log(damageAvg[i]);
$('#l' + (i + 1)).highcharts({
chart: {
type: 'scatter',
marginRight: 130,
marginBottom: 25,
height: 700
},
title: {
text: 'Damage vs Mitigation - L' + (i + 1) + ' Burster',
x: -20 //center
},
xAxis: {
title: { text: "Mitigation"}
},
yAxis: {
title: {
text: 'Damage'
},
plotLines: [
{
value: 0,
width: 1,
color: '#808080'
}
]
},
tooltip: {
valueSuffix: 'XM'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [
{
name: 'Recorded Damage',
color: 'blue',
data: d
},
{
name: "Average",
color: "green",
data: damageAvg[i]
}
]
});
})
</script>
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.graphracer.com/" : "http://stats.graphracer.com/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 15);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch (err) {
}
</script>
<noscript><p><img src="http://stats.graphracer.com/piwik.php?idsite=15" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>