Skip to content

Commit 26a6b45

Browse files
committed
Allow user to keep 2 shards for level 5s
1 parent ed80855 commit 26a6b45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ connector.on('connect', async (c) => {
123123

124124
console.log("You can use champion tokens to improve your mastery level. You might want one for level 6 and one for 7.");
125125
const disenchantLv5 = await askYesNo("Should we disenchant champion shards when you're mastery level 5 on the champion?");
126+
const keepTwoShards = disenchantLv5 == false ? await askYesNo("Do you want to keep two shards in this case? You would have one for level 6 as well.") : false;
126127
const disenchantLv6 = await askYesNo("Should we disenchant champion shards when you're mastery level 6 on the champion?");
127128
const disenchantUnowned = await askYesNo("Should we disenchant champion shards of champs you don't own?");
128129

@@ -133,8 +134,10 @@ connector.on('connect', async (c) => {
133134
const entry = mastery.find(x => x.championId === champId);
134135

135136
if (entry) {
137+
136138
if (entry.championLevel == 5 && disenchantLv5 == false)
137-
champ.count--;
139+
champ.count -= keepTwoShards ? 2 : 1;
140+
138141
if (entry && entry.championLevel == 6 && disenchantLv6 == false)
139142
champ.count--;
140143
}

0 commit comments

Comments
 (0)