B:BD[
2.127] → [
2.127:168]
∅:D[
2.168] → [
6.4191:4439]
B:BD[
6.4191] → [
6.4191:4439]
B:BD[
6.4439] → [
3.184:248]
const resource = ResourceType.Mana0;
const currentResource =
gameState.computed.playerResourceAmounts?.[resource] || 50;
const totalAllocatedNodes =
gameState.computed.playerResourceNodesAggregated?.size() ?? 0;
const scale = 2 + 1 / (totalAllocatedNodes + 1);
const resourceAmount = Math.round(currentResource * scale);
const resourceType = ResourceType.Mana0;
const currentResourceAmount = gameState.computed.playerResourceAmounts?.[resourceType] || 50;
const historicalAmountPerNode = currentResourceAmount / totalAllocatedNodes; // how much benefit, on average, each node gave
// we want # of nodes to be quadratic with the # of quests completed
const targetNumAllocatedNodes = totalAllocatedNodes + Math.round(Math.sqrt(totalAllocatedNodes) * 3 - 2);
const randomScale = (squirrel3(prevGameState.worldGen.seed + numQuestsCompleted) / INTMAX32) * 0.4 + 0.8; // 0.8 - 1.2
const resourceAmount = Math.round(targetNumAllocatedNodes * historicalAmountPerNode * randomScale);