fix limit check with

This commit is contained in:
WEBXOSS 2016-12-02 23:09:59 +08:00
parent 5714ecb5da
commit 80fa82c430

View file

@ -323,8 +323,7 @@ Card.prototype.canSummonWith = function (signis) {
},this);
if (flag) return false;
// 限定
flag = this.player.ignoreLimitingOfLevel5Signi && (this.level === 5);
if (!flag && !this.checkLimiting()) return false;
if (!this.checkLimiting()) return false;
// 等级限制
if (this.level > this.player.lrig.level) return false;
// SIGNI 数量限制
@ -507,6 +506,11 @@ Card.prototype.checkLimiting = function () {
return true;
}
}
if (this.player.ignoreLimitingOfLevel5Signi) {
if ((this.type === 'SIGNI') && (this.level === 5)) {
return true;
}
}
return this.limitings.some(function (limiting) {
return inArr(limiting,this.player.lrig.classes);
},this);