Added the journal hunter

This commit is contained in:
Alba6rek 2025-09-30 20:19:14 +03:00
parent f5640da34c
commit f639e89293
6 changed files with 3656 additions and 3783 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -30,14 +30,14 @@ import {
// ---------------- Load image files (necessary for Webpack) ----------------------------------------------------------------------- // // ---------------- Load image files (necessary for Webpack) ----------------------------------------------------------------------- //
import HEALTH_MASK_IMAGE from "../img/health-mask.png"; /*import HEALTH_MASK_IMAGE from "../img/health-mask.png";
import HEALTH_MASK_STEEL_IMAGE from "../img/health-mask-steel.png"; import HEALTH_MASK_STEEL_IMAGE from "../img/health-mask-steel.png";
import SOUL_ORB_IMAGE from "../img/soul-orb.png"; import SOUL_ORB_IMAGE from "../img/soul-orb.png";
import NOTCH_IMAGE from "../img/notch.png"; import NOTCH_IMAGE from "../img/notch.png";
import NOTCH_FILLED_IMAGE from "../img/notch-filled.png"; import NOTCH_FILLED_IMAGE from "../img/notch-filled.png";
import NOTCH_OVERCHARMED_IMAGE from "../img/notch-overcharmed.png"; import NOTCH_OVERCHARMED_IMAGE from "../img/notch-overcharmed.png";
import GEO_IMAGE from "../img/geo.png"; import GEO_IMAGE from "../img/geo.png";
import GEO_SHADE_IMAGE from "../img/geo-shade.png"; import GEO_SHADE_IMAGE from "../img/geo-shade.png";*/
// ---------------- Constants ------------------------------------------------------------------------------------------------------- // // ---------------- Constants ------------------------------------------------------------------------------------------------------- //
@ -48,7 +48,7 @@ const SYMBOL_TRUE = "<i class='icon-ok-squared'></i>"; // "✅ "
const SYMBOL_CLOCK = "<i class='icon-clock'></i>"; // "🕑 " const SYMBOL_CLOCK = "<i class='icon-clock'></i>"; // "🕑 "
const SYMBOL_EMPTY = "<span class='padding-left'></span>"; const SYMBOL_EMPTY = "<span class='padding-left'></span>";
const FLEUR_DIVIDE = "<div class='horizontal-line'></div>"; const FLEUR_DIVIDE = "<div class='horizontal-line'></div>";
const WIKI_LINK = "https://hollowknight.fandom.com/wiki/"; const WIKI_LINK = "https://hollowknightsilksong.wiki.fextralife.com/";
// ---------------- Variables ------------------------------------------------------------------------------------------------------- // // ---------------- Variables ------------------------------------------------------------------------------------------------------- //
@ -141,7 +141,7 @@ function HKCheckCompletion(jsonObject, benchStart = performance.now()) {
CheckSilkBar(HK.sections.intro, HKPlayerData.silkMax); CheckSilkBar(HK.sections.intro, HKPlayerData.silkMax);
// ---------------- Charm Notches (Slots) ------------------------------------------------------------------------------------- // // ---------------- Check Crests ------------------------------------------------------------------------------------- //
CheckCrests(HK.sections.intro, HKPlayerData); CheckCrests(HK.sections.intro, HKPlayerData);
@ -149,18 +149,72 @@ function HKCheckCompletion(jsonObject, benchStart = performance.now()) {
CheckRosary(HK.sections.intro, HKPlayerData.geo, HKPlayerData.HeroCorpseMoneyPool); CheckRosary(HK.sections.intro, HKPlayerData.geo, HKPlayerData.HeroCorpseMoneyPool);
// ---------------- Shell Shards Amount ------------------------------------------------------------------------------------------------ // // ---------------- Shell Shards Amount ------------------------------------------------------------------------------------------------ //
CheckshellShards(HK.sections.intro, HKPlayerData.ShellShards); CheckshellShards(HK.sections.intro, HKPlayerData.ShellShards);
// ---------------- Crests Crests Crests Crests Crests Crests ---------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.crests, HK.sections.crests.entries, HKPlayerData);
// ---------------- Needle Upgrades --------------------------------------------------------------------------------------------- //
CheckNeedleUpgrades(HK.sections.NeedleUpgrades, HK.sections.NeedleUpgrades.entries, HKPlayerData);
// ---------------- Silk Heart --------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.silkHeart, HK.sections.silkHeart.entries, HKPlayerData);
// ---------------- Tools ---------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.redTools, HK.sections.redTools.entries, HKPlayerData.Tools.savedData);
CheckIfDataTrue(HK.sections.blueTools, HK.sections.blueTools.entries, HKPlayerData.Tools.savedData);
CheckIfDataTrue(HK.sections.yellowTools, HK.sections.yellowTools.entries, HKPlayerData.Tools.savedData);
// ---------------- Equipment (Abilities) ------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.equipment, HK.sections.equipment.entries, HKPlayerData.Tools.savedData);
// ---------------- skills ---------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.skills, HK.sections.skills.entries, HKPlayerData);
// ---------------- Miscellaneous ---------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.miscellaneous, HK.sections.miscellaneous.entries, HKPlayerData);
// ---------------- Mask Shards ----------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.maskShards, HK.sections.maskShards.entries, HKPlayerData, HKWorldItems);
// ---------------- Spool Fragments ------------------------------------------------------------------------------------------ //
CheckIfDataTrue(HK.sections.spoolFragments, HK.sections.spoolFragments.entries, HKPlayerData, HKWorldItems);
// ---------------- Crafting Kit Upgrades ------------------------------------------------------------------------------------------ //
CheckIfDataTrue(HK.sections.craftingKitUpgrades, HK.sections.craftingKitUpgrades.entries, HKPlayerData, HKWorldItems);
// ---------------- Tool Pouch Upgrades ------------------------------------------------------------------------------------------ //
CheckIfDataTrue(HK.sections.toolPouchUpgrades, HK.sections.toolPouchUpgrades.entries, HKPlayerData, HKWorldItems);
// ---------------- flea ---------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.flea, HK.sections.flea.entries, HKPlayerData);
////////////////////////////////////////////////////////// UNDER THIS LINE ARE NOT FINSIHED /////////////////////////////////////////
////////////////////////////////////////////////////////// UNDER THIS LINE ARE NOT FINSIHED /////////////////////////////////////////
////////////////////////////////////////////////////////// UNDER THIS LINE ARE NOT FINSIHED /////////////////////////////////////////
////////////////////////////////////////////////////////// UNDER THIS LINE ARE NOT FINSIHED /////////////////////////////////////////
////////////////////////////////////////////////////////// UNDER THIS LINE ARE NOT FINSIHED /////////////////////////////////////////
////////////////////////////////////////////////////////// UNDER THIS LINE ARE NOT FINSIHED /////////////////////////////////////////
/*
// ---------------- Bosses (Base Game) ---------------------------------------------------------------------------------------- // // ---------------- Bosses (Base Game) ---------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.bosses, HK.sections.bosses.entries, HKPlayerData, HKWorldItems); CheckIfDataTrue(HK.sections.bosses, HK.sections.bosses.entries, HKPlayerData, HKWorldItems);
// ---------------- Charms ---------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.charms, HK.sections.charms.entries, HKPlayerData);
// ---------------- Colosseum of Fools ---------------------------------------------------------------------------------------- // // ---------------- Colosseum of Fools ---------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.colosseum, HK.sections.colosseum.entries, HKPlayerData); CheckIfDataTrue(HK.sections.colosseum, HK.sections.colosseum.entries, HKPlayerData);
@ -173,30 +227,11 @@ function HKCheckCompletion(jsonObject, benchStart = performance.now()) {
CheckIfDataTrue(HK.sections.dreamNail, HK.sections.dreamNail.entries, HKPlayerData); CheckIfDataTrue(HK.sections.dreamNail, HK.sections.dreamNail.entries, HKPlayerData);
// ---------------- Equipment ------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.equipment, HK.sections.equipment.entries, HKPlayerData);
// ---------------- Nail Upgrades --------------------------------------------------------------------------------------------- //
CheckNailUpgrades(HK.sections.nailUpgrades, HK.sections.nailUpgrades.entries, HKPlayerData);
// ---------------- Mask Shards ----------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.maskShards, HK.sections.maskShards.entries, HKPlayerData, HKWorldItems);
// ---------------- Nail Arts ------------------------------------------------------------------------------------------------- // // ---------------- Nail Arts ------------------------------------------------------------------------------------------------- //
CheckIfDataTrue(HK.sections.nailArts, HK.sections.nailArts.entries, HKPlayerData); CheckIfDataTrue(HK.sections.nailArts, HK.sections.nailArts.entries, HKPlayerData);
// ---------------- Spells ---------------------------------------------------------------------------------------------------- //
CheckSpellLevel(HK.sections.spells, HK.sections.spells.entries, HKPlayerData);
// ---------------- Vessel Fragments ------------------------------------------------------------------------------------------ //
CheckIfDataTrue(HK.sections.vesselFragments, HK.sections.vesselFragments.entries, HKPlayerData, HKWorldItems);
// ---------------- Warrior Dreams -------------------------------------------------------------------------------------------- // // ---------------- Warrior Dreams -------------------------------------------------------------------------------------------- //
CheckWarriorDreams(HK.sections.warriorDreams, HK.sections.warriorDreams.entries, HKPlayerData); CheckWarriorDreams(HK.sections.warriorDreams, HK.sections.warriorDreams.entries, HKPlayerData);
@ -212,12 +247,12 @@ function HKCheckCompletion(jsonObject, benchStart = performance.now()) {
// ---------------- Godmaster Content Pack ------------------------------------------------------------------------------------ // // ---------------- Godmaster Content Pack ------------------------------------------------------------------------------------ //
CheckIfDataTrue(HK.sections.godmaster, HK.sections.godmaster.entries, HKPlayerData); CheckIfDataTrue(HK.sections.godmaster, HK.sections.godmaster.entries, HKPlayerData);
*/
// ------------------------- Hunter's Journal --------------------------------------------------------------------------------- // // ------------------------- Hunter's Journal --------------------------------------------------------------------------------- //
/* Must be checked before Statistics (for correct entry numbers) */ /* Must be checked before Statistics (for correct entry numbers) */
CheckHuntersJournal(HK, "huntersJournal", HKPlayerData); CheckHuntersJournal(HK, "huntersJournal", HKPlayerData);
CheckHuntersJournal(HK, "huntersJournalOptional", HKPlayerData); //CheckHuntersJournal(HK, "huntersJournalOptional", HKPlayerData);
/* /*
@ -321,13 +356,12 @@ function HKCheckCompletion(jsonObject, benchStart = performance.now()) {
/* ------------------------- Pantheon Statistics ------------------------------------------------------------------------------ */ /* ------------------------- Pantheon Statistics ------------------------------------------------------------------------------ */
CheckPantheon(HK, "pantheonOfTheMaster", HKPlayerData); /*CheckPantheon(HK, "pantheonOfTheArtist", HKPlayerData);
CheckPantheon(HK, "pantheonOfTheArtist", HKPlayerData);
CheckPantheon(HK, "pantheonOfTheSage", HKPlayerData); CheckPantheon(HK, "pantheonOfTheSage", HKPlayerData);
CheckPantheon(HK, "pantheonOfTheKnight", HKPlayerData); CheckPantheon(HK, "pantheonOfTheKnight", HKPlayerData);
CheckPantheon(HK, "pantheonOfHallownest", HKPlayerData); CheckPantheon(HK, "pantheonOfHallownest", HKPlayerData);
CheckHallOfGods(HK, HKPlayerData); CheckHallOfGods(HK, HKPlayerData);*/
// ------------------------- Hints ---------------------------------------------------------------------------------------------- // // ------------------------- Hints ---------------------------------------------------------------------------------------------- //
@ -431,7 +465,7 @@ function CheckCompletionPercent(section, playerData) {
let completionPercentage = Math.round(playerData.completionPercentage); let completionPercentage = Math.round(playerData.completionPercentage);
let maxPercent = 0; let maxPercent = 0;
/*
// Normal (current) game version behaviour: 112% // Normal (current) game version behaviour: 112%
section.maxPercent = section.maxPercentDefault; section.maxPercent = section.maxPercentDefault;
maxPercent = section.maxPercentDefault; maxPercent = section.maxPercentDefault;
@ -439,7 +473,7 @@ function CheckCompletionPercent(section, playerData) {
section.percent = completionPercentage; section.percent = completionPercentage;
section.entries.gameCompletion.spoiler = completionPercentage; section.entries.gameCompletion.spoiler = completionPercentage;
/*
// Lifeblood behaviour: 107% // Lifeblood behaviour: 107%
if (!playerData.hasOwnProperty("hasGodfinder")) { if (!playerData.hasOwnProperty("hasGodfinder")) {
@ -493,7 +527,8 @@ function CheckExtendedCompletion(db) {
case "intro": case "intro":
case "hints": case "hints":
case "huntersJournal": case "huntersJournal":
case "huntersJournalOptional": //case "huntersJournalOptional":
//case "flea":
continue; continue;
@ -897,7 +932,137 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
textSuffix = dataObject[i].spoiler; textSuffix = dataObject[i].spoiler;
(dataObject[i].hasOwnProperty("wiki")) ? wiki = dataObject[i].wiki: wiki = ""; */ (dataObject[i].hasOwnProperty("wiki")) ? wiki = dataObject[i].wiki: wiki = ""; */
switch (i) { if (section.id === "hk-redTools"
|| section.id === "hk-blueTools"
|| section.id === "hk-yellowTools"
|| section.id === "hk-equipment")
{
switch (i)
{
case "webShot":
//check if he have any type of webshot which count as 1% (the player cant have multiple of it)
let foundArchitect = playerData.find(playerData => playerData.Name === "WebShot Architect");
let foundForge = playerData.find(playerData => playerData.Name === "WebShot Forge");
let foundWeaver = playerData.find(playerData => playerData.Name === "WebShot Weaver");
((foundArchitect !== undefined && foundArchitect.Data.IsUnlocked === true)
|| (foundForge !== undefined && foundForge.Data.IsUnlocked === true)
|| (foundWeaver !== undefined && foundWeaver.Data.IsUnlocked === true)
) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
case "curveClaws":
//check if he have any type of curveClaws which count as 1% (normal or upgraded one)
let foundClaws = playerData.find(playerData => playerData.Name === "Curve Claws");
let foundClawsUpgrade = playerData.find(playerData => playerData.Name === "Curve Claws Upgraded");
((foundClaws !== undefined && foundClaws.Data.IsUnlocked === true)
|| (foundClawsUpgrade !== undefined && foundClawsUpgrade.Data.IsUnlocked === true)
) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
case "mosscreepTool":
//check if he have any type of Mosscreep which count as 1% (normal or upgraded one)
let foundMosscreep = playerData.find(playerData => playerData.Name === "Mosscreep Tool 1");
let foundMosscreepUpgrade = playerData.find(playerData => playerData.Name === "Mosscreep Tool 2");
((foundMosscreep !== undefined && foundMosscreep.Data.IsUnlocked === true)
|| (foundMosscreepUpgrade !== undefined && foundMosscreepUpgrade.Data.IsUnlocked === true)
) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
case "DazzleBind":
//check if he have any type of Dazzle Bind which count as 1% (normal or upgraded one)
let foundDazzle = playerData.find(playerData => playerData.Name === "Dazzle Bind");
let foundDazzleUpgrade = playerData.find(playerData => playerData.Name === "Dazzle Bind Upgraded");
((foundDazzle !== undefined && foundDazzle.Data.IsUnlocked === true)
|| (foundDazzleUpgrade !== undefined && foundDazzleUpgrade.Data.IsUnlocked === true)
) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
case "deadMansPurse":
//check if he have any type of Bomb for normal and steel mod which count as 1% (normal or upgraded one)
let foundBombNormal = playerData.find(playerData => playerData.Name === "Dead Mans Purse");
let foundBombSteel = playerData.find(playerData => playerData.Name === "Shell Satchel");
((foundBombNormal !== undefined && foundBombNormal.Data.IsUnlocked === true)
|| (foundBombSteel !== undefined && foundBombSteel.Data.IsUnlocked === true)
) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
default:
let foundData = playerData.find(playerData => playerData.Name === dataObject[i].id);
(foundData !== undefined && foundData.Data.IsUnlocked === true) ? SetIconGreen(section, i): SetIconRed(section, i);
}
}
// CHECK SILK HEART
else if (section.id === "hk-silkHeart")
{
let exist = playerData.scenesVisited.indexOf(i);
(exist >= 0) ? SetIconGreen(section, i): SetIconRed(section, i);
}
//CHECK SILK HEART MASK AND SPOOL SILK (they change it from old design)
else if (section.id === "hk-maskshards"
|| section.id === "hk-spoolFragments"
|| section.id === "hk-toolPouchUpgrades"
|| section.id === "hk-craftingKitUpgrades")
{
switch (i) {
//buy from sellers
case "PurchasedBonebottomHeartPiece":
case "MerchantEnclaveShellFragment":
case "PurchasedBelltownSpoolSegment":
case "MetCaravanTroupeLeaderJudge":
case "MerchantEnclaveSpoolPiece":
case "purchasedGrindleSpoolPiece":
case "PurchasedForgeToolKit":
case "PurchasedArchitectToolKit":
case "purchasedGrindleToolKit":
case "PurchasedPilgrimsRestToolPouch":
(playerData[i] === true) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
//Finishing wishes
case "beastflyHuntWish":
case "sprintmasterRaceWish":
case "destroyThreadCoresWish":
case "destroyThreadCoresWish":
case "antTrapperWish":
case "saveShermaWish":
case "crowFeathersWish":
case "journalWish":
let wishList = playerData.QuestCompletionData.savedData;
let foundWish = wishList.find(wishList => wishList.Name === dataObject[i].sceneName);
(foundWish !== undefined && foundWish.Data.IsCompleted === true) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
//I hate that caravan....
case "CaravanTroupeLocation":
(playerData[i] === 3) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
//World Scene
default:
let sceneList = worldData.serializedList;
let sceneInfo = sceneList.find(sceneList => sceneList.SceneName === dataObject[i].sceneName && sceneList.ID === dataObject[i].id);
(sceneInfo !== undefined && sceneInfo.Value === true) ? SetIconGreen(section, i): SetIconRed(section, i);
break;
}
}
else
{
/*switch (i) {
case "gotCharm_36": case "gotCharm_36":
// prevents green checkbox and adding 1% when only got one white fragment // prevents green checkbox and adding 1% when only got one white fragment
(playerData.gotQueenFragment === true && playerData.gotKingFragment === true) ? SetIconGreen(section, i): SetIconRed(section, i); (playerData.gotQueenFragment === true && playerData.gotKingFragment === true) ? SetIconGreen(section, i): SetIconRed(section, i);
@ -916,7 +1081,7 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
if (playerData.hasOwnProperty(i) === false) { if (playerData.hasOwnProperty(i) === false) {
SetIconNone(section, i); SetIconNone(section, i);
dataObject[i].disabled = true; dataObject[i].disabled = true;
/* textPrefix = `<del>${textPrefix}</del>`; */ //textPrefix = `<del>${textPrefix}</del>`;
break; break;
} }
@ -925,7 +1090,7 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
if (i === "grimmChildLevel") { if (i === "grimmChildLevel") {
// (playerData.grimmChildLevel >= 4) ? SetIconGreen(section, i): SetIconRed(section, i); // (playerData.grimmChildLevel >= 4) ? SetIconGreen(section, i): SetIconRed(section, i);
/* Check if Nightmare King or Banishment by looking at grimmChildLevel */ // Check if Nightmare King or Banishment by looking at grimmChildLevel
switch (playerData[i]) { switch (playerData[i]) {
case 4: case 4:
@ -1049,7 +1214,7 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
if (checkText === "PropertyNotFound") { if (checkText === "PropertyNotFound") {
SetIconNone(section, i); SetIconNone(section, i);
dataObject[i].disabled = true; dataObject[i].disabled = true;
/* textPrefix = `<del>${textPrefix}</del>`; */ //textPrefix = `<del>${textPrefix}</del>`;
break; break;
} else if (checkText === "PantheonCompleted") { } else if (checkText === "PantheonCompleted") {
@ -1063,6 +1228,8 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
default: default:
(playerData[i] === true) ? SetIconGreen(section, i): SetIconRed(section, i); (playerData[i] === true) ? SetIconGreen(section, i): SetIconRed(section, i);
}*/
(playerData[i] === true) ? SetIconGreen(section, i): SetIconRed(section, i);
} }
/* sFillText += PrepareHTMLString(section, textPrefix, textSuffix, wiki); */ /* sFillText += PrepareHTMLString(section, textPrefix, textSuffix, wiki); */
@ -1141,22 +1308,22 @@ function CheckGodmasterDoors(dataObject, playerData) {
} }
/** /**
* Verifies the level of player's nail upgrades, and appends HTML accordingly. * Verifies the level of player's needle upgrades, and appends HTML accordingly.
* @param {object} section ID of the HTML element for data appending * @param {object} section ID of the HTML element for data appending
* @param {object} dataObject Object containing nail upgrades data to be verified * @param {object} dataObject Object containing needle upgrades data to be verified
* @param {object} playerData Reference/pointer to specific data where to search in the save file * @param {object} playerData Reference/pointer to specific data where to search in the save file
*/ */
function CheckNailUpgrades(section, dataObject, playerData) { function CheckNeedleUpgrades(section, dataObject, playerData) {
// appends "Nail" to every array element // appends "Nail" to every array element
// same as names in the database object // same as names in the database object
let nail = ["old", "sharpened", "channeled", "coiled", "pure"].map((element) => element + "Nail"); let Needle = ["starting", "sharpened", "shining", "hivesteel", "paleSteel"].map((element) => element + "Needle");
let sFillText = ""; let sFillText = "";
for (let i = 0; i < 5; i++) { for (let i = 0; i < 5; i++) {
(playerData.nailSmithUpgrades >= i) ? SetIconGreen(section, nail[i]): SetIconRed(section, nail[i]); (playerData.nailUpgrades >= i) ? SetIconGreen(section, Needle[i]): SetIconRed(section, Needle[i]);
sFillText += PrepareHTMLString(section, dataObject[nail[i]].name, dataObject[nail[i]].spoiler, dataObject[nail[i]].wiki); sFillText += PrepareHTMLString(section, dataObject[Needle[i]].name, dataObject[Needle[i]].spoiler, dataObject[Needle[i]].wiki);
} }
if (section.percent) section.percent--; // subject one for the Old Nail if (section.percent) section.percent--; // subject one for the Old Nail
} }
@ -2017,136 +2184,39 @@ function CheckHuntersJournal(db, sectionName, playerData) {
let section = db.sections[sectionName]; let section = db.sections[sectionName];
let entries = db.sections[sectionName].entries; let entries = db.sections[sectionName].entries;
let entriesStatistics = db.sections.statistics.entries; //let entriesStatistics = db.sections.statistics.entries; // Alba: disabled for future use
let name = ""; let name = "";
let nameDefault = ""; let nameDefault = "";
let amountKillsLeft = 0; let amountKillsLeft = 0;
let journalPlayerList = playerData.EnemyJournalKillData.list
for (let entry in entries) { for (let entry in entries) {
name = entries[entry].nameDefault; let MonsterInfo = journalPlayerList.find(journalPlayerList => journalPlayerList.Name === entries[entry].databaseName);
nameDefault = entries[entry].nameDefault;
entries[entry].name = nameDefault; //recorded and founded and reached to the requirement
if (MonsterInfo !== undefined
/* Entry Shade always unlocked */ && MonsterInfo.Record.Kills >= entries[entry].killRequire)
if (entry === "ShadeJournal") { {
entries[entry].name = entries[entry].gameName;
SetIconGreen(section, entry); SetIconGreen(section, entry);
/* Proceed to next entry immediately */
continue;
} }
// didnt reach the limit but at least kill him once.
if (playerData.hasOwnProperty(`kills${entry}`)) { else if (MonsterInfo !== undefined
&& MonsterInfo.Record.Kills >= 1)
switch (entry) { {
name = entries[entry].gameName + ` (${(entries[entry].killRequire-MonsterInfo.Record.Kills)})`;
case "GreyPrince":
case "ZotelingBalloon":
case "ZotelingHopper":
case "ZotelingBuzzer":
/* When Zote == OFF (Neglect route), fade the entry and move to the next iteration */
if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
entries[entry].disabled = true;
entries[entry].name = nameDefault;
SetIconNone(section, entry);
continue;
}
break;
case "FlameBearerLarge":
/* If the troupe was banished and the player didn't defeat any Grimmkin Nightmare, then it's entry cannot be obtained on this save */
if (playerData.destroyedNightmareLantern === true && playerData.killedFlameBearerLarge === false) {
entries[entry].disabled = true;
entries[entry].name = nameDefault;
SetIconNone(section, entry);
continue;
}
break;
case "NightmareGrimm":
/* if the troupe was banished, the Nightmare King entry cannot be obtained on this save */
if (playerData.destroyedNightmareLantern === true) {
entries[entry].disabled = true;
entries[entry].name = nameDefault;
SetIconNone(section, entry);
continue;
}
break;
}
amountKillsLeft = playerData[`kills${entry}`];
/* When the Hunter's Note is unlocked, the entry has a green symbol */
if (amountKillsLeft === 0) {
SetIconGreen(section, entry);
/* If not, show how many remain to defeat in the name */
} else {
name += ` (${amountKillsLeft})`;
entries[entry].name = name; entries[entry].name = name;
SetIconPartialJournal(section, entry);
/* When killed at least 1, the entry has a gray symbol */
if (playerData[`killed${entry}`] === true) {
SetIconPartialJournal(section, entry);
/* When not killed, the entry is undiscovered */
} else {
SetIconRed(section, entry);
}
}
/* Void Idol backwards compatibility */
if (entry === "VoidIdol_1") {
if (playerData.killedVoidIdol_1 === false &&
(playerData.killedVoidIdol_2 === true || playerData.killedVoidIdol_3 === true)) {
SetIconGreen(section, entry);
entries[entry].name = nameDefault;
}
}
/* Earlier save files backwards compatibility (no undefined) */
} else {
amountKillsLeft = 0;
entries[entry].disabled = true;
entries[entry].name = name;
/* Subtract one from maximum of journal entries (for extended completion and green icons) */
switch (entry) {
case "VoidIdol_1":
case "VoidIdol_2":
case "VoidIdol_3":
case "BindingSeal":
case "GodseekerMask":
break;
default:
entriesStatistics.journalEntriesCompleted.max--;
entriesStatistics.journalNotesCompleted.max--;
}
SetIconNone(section, entry);
} }
else
{
name = entries[entry].gameName + ` (${(entries[entry].killRequire)})`;
entries[entry].name = name;
SetIconRed(section, entry);
}
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -16,12 +16,6 @@ import MAP from "./hk-dictionary.js";
case "hk-hints": case "hk-hints":
break; break;
case "hk-equipment":
// double % for equipment
section.percent += 2;
break;
// Hunter's Journal entries // Hunter's Journal entries
case "hk-journal": case "hk-journal":
section.percent++; section.percent++;

View file

@ -44,7 +44,7 @@ const SYMBOL_ASCENDED = "<i class='reznoricon-ascended'></i>"; // Ascended
const SYMBOL_RADIANT = "<i class='reznoricon-radiant'></i>"; // Radiant const SYMBOL_RADIANT = "<i class='reznoricon-radiant'></i>"; // Radiant
const SYMBOL_EMPTY = "<span class='padding-left'></span>"; // No symbol const SYMBOL_EMPTY = "<span class='padding-left'></span>"; // No symbol
const FLEUR_DIVIDE = "<div class='horizontal-line'></div>"; const FLEUR_DIVIDE = "<div class='horizontal-line'></div>";
const WIKI_LINK = "https://hollowknight.fandom.com/wiki/"; const WIKI_LINK = "https://hollowknightsilksong.wiki.fextralife.com/";
const ROOT = document.documentElement; const ROOT = document.documentElement;
const SCROLL_BUTTON = document.querySelector(".scroll-up-button"); const SCROLL_BUTTON = document.querySelector(".scroll-up-button");
@ -191,8 +191,6 @@ function GenerateInnerHTML(db) {
let witchCrestImage = `<img src='${WITCH_CREST_IMAGE}' class='crest' alt='Witch image' title='Witch Crest'>`; let witchCrestImage = `<img src='${WITCH_CREST_IMAGE}' class='crest' alt='Witch image' title='Witch Crest'>`;
SHELL_SHARDS_IMAGE
/* ############################## create all main entries ########################################################################## */ /* ############################## create all main entries ########################################################################## */
@ -206,18 +204,18 @@ function GenerateInnerHTML(db) {
switch (section) { switch (section) {
/* Main % */ /* Main % */
case "bosses": case "crests":
textFill += [ textFill += [
`<div class="tab-switch-buttons">`, `<div class="tab-switch-buttons">`,
`<button id="button-switch-main" name="main" class="button tab-switch" type="button">Main %</button>`, `<button id="button-switch-main" name="main" class="button tab-switch" type="button">Main %</button>`,
`<button id="button-switch-essentials" name="essentials" class="button tab-switch" type="button">Essentials %</button>`, //`<button id="button-switch-essentials" name="essentials" class="button tab-switch" type="button">Essentials %</button>`,
`<button id="button-switch-journal" name="journal" class="button tab-switch" type="button">Journal</button>`, `<button id="button-switch-journal" name="journal" class="button tab-switch" type="button">Journal</button>`,
`<button id="button-switch-collectibles" name="collectibles" class="button tab-switch" type="button">Collectibles</button>`, `<button id="button-switch-collectibles" name="collectibles" class="button tab-switch" type="button">Collectibles</button>`,
`<button id="button-switch-geocaches" name="geocaches" class="button tab-switch" type="button">Geo Caches</button>`, //`<button id="button-switch-geocaches" name="geocaches" class="button tab-switch" type="button">Geo Caches</button>`,
`<button id="button-switch-secrets" name="secrets" class="button tab-switch" type="button">Secrets</button>`, //`<button id="button-switch-secrets" name="secrets" class="button tab-switch" type="button">Secrets</button>`,
`<button id="button-switch-godhome" name="godhome" class="button tab-switch" type="button">Godmaster</button>`, //`<button id="button-switch-godhome" name="godhome" class="button tab-switch" type="button">Godmaster</button>`,
`<button id="button-switch-statistics" name="statistics" class="button tab-switch" type="button">Statistics</button>`, //`<button id="button-switch-statistics" name="statistics" class="button tab-switch" type="button">Statistics</button>`,
`</div>`, `</div>`,
].join("\n"); ].join("\n");
@ -226,11 +224,11 @@ function GenerateInnerHTML(db) {
break; break;
/* Essentials % */ /* Essentials % */
case "essentialsCollectibles": /*case "essentialsCollectibles":
textFill += `<div id="tab-essentials" class="large-section">`; textFill += `<div id="tab-essentials" class="large-section">`;
break; break;*/
/* Journal */ /* Journal */
case "huntersJournal": case "huntersJournal":
@ -240,37 +238,37 @@ function GenerateInnerHTML(db) {
break; break;
/* Collectibles */ /* Collectibles */
case "charmNotches": case "flea":
textFill += `<div id="tab-collectibles" class="large-section">`; textFill += `<div id="tab-collectibles" class="large-section">`;
break; break;
/* Geo Caches */ /* Geo Caches */
case "geoChests": /*case "geoChests":
textFill += `<div id="tab-geocaches" class="large-section">`; textFill += `<div id="tab-geocaches" class="large-section">`;
break; break;*/
/* Secrets */ /* Secrets */
case "worldInteractions": /*case "worldInteractions":
textFill += `<div id="tab-secrets" class="large-section">`; textFill += `<div id="tab-secrets" class="large-section">`;
break; break;*/
/* Statistics */ /* Statistics */
case "statistics": /*case "statistics":
textFill += `<div id="tab-statistics" class="large-section">`; textFill += `<div id="tab-statistics" class="large-section">`;
break; break;*/
/* Godmaster */ /* Godmaster */
case "godhomeStatistics": /*case "godhomeStatistics":
textFill += `<div id="tab-godhome" class="large-section">`; textFill += `<div id="tab-godhome" class="large-section">`;*/
break; break;
} }
@ -677,14 +675,18 @@ function GenerateInnerHTML(db) {
switch (section) { switch (section) {
/* ending the tabs */ /* ending the tabs */
case "godmaster": // Main % case "toolPouchUpgrades": // Main %
case "huntersJournal": // Journal
case "flea": // Collectibles
/*case "toolPouchUpgrades": // Main %
case "achievementsBosses": // Essentials % case "achievementsBosses": // Essentials %
case "huntersJournalOptional": // Journal case "huntersJournal": // Journal
case "items": // Collectibles case "items": // Collectibles
case "geoRocks": // Geo Caches case "geoRocks": // Geo Caches
case "corniferNotes": // Secrets case "corniferNotes": // Secrets
case "statistics": // Statistics case "statistics": // Statistics
case "hallOfGods": // Godmaster case "hallOfGods": // Godmaster*/
finalHTMLFill += `</div>`; finalHTMLFill += `</div>`;
@ -760,13 +762,25 @@ function CompletionFillNoSave(section) {
switch (section.id) { switch (section.id) {
case "hk-intro": case "hk-intro":
case "hk-bosses": case "hk-crests":
case "hk-charms": case "hk-Needleupgrades":
case "hk-redTools":
case "hk-blueTools":
case "hk-yellowTools":
case "hk-equipment": case "hk-equipment":
case "hk-skills":
case "hk-silkHeart":
case "hk-miscellaneous":
case "hk-spoolFragments":
case "hk-maskshards":
case "hk-craftingKitUpgrades":
case "hk-toolPouchUpgrades":
/*case "hk-charms":
case "hk-bosses":
case "hk-nailupgrades": case "hk-nailupgrades":
case "hk-nailarts": case "hk-nailarts":
case "hk-spells": case "hk-spells":
case "hk-maskshards":
case "hk-vesselfragments": case "hk-vesselfragments":
case "hk-dreamnail": case "hk-dreamnail":
case "hk-warriordreams": case "hk-warriordreams":
@ -774,7 +788,7 @@ function CompletionFillNoSave(section) {
case "hk-colosseum": case "hk-colosseum":
case "hk-grimmtroupe": case "hk-grimmtroupe":
case "hk-lifeblood": case "hk-lifeblood":
case "hk-godmaster": case "hk-godmaster":*/
symbol = "%"; symbol = "%";
@ -839,9 +853,9 @@ function CompletionFill(section) {
if (section.id === "hk-maskshards") { if (section.id === "hk-maskshards") {
let perc = section.percent; let perc = section.percent;
(perc % 4) ? cp = Math.floor(perc / 4): cp = perc / 4; (perc % 4) ? cp = Math.floor(perc / 4): cp = perc / 4;
} else if (section.id === "hk-vesselfragments") { } else if (section.id === "hk-spoolFragments") {
let perc = section.percent; let perc = section.percent;
(perc % 3) ? cp = Math.floor(perc / 3): cp = perc / 3; (perc % 2) ? cp = Math.floor(perc / 2): cp = perc / 2;
} }
// switches the box to red when a section (h2) is 0 // switches the box to red when a section (h2) is 0
@ -883,21 +897,34 @@ function CompletionFill(section) {
symbol = "%"; symbol = "%";
break; break;
case "hk-intro":
case "hk-crests":
case "hk-Needleupgrades":
case "hk-redTools":
case "hk-blueTools":
case "hk-yellowTools":
case "hk-equipment":
case "hk-skills":
case "hk-silkHeart":
case "hk-miscellaneous":
case "hk-spoolFragments":
case "hk-maskshards":
case "hk-craftingKitUpgrades":
case "hk-toolPouchUpgrades":
/*case "hk-charms":
case "hk-bosses": case "hk-bosses":
case "hk-charms": case "hk-nailupgrades":
case "hk-equipment": case "hk-nailarts":
case "hk-nailupgrades": case "hk-spells":
case "hk-nailarts": case "hk-vesselfragments":
case "hk-spells": case "hk-dreamnail":
case "hk-maskshards": case "hk-warriordreams":
case "hk-vesselfragments": case "hk-dreamers":
case "hk-dreamnail": case "hk-colosseum":
case "hk-warriordreams": case "hk-grimmtroupe":
case "hk-dreamers": case "hk-lifeblood":
case "hk-colosseum": case "hk-godmaster":*/
case "hk-grimmtroupe":
case "hk-lifeblood":
case "hk-godmaster":
symbol = "%"; symbol = "%";