safety pre-cleaning, object copy bosses

This commit is contained in:
ReznoRMichael 2020-08-25 00:16:28 +02:00
parent 9118d209ae
commit e7d0e7e59a
2 changed files with 28 additions and 31 deletions

View file

@ -103,6 +103,13 @@ const HK_SPELLS = {
function HKCheckCompletion(jsonObject) { function HKCheckCompletion(jsonObject) {
// Pre-Cleaning for safety
for (i in DIV_ID) {
document.getElementById(DIV_ID[i]).innerHTML = "";
}
let HK_BOSSES_temp = Object.assign({}, HK_BOSSES);
let HKPlayerData = jsonObject.playerData; let HKPlayerData = jsonObject.playerData;
for (i in HKPlayerData) { for (i in HKPlayerData) {
@ -119,7 +126,7 @@ function HKCheckCompletion(jsonObject) {
// ---------------- Bosses (Base Game) --------------------- // // ---------------- Bosses (Base Game) --------------------- //
checkIfDataTrue(DIV_ID.bosses, HK_BOSSES, HKPlayerData); checkIfDataTrue(DIV_ID.bosses, HK_BOSSES_temp, HKPlayerData);
// ---------------- Colosseum of Fools --------------------- // // ---------------- Colosseum of Fools --------------------- //

View file

@ -46,45 +46,35 @@
<div style="margin-bottom: 20px;"></div> <div style="margin-bottom: 20px;"></div>
<div id="hk-intro"> <h2>Game Completion Status</h2>
<h2>Game Completion Status</h2> <div id="hk-intro"></div>
</div>
<div id="hk-bosses"> <h2>Bosses:</h2>
<h2>Bosses:</h2> <div id="hk-bosses"></div>
</div>
<div id="hk-colosseum"> <h2>Colosseum of Fools:</h2>
<h2>Colosseum of Fools:</h2> <div id="hk-colosseum"></div>
</div>
<div id="hk-dreamers"> <h2>Dreamers:</h2>
<h2>Dreamers:</h2> <div id="hk-dreamers"></div>
</div>
<div id="hk-dreamnail"> <h2>Dream Nail and Essence:</h2>
<h2>Dream Nail and Essence:</h2> <div id="hk-dreamnail"></div>
</div>
<div id="hk-equipment"> <h2>Equipment:</h2>
<h2>Equipment:</h2> <div id="hk-equipment"></div>
</div>
<div id="hk-maskshards"> <h2>Mask Shards:</h2>
<h2>Mask Shards:</h2> <div id="hk-maskshards"></div>
</div>
<div id="hk-nailarts"> <h2>Nail Arts:</h2>
<h2>Nail Arts:</h2> <div id="hk-nailarts"></div>
</div>
<div id="hk-nailupgrades"> <h2>Nail Upgrades:</h2>
<h2>Nail Upgrades:</h2> <div id="hk-nailupgrades"></div>
</div>
<div id="hk-spells"> <h2>Spells:</h2>
<h2>Spells:</h2> <div id="hk-spells"></div>
</div>
</body> </body>
</html> </html>