Substract GPZ and 3 Zotelings from max

This commit is contained in:
ReznoRMichael 2021-07-18 00:56:18 +02:00
parent 353f08f262
commit 011c582102
4 changed files with 31 additions and 5 deletions

View file

@ -909,6 +909,17 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
if (i === "journalEntriesCompleted" || i === "journalNotesCompleted") { if (i === "journalEntriesCompleted" || i === "journalNotesCompleted") {
countTotal = "".concat(amount, " / ").concat(playerData.journalEntriesTotal); countTotal = "".concat(amount, " / ").concat(playerData.journalEntriesTotal);
dataObject[i].amountTotal = playerData.journalEntriesTotal; dataObject[i].amountTotal = playerData.journalEntriesTotal;
/* when Zote is dead, the max Journal entries will equal = 160 instead of 164. For the green tick */
if (playerData.zoteDead === true) {
dataObject[i].max = 160;
/* Substract GPZ and 3 Zotelings from max */
} else {
/* otherwise, set back to 164 */
dataObject[i].max = dataObject[i].maxDefault;
}
console.info(i + ".max", dataObject[i].max);
} }
if (i === "grubsCollected") { if (i === "grubsCollected") {
@ -4329,8 +4340,9 @@ var HK = {
}, },
journalEntriesCompleted: { journalEntriesCompleted: {
name: "Creatures Encountered", name: "Creatures Encountered",
spoiler: "Hunter's Journal (164 max)", spoiler: "Hunter's Journal (160+4 max)",
max: 164, max: 164,
maxDefault: 164,
wiki: "Category:Enemies_(Hollow_Knight)#Compendium" wiki: "Category:Enemies_(Hollow_Knight)#Compendium"
}, },
@ -4339,8 +4351,9 @@ var HK = {
*/ */
journalNotesCompleted: { journalNotesCompleted: {
name: "Hunter Notes Completed", name: "Hunter Notes Completed",
spoiler: "Hunter's Journal (164 max)", spoiler: "Hunter's Journal (160+4 max)",
max: 164, max: 164,
maxDefault: 164,
wiki: "Category:Enemies_(Hollow_Knight)#Compendium" wiki: "Category:Enemies_(Hollow_Knight)#Compendium"
}, },
nailDamage: { nailDamage: {

File diff suppressed because one or more lines are too long

View file

@ -1017,6 +1017,16 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
if (i === "journalEntriesCompleted" || i === "journalNotesCompleted") { if (i === "journalEntriesCompleted" || i === "journalNotesCompleted") {
countTotal = `${amount} / ${playerData.journalEntriesTotal}`; countTotal = `${amount} / ${playerData.journalEntriesTotal}`;
dataObject[i].amountTotal = playerData.journalEntriesTotal; dataObject[i].amountTotal = playerData.journalEntriesTotal;
/* when Zote is dead, the max Journal entries will equal = 160 instead of 164. For the green tick */
if (playerData.zoteDead === true) {
dataObject[i].max = 160; /* Substract GPZ and 3 Zotelings from max */
} else {
/* otherwise, set back to 164 */
dataObject[i].max = dataObject[i].maxDefault;
}
console.info(i + ".max", dataObject[i].max);
} }
if (i === "grubsCollected") { if (i === "grubsCollected") {
@ -1052,6 +1062,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
break; break;
} }
} }
(amount >= dataObject[i].max) ? CurrentDataTrue(section, i): CurrentDataBlank(section, i); (amount >= dataObject[i].max) ? CurrentDataTrue(section, i): CurrentDataBlank(section, i);
break; break;

View file

@ -1581,8 +1581,9 @@ const HK = {
}, },
journalEntriesCompleted: { journalEntriesCompleted: {
name: "Creatures Encountered", name: "Creatures Encountered",
spoiler: "Hunter's Journal (164 max)", spoiler: "Hunter's Journal (160+4 max)",
max: 164, max: 164,
maxDefault: 164,
wiki: "Category:Enemies_(Hollow_Knight)#Compendium" wiki: "Category:Enemies_(Hollow_Knight)#Compendium"
}, },
/* /*
@ -1590,8 +1591,9 @@ const HK = {
*/ */
journalNotesCompleted: { journalNotesCompleted: {
name: "Hunter Notes Completed", name: "Hunter Notes Completed",
spoiler: "Hunter's Journal (164 max)", spoiler: "Hunter's Journal (160+4 max)",
max: 164, max: 164,
maxDefault: 164,
wiki: "Category:Enemies_(Hollow_Knight)#Compendium" wiki: "Category:Enemies_(Hollow_Knight)#Compendium"
}, },
nailDamage: { nailDamage: {