From cecfa61e773d4e517462bd9f1b4e608b9e7a98cb Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Tue, 25 Aug 2020 01:21:09 +0200 Subject: [PATCH] add Godtuner, Lifeblood, benchmarking --- HKCheckCompletion.js | 32 ++++++++++++++++++++++++++++++++ index.html | 9 +++++++++ 2 files changed, 41 insertions(+) diff --git a/HKCheckCompletion.js b/HKCheckCompletion.js index 36e2005..3c3ac7d 100644 --- a/HKCheckCompletion.js +++ b/HKCheckCompletion.js @@ -34,6 +34,9 @@ const DIV_ID = { spells: "hk-spells", vesselFragments: "hk-vesselfragments", warriorDreams: "hk-warriordreams", + grimmTroupe: "hk-grimmtroupe", + lifeblood: "hk-lifeblood", + godmaster: "hk-godmaster" }; const HK_BOSSES = { @@ -113,8 +116,19 @@ const HK_WARRIORDREAMS = { aladarSlugDefeated: "Gorb" }; +const HK_LIFEBLOOD = { + killedHiveKnight: "Hive Knight" +}; + +const HK_GODMASTER = { + hasGodfinder: "Godtuner" +}; + function HKCheckCompletion(jsonObject) { + // start benchmark + let countBegin = new Date(); + // Pre-Cleaning for safety for (i in DIV_ID) { document.getElementById(DIV_ID[i]).innerHTML = ""; @@ -122,6 +136,8 @@ function HKCheckCompletion(jsonObject) { let HK_BOSSES_temp = Object.assign({}, HK_BOSSES); let HK_WARRIORDREAMS_temp = Object.assign({}, HK_WARRIORDREAMS); + let HK_LIFEBLOOD_temp = Object.assign({}, HK_LIFEBLOOD); + let HK_GODMASTER_temp = Object.assign({}, HK_GODMASTER); let HKPlayerData = jsonObject.playerData; @@ -190,7 +206,23 @@ function HKCheckCompletion(jsonObject) { checkWarriorDreams(DIV_ID.warriorDreams, HK_WARRIORDREAMS_temp, HKPlayerData); + // ---------------- Grimm Troupe Content Pack --------------------- // + + // + + // ---------------- Lifeblood Content Pack --------------------- // + + checkIfDataTrue(DIV_ID.lifeblood, HK_LIFEBLOOD_temp, HKPlayerData); + + // ---------------- Godmaster Content Pack --------------------- // + + if (HK_GODMASTER_temp) checkIfDataTrue(DIV_ID.godmaster, HK_GODMASTER_temp, HKPlayerData); + } + + // finish and show benchmark + let countEnd = new Date(); + console.info("HKCheckCompletion() time (ms) =", countEnd - countBegin); } function fillHTML(divId = "", textPrefix = "Unknown Completion Element: ", textSuffix = "") { diff --git a/index.html b/index.html index 21c2e94..8a8224e 100644 --- a/index.html +++ b/index.html @@ -82,5 +82,14 @@

Warrior Dreams:

+

Grimm Troupe Content Pack:

+
+ +

Lifeblood Content Pack:

+
+ +

Godmaster Content Pack:

+
+ \ No newline at end of file