mirror of
https://github.com/webxoss/webxoss-client.git
synced 2025-03-19 16:00:00 +01:00
add limitation on double sided cards && wxid rules for them
This commit is contained in:
parent
1ab691f0fd
commit
5e8b3a228f
2 changed files with 4 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue