add limitation on double sided cards && wxid rules for them

This commit is contained in:
WEBXOSS 2016-12-03 01:08:54 +08:00
parent 1ab691f0fd
commit 5e8b3a228f
2 changed files with 4 additions and 1 deletions

View file

@ -521,7 +521,7 @@ IllustRule.parse = function (words) {
///////////////////////////////////////////////////////////////
var WxidRule = {};
WxidRule.parseWord = function (word) {
var match = word.match(/^(wx\d{2}|wd\d{2}|pr|sp\d{2})-?(re\d{0,2}|cb\d{0,2}|\d{0,3})$/);
var match = word.match(/^(wx\d{2}|wd\d{2}|pr|sp\d{2})-?(re\d{0,2}|cb\d{0,2}|\d{0,3}[a|b]?)$/);
if (!match) return null;
return match[1] + '-' + match[2];
}

View file

@ -205,6 +205,9 @@ DeckManager.prototype.checkDuplicate = function (pids) {
var bucket = {};
pids.forEach(function (pid) {
var info = CardInfo[pid];
if (info.sideA) {
info = CardInfo[info.sideA]
}
if (info.cid in bucket) {
bucket[info.cid]++;
} else {