Counting Geo Rocks

This commit is contained in:
ReznoRMichael 2021-07-30 10:22:44 +02:00
parent ed8b867609
commit 4fdcf60ce5
3 changed files with 61 additions and 27 deletions

View file

@ -440,7 +440,6 @@ function CheckExtendedCompletion(db) {
case "rancidEggs": case "rancidEggs":
case "jinnEggsSold": case "jinnEggsSold":
case "xunFlowerBrokeTimes": case "xunFlowerBrokeTimes":
case "geoRocks":
case "itemsDiscovered": case "itemsDiscovered":
continue; continue;
} }
@ -459,6 +458,7 @@ function CheckExtendedCompletion(db) {
case "relicsHallownestSeal": case "relicsHallownestSeal":
case "relicsKingsIdol": case "relicsKingsIdol":
case "relicsArcaneEgg": case "relicsArcaneEgg":
case "geoRocks":
case "whiteDefenderDefeats": case "whiteDefenderDefeats":
case "greyPrinceDefeats": case "greyPrinceDefeats":
break; break;
@ -473,7 +473,7 @@ function CheckExtendedCompletion(db) {
} }
} }
/* Skip disabled entries entirely from counting */ /* Skip disabled entries entirely from counting (substract a point from Total) */
if (entries[entry].hasOwnProperty("disabled") && entries[entry].disabled === true) { if (entries[entry].hasOwnProperty("disabled") && entries[entry].disabled === true) {
@ -483,30 +483,44 @@ function CheckExtendedCompletion(db) {
} }
intro.extendedCompletionTotal--; intro.extendedCompletionTotal--;
if (entry === "greyPrinceDefeats" || entry === "whiteDefenderDefeats") {
console.log(entry);
}
} else if (entries[entry].hasOwnProperty("amount") && entries[entry].hasOwnProperty("max")) {
/* Skip counting 3000 Fountain Geo, too much */
if (entry === "fountainGeo") {
break;
}
amount = entries[entry].amount;
max = entries[entry].max;
/* Prevent overflowing the counter */
if (amount > max) {
amount = max;
}
intro.extendedCompletionDone += amount;
intro.extendedCompletionTotal += max;
console.info("".concat(entry, ": ").concat(amount, "/").concat(max), entries[entry].name);
amount = 0;
max = 0;
} }
/* Counting amount/max for several entries */
else if (entries[entry].hasOwnProperty("amount") && entries[entry].hasOwnProperty("max")) {
/* Skip counting 3000 Fountain Geo, too much */
if (entry === "fountainGeo") {
break;
}
amount = entries[entry].amount;
max = entries[entry].max;
/* Prevent overflowing the counter */
if (amount > max) {
amount = max;
}
intro.extendedCompletionDone += amount;
intro.extendedCompletionTotal += max;
console.info("".concat(entry, ": ").concat(amount, "/").concat(max), entries[entry].name);
amount = 0;
max = 0;
}
/* Counting Geo Rocks */
else if (entries[entry].hasOwnProperty("activated") && entries[entry].hasOwnProperty("discoveredTotal")) {
amount = entries[entry].activated;
max = entries[entry].discoveredTotal;
intro.extendedCompletionDone += amount;
intro.extendedCompletionTotal += max;
console.info("".concat(entry, ": ").concat(amount, "/").concat(max), entries[entry].name);
amount = 0;
max = 0;
}
/* Missable Arcane Egg exception */
/* else if (entry === "arcaneEggLifebloodCoreRoom") {
if ()
} */
} }
} }

File diff suppressed because one or more lines are too long

View file

@ -523,7 +523,6 @@ function CheckExtendedCompletion(db) {
case "rancidEggs": case "rancidEggs":
case "jinnEggsSold": case "jinnEggsSold":
case "xunFlowerBrokeTimes": case "xunFlowerBrokeTimes":
case "geoRocks":
case "itemsDiscovered": case "itemsDiscovered":
continue; continue;
@ -545,6 +544,7 @@ function CheckExtendedCompletion(db) {
case "relicsHallownestSeal": case "relicsHallownestSeal":
case "relicsKingsIdol": case "relicsKingsIdol":
case "relicsArcaneEgg": case "relicsArcaneEgg":
case "geoRocks":
case "whiteDefenderDefeats": case "whiteDefenderDefeats":
case "greyPrinceDefeats": case "greyPrinceDefeats":
break; break;
@ -570,6 +570,7 @@ function CheckExtendedCompletion(db) {
intro.extendedCompletionTotal--; intro.extendedCompletionTotal--;
} }
/* Counting amount/max for several entries */
else if (entries[entry].hasOwnProperty("amount") && entries[entry].hasOwnProperty("max")) { else if (entries[entry].hasOwnProperty("amount") && entries[entry].hasOwnProperty("max")) {
/* Skip counting 3000 Fountain Geo, too much */ /* Skip counting 3000 Fountain Geo, too much */
@ -593,6 +594,25 @@ function CheckExtendedCompletion(db) {
amount = 0; amount = 0;
max = 0; max = 0;
} }
/* Counting Geo Rocks */
else if (entries[entry].hasOwnProperty("activated") && entries[entry].hasOwnProperty("discoveredTotal")) {
amount = entries[entry].activated;
max = entries[entry].discoveredTotal;
intro.extendedCompletionDone += amount;
intro.extendedCompletionTotal += max;
console.info(`${entry}: ${amount}/${max}`, entries[entry].name);
amount = 0;
max = 0;
}
/* Missable Arcane Egg exception */
/* else if (entry === "arcaneEggLifebloodCoreRoom") {
if ()
} */
} }
} }