Skip to content

Commit e924644

Browse files
committed
Don't prioritize abilities
1 parent b3734f1 commit e924644

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

common/util.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,15 @@ export function tryPayCost(
276276
} else if (prepared.some((card) => card.id == b.id)) {
277277
return 1;
278278
} else {
279-
return -cache.getCardInfo(game, b).colors.length - -cache.getCardInfo(game, a).colors.length;
279+
const aCardInfo = cache.getCardInfo(game, a);
280+
const bCardInfo = cache.getCardInfo(game, b);
281+
if (aCardInfo.hasActivate && !bCardInfo.hasActivate) {
282+
return 1;
283+
} else if (bCardInfo.hasActivate && !aCardInfo.hasActivate) {
284+
return -1;
285+
} else {
286+
return -bCardInfo.colors.length - -aCardInfo.colors.length;
287+
}
280288
}
281289
});
282290

0 commit comments

Comments
 (0)