diff --git a/src/locales/en.json b/src/locales/en.json index 42f1eb4b..6956306d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -390,7 +390,8 @@ "mora": "Mora (approximate ±40)", "expWasted": "EXP Wasted", "addToTodo": "Add to Todo List", - "addedToTodo": "Added to Todo List" + "addedToTodo": "Added to Todo List", + "talent": ["Attack", "Skill", "Burst"] }, "expTable": { "level": "Level", diff --git a/src/routes/calculator/_character.svelte b/src/routes/calculator/_character.svelte index e6ee7f0e..f9b2560a 100644 --- a/src/routes/calculator/_character.svelte +++ b/src/routes/calculator/_character.svelte @@ -284,6 +284,8 @@ } } }); + + moraNeeded = moraNeeded + talentMaterial.mora; } function calculateTalent() { @@ -407,6 +409,14 @@ calculateTalent(); } } + + for (const [id, item] of Object.entries(talentMaterial.items)) { + if (ascensionResouce[id]) { + ascensionResouce[id].amount += item.amount; + } else { + ascensionResouce[id] = item; + } + } } changed = false; @@ -429,14 +439,6 @@ return prev; }, {}); - const talentRes = Object.keys(talentMaterial.items).reduce((prev, item) => { - if (talentMaterial.items[item].amount > 0) { - prev[item] = talentMaterial.items[item].amount; - } - - return prev; - }, {}); - addTodo({ type: 'character', character: withAscension ? selectedCharacter : null, @@ -445,13 +447,11 @@ mora: moraNeeded, ...levelRes, ...ascensionRes, - ...talentRes, }, original: { mora: moraNeeded, ...levelRes, ...ascensionRes, - ...talentRes, }, }); @@ -460,6 +460,7 @@ addedToTodo = false; }, 2000); } +
@@ -496,4 +497,5 @@ @apply border-b-0; } } + |