Skip to content

Commit 8dd20a7

Browse files
committed
fix: crafting more than max
1 parent d54601e commit 8dd20a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/base/craft/max.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ onPage('Crafting', function craftMax() {
3535
const shiny = card.hasClass('shiny');
3636
if (e.ctrlKey) {
3737
hover.hide();
38-
craftCards(id, shiny, limit, cost, total);
38+
const l = max - cardHelper.craft.quantity(el);
39+
if (l <= 0) return;
40+
craftCards(id, shiny, l, cost, total);
3941
} else {
4042
global('action')(id, shiny);
4143
}

0 commit comments

Comments
 (0)