Whispering Roots
This commit is contained in:
parent
63fcf21e17
commit
be4de5ad01
2 changed files with 20 additions and 1 deletions
|
|
@ -408,6 +408,7 @@ const HK_STATISTICS = {
|
||||||
rancidEggs: ["Rancid Eggs", "Hallownest, Sly, Tuk"],
|
rancidEggs: ["Rancid Eggs", "Hallownest, Sly, Tuk"],
|
||||||
xunFlowerBrokeTimes: ["Delicate Flowers broken", "Resting Grounds: Grey Mourner"],
|
xunFlowerBrokeTimes: ["Delicate Flowers broken", "Resting Grounds: Grey Mourner"],
|
||||||
hasDreamGate: ["Dream Gate", "Seer: 900 Essence"],
|
hasDreamGate: ["Dream Gate", "Seer: 900 Essence"],
|
||||||
|
whisperingRoots: ["Whispering Roots completed", "Dream Nail (out of 15)", 15],
|
||||||
fragileGreed_unbreakable: ["Unbreakable Greed", "Divine: 9000 Geo"],
|
fragileGreed_unbreakable: ["Unbreakable Greed", "Divine: 9000 Geo"],
|
||||||
fragileHealth_unbreakable: ["Unbreakable Heart", "Divine: 12000 Geo"],
|
fragileHealth_unbreakable: ["Unbreakable Heart", "Divine: 12000 Geo"],
|
||||||
fragileStrength_unbreakable: ["Unbreakable Strength", "Divine: 15000 Geo"],
|
fragileStrength_unbreakable: ["Unbreakable Strength", "Divine: 15000 Geo"],
|
||||||
|
|
@ -950,6 +951,21 @@ function CheckAdditionalThings(divId, dataObject, playerData, worldData) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Searches for a given item that the player has found and returns the amount of them that the player completed.
|
||||||
|
* @param {string} itemId Name of the item
|
||||||
|
* @returns {number}
|
||||||
|
*/
|
||||||
|
function CountWorldItem(itemId = "") {
|
||||||
|
let total = 0;
|
||||||
|
for (let i = 0, length = worldData.length; i < length; i++) {
|
||||||
|
if (worldData[i].id === itemId) {
|
||||||
|
if (worldData[i].activated === true) total++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts the number of maps the player has acquired (from the list in an array)
|
* Counts the number of maps the player has acquired (from the list in an array)
|
||||||
* @param {array} mapArray Array of strings with area map names
|
* @param {array} mapArray Array of strings with area map names
|
||||||
|
|
@ -975,6 +991,7 @@ function CheckAdditionalThings(divId, dataObject, playerData, worldData) {
|
||||||
case "nailDamage":
|
case "nailDamage":
|
||||||
case "stationsOpened":
|
case "stationsOpened":
|
||||||
case "charmSlots":
|
case "charmSlots":
|
||||||
|
case "whisperingRoots":
|
||||||
case "journalEntriesCompleted":
|
case "journalEntriesCompleted":
|
||||||
case "journalNotesCompleted":
|
case "journalNotesCompleted":
|
||||||
case "whiteDefenderDefeats":
|
case "whiteDefenderDefeats":
|
||||||
|
|
@ -982,6 +999,8 @@ function CheckAdditionalThings(divId, dataObject, playerData, worldData) {
|
||||||
let amount = 0;
|
let amount = 0;
|
||||||
if (i === "areaMaps") {
|
if (i === "areaMaps") {
|
||||||
amount = CountMaps(dataObject[i][3]);
|
amount = CountMaps(dataObject[i][3]);
|
||||||
|
} else if (i === "whisperingRoots") {
|
||||||
|
amount = CountWorldItem("Dream Plant");
|
||||||
} else {
|
} else {
|
||||||
amount = playerData[i];
|
amount = playerData[i];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ function loadJSON(filename, callback) {
|
||||||
xobj.send(null);
|
xobj.send(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadJSON("save/" + fileName[10],
|
loadJSON("save/" + fileName[3],
|
||||||
function JSONparse(response) {
|
function JSONparse(response) {
|
||||||
// Parse JSON string into object
|
// Parse JSON string into object
|
||||||
jsonObj = JSON.parse(response);
|
jsonObj = JSON.parse(response);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue