different CheckHallOfGods algorithm
This commit is contained in:
parent
fbe0f6ba30
commit
48d7740007
4 changed files with 115 additions and 64 deletions
82
build/app.js
82
build/app.js
|
|
@ -1837,33 +1837,45 @@ function CheckPantheon(db, sectionName, playerData) {
|
||||||
function CheckHallOfGods(db, playerData) {
|
function CheckHallOfGods(db, playerData) {
|
||||||
var section = db.sections.hallOfGods;
|
var section = db.sections.hallOfGods;
|
||||||
var entries = db.sections.hallOfGods.entries;
|
var entries = db.sections.hallOfGods.entries;
|
||||||
var check = {};
|
var id = "";
|
||||||
|
var check = "";
|
||||||
|
var isUnlocked = false;
|
||||||
|
|
||||||
for (var entry in entries) {
|
for (var entry in entries) {
|
||||||
check = playerData[entry];
|
id = entries[entry].id;
|
||||||
|
check = entries[entry].check;
|
||||||
|
isUnlocked = playerData["statueState".concat(id)].isUnlocked;
|
||||||
|
|
||||||
if (check.completedTier3 === true) {
|
if (playerData["statueState".concat(id)][check] === true) {
|
||||||
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "radiant");
|
switch (check) {
|
||||||
entries[entry].name = entries[entry].nameRadiant;
|
case "isUnlocked":
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconGreen)(section, entry);
|
||||||
} else if (check.completedTier2 === true) {
|
break;
|
||||||
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "ascended");
|
|
||||||
entries[entry].name = entries[entry].nameAscended;
|
case "completedTier1":
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
|
||||||
} else if (check.completedTier1 === true) {
|
|
||||||
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "attuned");
|
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "attuned");
|
||||||
entries[entry].name = entries[entry].nameAttuned;
|
break;
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
|
||||||
} else if (check.isUnlocked === true) {
|
case "completedTier2":
|
||||||
|
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "ascended");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "completedTier3":
|
||||||
|
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "radiant");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "partial");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (isUnlocked) {
|
||||||
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "partial");
|
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIcon)(section, entry, "partial");
|
||||||
entries[entry].name = entries[entry].nameUnlocked;
|
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
|
||||||
} else {
|
} else {
|
||||||
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconRed)(section, entry);
|
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconRed)(section, entry);
|
||||||
entries[entry].name = entries[entry].nameDefault;
|
|
||||||
entries[entry].spoiler = entries[entry].spoilerDefault;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* end for (let entry in entries) */
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Checks, validates and shows hints to the player depending on their save progression, in chronological order. Shows only hint for the last uncompleted event. If Hollow Knight is defeated, shows a dummy text.
|
* Checks, validates and shows hints to the player depending on their save progression, in chronological order. Shows only hint for the last uncompleted event. If Hollow Knight is defeated, shows a dummy text.
|
||||||
|
|
@ -6491,16 +6503,32 @@ var HK = {
|
||||||
property: "statueState",
|
property: "statueState",
|
||||||
description: "Bottom of Godhome. Detecting what bosses have been unlocked and defeated on all three difficulty levels: Attuned, Ascended and Radiant.",
|
description: "Bottom of Godhome. Detecting what bosses have been unlocked and defeated on all three difficulty levels: Attuned, Ascended and Radiant.",
|
||||||
entries: {
|
entries: {
|
||||||
statueStateGruzMother: {
|
GruzMotherUnlocked: {
|
||||||
name: "P1 Gruz Mother",
|
name: "P1 Gruz Mother: Unlocked",
|
||||||
nameDefault: "P1 Gruz Mother",
|
|
||||||
nameUnlocked: "P1 Gruz Mother: Unlocked",
|
|
||||||
nameAttuned: "P1 Gruz Mother: Attuned",
|
|
||||||
nameAscended: "P1 Gruz Mother: Ascended",
|
|
||||||
nameRadiant: "P1 Gruz Mother: Radiant",
|
|
||||||
spoiler: "I sleep amongst winding roads",
|
spoiler: "I sleep amongst winding roads",
|
||||||
spoilerDefault: "I sleep amongst winding roads",
|
id: "GruzMother",
|
||||||
spoilerUnlocked: "Slumbering god of fertility",
|
check: "isUnlocked",
|
||||||
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
|
},
|
||||||
|
GruzMotherAttuned: {
|
||||||
|
name: "P1 Gruz Mother: Attuned",
|
||||||
|
spoiler: "Slumbering god of fertility",
|
||||||
|
id: "GruzMother",
|
||||||
|
check: "completedTier1",
|
||||||
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
|
},
|
||||||
|
GruzMotherAscended: {
|
||||||
|
name: "P1 Gruz Mother: Ascended",
|
||||||
|
spoiler: "Slumbering god of fertility",
|
||||||
|
id: "GruzMother",
|
||||||
|
check: "completedTier2",
|
||||||
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
|
},
|
||||||
|
GruzMotherRadiant: {
|
||||||
|
name: "P1 Gruz Mother: Radiant",
|
||||||
|
spoiler: "Slumbering god of fertility",
|
||||||
|
id: "GruzMother",
|
||||||
|
check: "completedTier3",
|
||||||
wiki: "Hall_of_Gods#Gruz_Mother"
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -2018,44 +2018,51 @@ function CheckHallOfGods(db, playerData) {
|
||||||
|
|
||||||
let section = db.sections.hallOfGods;
|
let section = db.sections.hallOfGods;
|
||||||
let entries = db.sections.hallOfGods.entries;
|
let entries = db.sections.hallOfGods.entries;
|
||||||
let check = {};
|
let id = "";
|
||||||
|
let check = "";
|
||||||
|
let isUnlocked = false;
|
||||||
|
|
||||||
for (let entry in entries) {
|
for (let entry in entries) {
|
||||||
|
|
||||||
check = playerData[entry];
|
id = entries[entry].id;
|
||||||
|
check = entries[entry].check;
|
||||||
|
isUnlocked = playerData[`statueState${id}`].isUnlocked;
|
||||||
|
|
||||||
if (check.completedTier3 === true) {
|
if (playerData[`statueState${id}`][check] === true) {
|
||||||
|
|
||||||
SetIcon(section, entry, "radiant");
|
switch(check) {
|
||||||
entries[entry].name = entries[entry].nameRadiant;
|
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
|
||||||
}
|
|
||||||
else if (check.completedTier2 === true) {
|
|
||||||
|
|
||||||
SetIcon(section, entry, "ascended");
|
case "isUnlocked":
|
||||||
entries[entry].name = entries[entry].nameAscended;
|
SetIconGreen(section, entry);
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
break;
|
||||||
}
|
|
||||||
else if (check.completedTier1 === true) {
|
|
||||||
|
|
||||||
|
case "completedTier1":
|
||||||
SetIcon(section, entry, "attuned");
|
SetIcon(section, entry, "attuned");
|
||||||
entries[entry].name = entries[entry].nameAttuned;
|
break;
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
|
||||||
}
|
|
||||||
else if (check.isUnlocked === true) {
|
|
||||||
|
|
||||||
|
case "completedTier2":
|
||||||
|
SetIcon(section, entry, "ascended");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "completedTier3":
|
||||||
|
SetIcon(section, entry, "radiant");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
SetIcon(section, entry, "partial");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (isUnlocked) {
|
||||||
SetIcon(section, entry, "partial");
|
SetIcon(section, entry, "partial");
|
||||||
entries[entry].name = entries[entry].nameUnlocked;
|
|
||||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
SetIconRed(section, entry);
|
SetIconRed(section, entry);
|
||||||
entries[entry].name = entries[entry].nameDefault;
|
|
||||||
entries[entry].spoiler = entries[entry].spoilerDefault;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} /* end for (let entry in entries) */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3371,16 +3371,32 @@ const HK = {
|
||||||
property: "statueState",
|
property: "statueState",
|
||||||
description: "Bottom of Godhome. Detecting what bosses have been unlocked and defeated on all three difficulty levels: Attuned, Ascended and Radiant.",
|
description: "Bottom of Godhome. Detecting what bosses have been unlocked and defeated on all three difficulty levels: Attuned, Ascended and Radiant.",
|
||||||
entries: {
|
entries: {
|
||||||
statueStateGruzMother: {
|
GruzMotherUnlocked: {
|
||||||
name: "P1 Gruz Mother",
|
name: "P1 Gruz Mother: Unlocked",
|
||||||
nameDefault: "P1 Gruz Mother",
|
|
||||||
nameUnlocked: "P1 Gruz Mother: Unlocked",
|
|
||||||
nameAttuned: "P1 Gruz Mother: Attuned",
|
|
||||||
nameAscended: "P1 Gruz Mother: Ascended",
|
|
||||||
nameRadiant: "P1 Gruz Mother: Radiant",
|
|
||||||
spoiler: "I sleep amongst winding roads",
|
spoiler: "I sleep amongst winding roads",
|
||||||
spoilerDefault: "I sleep amongst winding roads",
|
id: "GruzMother",
|
||||||
spoilerUnlocked: "Slumbering god of fertility",
|
check: "isUnlocked",
|
||||||
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
|
},
|
||||||
|
GruzMotherAttuned: {
|
||||||
|
name: "P1 Gruz Mother: Attuned",
|
||||||
|
spoiler: "Slumbering god of fertility",
|
||||||
|
id: "GruzMother",
|
||||||
|
check: "completedTier1",
|
||||||
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
|
},
|
||||||
|
GruzMotherAscended: {
|
||||||
|
name: "P1 Gruz Mother: Ascended",
|
||||||
|
spoiler: "Slumbering god of fertility",
|
||||||
|
id: "GruzMother",
|
||||||
|
check: "completedTier2",
|
||||||
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
|
},
|
||||||
|
GruzMotherRadiant: {
|
||||||
|
name: "P1 Gruz Mother: Radiant",
|
||||||
|
spoiler: "Slumbering god of fertility",
|
||||||
|
id: "GruzMother",
|
||||||
|
check: "completedTier3",
|
||||||
wiki: "Hall_of_Gods#Gruz_Mother"
|
wiki: "Hall_of_Gods#Gruz_Mother"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue