🐛 fix wisdom comparison

This commit is contained in:
WEBXOSS 2017-06-13 21:13:23 +08:00
parent 2d62d360c7
commit 926ce55faf
3 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ ConstEffect.prototype.compute = function () {
if (this.fixed && this.computed) return;
this.clear();
if (this.cross && !this.source.crossed) return;
if (this.wisdom && !(this.source.player.getWisdom() >= this.wisdom)) return;
if (this.wisdom && (this.source.player.getWisdom() !== this.wisdom)) return;
if (!this.condition || this.condition.call(this.source)) {
var control = {
reregister: false

View file

@ -74,7 +74,7 @@ Effect.prototype.checkCondition = function () {
return false;
}
// wisdom
if (this.wisdom && !(this.source.player.getWisdom() > this.wisdom)) {
if (this.wisdom && (this.source.player.getWisdom() !== this.wisdom)) {
return false;
}
// 隐藏规则之"发动和解决的场所必须一致"

View file

@ -868,7 +868,7 @@ Player.prototype.canUseActionEffect = function (effect,arg) {
// cross
if (effect.cross && !effect.source.crossed) return false;
// wisdom
if (effect.wisdom && !(effect.source.player.getWisdom() >= effect.wisdom)) return false;
if (effect.wisdom && (effect.source.player.getWisdom() !== effect.wisdom)) return false;
// once
if (effect.once && inArr(effect,this.usedActionEffects)) return false;
// condition