summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Highlights.vue30
-rw-r--r--src/ReportService.js29
-rw-r--r--src/ReportTable.vue4
-rw-r--r--src/maps/maps.js15
4 files changed, 77 insertions, 1 deletions
diff --git a/src/Highlights.vue b/src/Highlights.vue
index 0aa8a5f..ff40906 100644
--- a/src/Highlights.vue
+++ b/src/Highlights.vue
@@ -72,6 +72,33 @@
:entry="stats.topLegendaryWin" />
</div>
+ {{ stats.topBlitzPoints }}
+ <div class="column" v-if="!!stats.topKillDeathPoints">
+ <talent-box class="is-dark notification"
+ title="Soldier"
+ type="Kill Death Difference"
+ label=""
+ :value="stats.topKillDeathPoints.KillDeathPoints.toFixed(2)"
+ :entry="stats.topKillDeathPoints" />
+ </div>
+
+ <div class="column" v-if="!!stats.topObjectivePoints">
+ <talent-box class="is-dark notification"
+ title="Trebuchet"
+ type="Objectives"
+ label=""
+ :value="stats.topObjectivePoints.ObjectivePoints.toFixed(2)"
+ :entry="stats.topObjectivePoints" />
+ </div>
+
+ <div class="column" v-if="!!stats.topBlitzPointsDelta">
+ <talent-box class="is-dark notification"
+ title="Blitzkrieg"
+ type="Points Difference"
+ label=""
+ :value="stats.topBlitzPointsDelta.BlitzPointsDelta.toFixed(2)"
+ :entry="stats.topBlitzPointsDelta" />
+ </div>
</div>
</template>
@@ -96,6 +123,9 @@ export default Vue.component('highlights', {
topLegendaryWin: ReportService.getTopLegendaryWins(this.selectedMode),
topLowLevel: ReportService.getTopLowLevel(this.selectedMode),
topScaling: ReportService.getTopScaling(this.selectedMode),
+ topKillDeathPoints: ReportService.getTopKillDeathPoints(this.selectedMode),
+ topObjectivePoints: ReportService.getTopObjectivePoints(this.selectedMode),
+ topBlitzPointsDelta: ReportService.getTopBlitzPointsDelta(this.selectedMode),
};
},
playersPerMatch: function() {
diff --git a/src/ReportService.js b/src/ReportService.js
index 3da118a..0ac4239 100644
--- a/src/ReportService.js
+++ b/src/ReportService.js
@@ -5,7 +5,7 @@ const POPULAR_THRESHOLD = 1.0; // percent
const PICKS_THRESHOLD = 300; // picks
const VARIANCE_THRESHOLD = 0.25; // % minimum accuracy
-const report = require('../data/2d73896c/report.json')
+const report = require('../data/5f7773da/report.json')
.filter((entry) => entry.Actor != undefined); // bad data from API downtime
const reports = new Map();
@@ -19,6 +19,9 @@ const topLegendaryWins = new Map();
const topLowLevel = new Map();
const topScaling = new Map();
const topUnpopularWins = new Map();
+const topKillDeathPoints = new Map();
+const topObjectivePoints = new Map();
+const topBlitzPointsDelta = new Map();
let totalMatches = 0;
let actors = [];
const modes = metadata.config.api.modes;
@@ -80,6 +83,9 @@ for(let mode of modes) {
TotalPicks: sum_weights || entry.Count, // NoTalent has no weights
TotalWinner: sum_y / sum_weights || entry.Winner,
SampleTooSmall: sum_weights < PICKS_THRESHOLD,
+ KillDeathPoints: maps.killDeathPoints(entry),
+ ObjectivePoints: maps.objectivePoints(entry),
+ BlitzPointsDelta: maps.blitzPointsDelta(entry),
VarianceTooLarge: rsquare < VARIANCE_THRESHOLD,
});
});
@@ -115,6 +121,15 @@ for(let mode of modes) {
topScaling.set(mode, reports.get(mode)
.filter((entry) => !entry.SampleTooSmall && !entry.VarianceTooLarge)
.sort((entry1, entry2) => entry2.TalentWinrateLevelScaling - entry1.TalentWinrateLevelScaling)[0]);
+ topKillDeathPoints.set(mode, reports.get(mode)
+ .filter((entry) => !entry.SampleTooSmall && !entry.VarianceTooLarge)
+ .sort((entry1, entry2) => entry2.KillDeathPoints - entry1.KillDeathPoints)[0]);
+ topObjectivePoints.set(mode, reports.get(mode)
+ .filter((entry) => !entry.SampleTooSmall && !entry.VarianceTooLarge)
+ .sort((entry1, entry2) => entry2.ObjectivePoints - entry1.ObjectivePoints)[0]);
+ topBlitzPointsDelta.set(mode, reports.get(mode)
+ .filter((entry) => !entry.SampleTooSmall && !entry.VarianceTooLarge)
+ .sort((entry1, entry2) => entry2.BlitzPointsDelta - entry1.BlitzPointsDelta)[0]);
if (actors.length == 0) {
actors = [...new Set(reports.get(mode).map((entry) => entry.Actor))];
@@ -170,6 +185,18 @@ export default {
return topUnpopular.get(mode);
},
+ getTopKillDeathPoints(mode) {
+ return topKillDeathPoints.get(mode);
+ },
+
+ getTopObjectivePoints(mode) {
+ return topObjectivePoints.get(mode);
+ },
+
+ getTopBlitzPointsDelta(mode) {
+ return topBlitzPointsDelta.get(mode);
+ },
+
getActors() {
return actors;
},
diff --git a/src/ReportTable.vue b/src/ReportTable.vue
index 789b7f2..2297b14 100644
--- a/src/ReportTable.vue
+++ b/src/ReportTable.vue
@@ -81,6 +81,10 @@
</template>
</b-table-column>
+ <b-table-column field="BlitzPointsDelta" label="Points Difference" :visible="hasTalents" sortable numeric>
+ {{ props.row.BlitzPointsDelta.toFixed(2) }}
+ </b-table-column>
+
<b-table-column field="Winner" label="Win Rate" :visible="!hasTalents" sortable numeric>
{{ (100 * props.row.Winner).toFixed(0) }}%
</b-table-column>
diff --git a/src/maps/maps.js b/src/maps/maps.js
index ce91c24..7b48ce0 100644
--- a/src/maps/maps.js
+++ b/src/maps/maps.js
@@ -78,6 +78,18 @@ function playersPerMatch(mode) {
return mode.includes('5v5')? 10 : 6;
}
+function killDeathPoints(entry) {
+ return entry.Kills - entry.Deaths;
+}
+
+function objectivePoints(entry) {
+ return entry.CrystalMinerKills + entry.GoldMinerKills + entry.TurretKills;
+}
+
+function blitzPointsDelta(entry) {
+ return killDeathPoints(entry) + objectivePoints(entry) * 3;
+}
+
module.exports = {
RARITIES,
getTalentName,
@@ -88,4 +100,7 @@ module.exports = {
getMode,
hasTalents,
playersPerMatch,
+ killDeathPoints,
+ objectivePoints,
+ blitzPointsDelta,
};