feat: More bonus (exponential) and method to list icons needed

This commit is contained in:
gauvainboiche
2026-10-08 14:20:58 +02:00
parent fc0d5e3ba4
commit a88b8f5f14
25 changed files with 977 additions and 40 deletions
+10
View File
@@ -29,6 +29,7 @@ export function buildContext({
achievements,
investments,
tabs,
endless,
}) {
const generatorsById = byId(generators, 'generator');
const upgradesById = byId(upgrades, 'upgrade');
@@ -36,6 +37,7 @@ export function buildContext({
const perksById = byId(legacy, 'legacy perk');
const achievementsById = byId(achievements, 'achievement');
const societiesById = byId(investments.societies, 'society');
const endlessById = byId(endless, 'endless line');
byId(tabs, 'tab');
for (const u of upgrades) {
@@ -50,6 +52,12 @@ export function buildContext({
if (!researchById.has(req)) throw new Error(`Research "${node.id}": unknown requirement "${req}"`);
}
}
for (const line of endless) {
checkEffect(`Endless "${line.id}"`, line.effect, generatorsById);
if (line.requires && !upgradesById.has(line.requires)) {
throw new Error(`Endless "${line.id}": unknown requirement "${line.requires}"`);
}
}
for (const perk of legacy) checkEffect(`Perk "${perk.id}"`, perk.effect, generatorsById);
for (const a of achievements) checkEffect(`Achievement "${a.id}"`, a.effect, generatorsById);
for (const s of investments.societies) {
@@ -65,11 +73,13 @@ export function buildContext({
achievements,
investments,
tabs,
endless,
generatorsById,
upgradesById,
researchById,
perksById,
achievementsById,
societiesById,
endlessById,
};
}