From b4a0563e5f27fc28f6471cc0d7783c20258bcf37 Mon Sep 17 00:00:00 2001 From: I Made Setia Baruna Date: Fri, 5 Feb 2021 00:31:02 +0800 Subject: [PATCH] Update talent calculator input --- src/routes/calculator/_character.svelte | 32 +++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/routes/calculator/_character.svelte b/src/routes/calculator/_character.svelte index 26e7afb9..9f9184f6 100644 --- a/src/routes/calculator/_character.svelte +++ b/src/routes/calculator/_character.svelte @@ -73,6 +73,11 @@ second: 1, third: 1, }; + let targetTalentLevel = { + first: 1, + second: 1, + third: 1, + }; let talentMaterial = { items: {}, mora: 0, @@ -281,7 +286,7 @@ function calculateTalent() { Object.keys(currentTalentLevel).forEach((i) => { - talent.slice(currentTalentLevel[i] - 1, maxTalentLevel - 1).forEach((talent) => { + talent.slice(currentTalentLevel[i] - 1, targetTalentLevel[i] - 1).forEach((talent) => { talentMaterial.mora = talentMaterial.mora + talent.mora; const currentBook = selectedCharacter.material.book[talent.book.rarity - 2]; @@ -525,7 +530,6 @@ Calculate Talent Material? {/if} {#if withTalent} -

Will calculate all talent to level {maxTalentLevel}

Input the 1st, 2nd & 3rd current talent level

+

to level

+
+ + + +
{/if}