checkIfDataTrue() equipment
This commit is contained in:
parent
04182b7e8d
commit
d66f10d704
1 changed files with 7 additions and 30 deletions
|
|
@ -45,19 +45,19 @@ const HK_COLOSSEUM = {
|
||||||
colosseumGoldCompleted: "Trial of the Fool"
|
colosseumGoldCompleted: "Trial of the Fool"
|
||||||
};
|
};
|
||||||
|
|
||||||
var HK_DREAMERS = {
|
const HK_DREAMERS = {
|
||||||
lurienDefeated: "Lurien the Watcher",
|
lurienDefeated: "Lurien the Watcher",
|
||||||
monomonDefeated: "Monomon the Teacher",
|
monomonDefeated: "Monomon the Teacher",
|
||||||
hegemolDefeated: "Herrah the Beast"
|
hegemolDefeated: "Herrah the Beast"
|
||||||
};
|
};
|
||||||
|
|
||||||
var HK_DREAMNAIL = {
|
const HK_DREAMNAIL = {
|
||||||
hasDreamNail: "Dream Nail acquired",
|
hasDreamNail: "Dream Nail acquired",
|
||||||
dreamNailUpgraded: "Awakening the Dream Nail",
|
dreamNailUpgraded: "Awakening the Dream Nail",
|
||||||
mothDeparted: "Hear the Seer's final words"
|
mothDeparted: "Hear the Seer's final words"
|
||||||
};
|
};
|
||||||
|
|
||||||
var HK_EQUIPMENT = {
|
const HK_EQUIPMENT = {
|
||||||
hasKingsBrand: "King's Brand",
|
hasKingsBrand: "King's Brand",
|
||||||
hasSuperDash: "Crystal Heart",
|
hasSuperDash: "Crystal Heart",
|
||||||
hasWalljump: "Mantis Claw",
|
hasWalljump: "Mantis Claw",
|
||||||
|
|
@ -70,7 +70,6 @@ var HK_EQUIPMENT = {
|
||||||
function HKCheckCompletion(jsonObject) {
|
function HKCheckCompletion(jsonObject) {
|
||||||
|
|
||||||
let HKPlayerData = jsonObject.playerData;
|
let HKPlayerData = jsonObject.playerData;
|
||||||
let divId = "";
|
|
||||||
let divIdIntro = "hk-intro";
|
let divIdIntro = "hk-intro";
|
||||||
let divIdBosses = "hk-bosses";
|
let divIdBosses = "hk-bosses";
|
||||||
let divIdColosseum = "hk-colosseum";
|
let divIdColosseum = "hk-colosseum";
|
||||||
|
|
@ -84,12 +83,10 @@ function HKCheckCompletion(jsonObject) {
|
||||||
|
|
||||||
// ---------------- Game Completion Status ----------------- //
|
// ---------------- Game Completion Status ----------------- //
|
||||||
|
|
||||||
divId = divIdIntro;
|
|
||||||
|
|
||||||
if (i === "completionPercentage") {
|
if (i === "completionPercentage") {
|
||||||
if (HKPlayerData.completionPercentage >= 112) currentDataTrue();
|
if (HKPlayerData.completionPercentage >= 112) currentDataTrue();
|
||||||
else currentDataFalse(HKPlayerData.completionPercentage);
|
else currentDataFalse(HKPlayerData.completionPercentage);
|
||||||
fillHTML(divId, "Hollow Knight Completion", " %");
|
fillHTML(divIdIntro, "Hollow Knight Completion", " %");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------- Bosses (Base Game) --------------------- //
|
// ---------------- Bosses (Base Game) --------------------- //
|
||||||
|
|
@ -102,36 +99,16 @@ function HKCheckCompletion(jsonObject) {
|
||||||
|
|
||||||
// ---------------- Dreamers --------------------- //
|
// ---------------- Dreamers --------------------- //
|
||||||
|
|
||||||
divId = divIdDreamers;
|
checkIfDataTrue(divIdDreamers, HK_DREAMERS, HKPlayerData);
|
||||||
|
|
||||||
for (j in HK_DREAMERS) {
|
|
||||||
if (HKPlayerData[j] === true) currentDataTrue();
|
|
||||||
else currentDataFalse();
|
|
||||||
fillHTML(divId, HK_DREAMERS[j]);
|
|
||||||
delete HK_DREAMERS[j];
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------- Dream Nail and Essence --------------------- //
|
// ---------------- Dream Nail and Essence --------------------- //
|
||||||
|
|
||||||
divId = divIdDreamNail;
|
checkIfDataTrue(divIdDreamNail, HK_DREAMNAIL, HKPlayerData);
|
||||||
|
|
||||||
for (j in HK_DREAMNAIL) {
|
|
||||||
if (HKPlayerData[j] === true) currentDataTrue();
|
|
||||||
else currentDataFalse();
|
|
||||||
fillHTML(divId, HK_DREAMNAIL[j]);
|
|
||||||
delete HK_DREAMNAIL[j];
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------- Equipment --------------------- //
|
// ---------------- Equipment --------------------- //
|
||||||
|
|
||||||
divId = divIdEquipment;
|
checkIfDataTrue(divIdEquipment, HK_EQUIPMENT, HKPlayerData);
|
||||||
|
|
||||||
for (j in HK_EQUIPMENT) {
|
|
||||||
if (HKPlayerData[j] === true) currentDataTrue();
|
|
||||||
else currentDataFalse();
|
|
||||||
fillHTML(divId, HK_EQUIPMENT[j]);
|
|
||||||
delete HK_EQUIPMENT[j];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue