different CheckHallOfGods algorithm
This commit is contained in:
parent
fbe0f6ba30
commit
48d7740007
4 changed files with 114 additions and 63 deletions
|
|
@ -2018,44 +2018,51 @@ function CheckHallOfGods(db, playerData) {
|
|||
|
||||
let section = db.sections.hallOfGods;
|
||||
let entries = db.sections.hallOfGods.entries;
|
||||
let check = {};
|
||||
let id = "";
|
||||
let check = "";
|
||||
let isUnlocked = false;
|
||||
|
||||
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");
|
||||
entries[entry].name = entries[entry].nameRadiant;
|
||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
||||
switch(check) {
|
||||
|
||||
case "isUnlocked":
|
||||
SetIconGreen(section, entry);
|
||||
break;
|
||||
|
||||
case "completedTier1":
|
||||
SetIcon(section, entry, "attuned");
|
||||
break;
|
||||
|
||||
case "completedTier2":
|
||||
SetIcon(section, entry, "ascended");
|
||||
break;
|
||||
|
||||
case "completedTier3":
|
||||
SetIcon(section, entry, "radiant");
|
||||
break;
|
||||
|
||||
default:
|
||||
SetIcon(section, entry, "partial");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else if (check.completedTier2 === true) {
|
||||
|
||||
SetIcon(section, entry, "ascended");
|
||||
entries[entry].name = entries[entry].nameAscended;
|
||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
||||
}
|
||||
else if (check.completedTier1 === true) {
|
||||
|
||||
SetIcon(section, entry, "attuned");
|
||||
entries[entry].name = entries[entry].nameAttuned;
|
||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
||||
}
|
||||
else if (check.isUnlocked === true) {
|
||||
|
||||
else if (isUnlocked) {
|
||||
SetIcon(section, entry, "partial");
|
||||
entries[entry].name = entries[entry].nameUnlocked;
|
||||
entries[entry].spoiler = entries[entry].spoilerUnlocked;
|
||||
}
|
||||
else {
|
||||
|
||||
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",
|
||||
description: "Bottom of Godhome. Detecting what bosses have been unlocked and defeated on all three difficulty levels: Attuned, Ascended and Radiant.",
|
||||
entries: {
|
||||
statueStateGruzMother: {
|
||||
name: "P1 Gruz Mother",
|
||||
nameDefault: "P1 Gruz Mother",
|
||||
nameUnlocked: "P1 Gruz Mother: Unlocked",
|
||||
nameAttuned: "P1 Gruz Mother: Attuned",
|
||||
nameAscended: "P1 Gruz Mother: Ascended",
|
||||
nameRadiant: "P1 Gruz Mother: Radiant",
|
||||
GruzMotherUnlocked: {
|
||||
name: "P1 Gruz Mother: Unlocked",
|
||||
spoiler: "I sleep amongst winding roads",
|
||||
spoilerDefault: "I sleep amongst winding roads",
|
||||
spoilerUnlocked: "Slumbering god of fertility",
|
||||
id: "GruzMother",
|
||||
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"
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue