summaryrefslogtreecommitdiff
path: root/src/maps/maps.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-07-12 11:34:43 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-12-13 17:09:25 +0100
commit74d606bef1d0259fa28dee011db41de1fb236b98 (patch)
treea5abff20f00e00fd1186c9169fe4f6787e440c22 /src/maps/maps.js
parentb6a0e90753443e56e90be0c52fd65a7a3df2d2e4 (diff)
downloadbrokentalents-74d606bef1d0259fa28dee011db41de1fb236b98.tar.gz
brokentalents-74d606bef1d0259fa28dee011db41de1fb236b98.zip
Add Blitz Points statistics
Diffstat (limited to 'src/maps/maps.js')
-rw-r--r--src/maps/maps.js15
1 files changed, 15 insertions, 0 deletions
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,
};