[Automated] Merge dev into gh-pages

This commit is contained in:
github-actions[bot]
2025-03-03 19:44:54 +00:00
committed by GitHub
5 changed files with 31 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -437,6 +437,33 @@ export function SpellsSection() {
),
);
}
const { minigame } = Game.Objects['Wizard tower'];
const spellsCast = minigame.spellsCastTotal;
const spellsNeeded = (function (val) {
switch (true) {
case val < 9:
return 9 - val;
case val < 99:
return 99 - val;
case val < 999:
return 999 - val;
default:
return 'NA';
}
})(spellsCast);
section.appendChild(
StatsListing(
'basic',
'Spells cast',
spellsCast < 999
? document.createTextNode(
`Next achievement in ${spellsNeeded}, current total: ${Beautify(spellsCast)}`,
)
: document.createTextNode(`No new achievement, current total: ${Beautify(spellsCast)}`),
),
);
return section;
}