From 926ce55faf78b957b2621a11a98f2e2373495b2c Mon Sep 17 00:00:00 2001 From: WEBXOSS Date: Tue, 13 Jun 2017 21:13:23 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20wisdom=20comparison?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ConstEffect.js | 2 +- Effect.js | 2 +- Player.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ConstEffect.js b/ConstEffect.js index adc2953..037c7f9 100644 --- a/ConstEffect.js +++ b/ConstEffect.js @@ -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 diff --git a/Effect.js b/Effect.js index cb5cc31..ac5b03b 100644 --- a/Effect.js +++ b/Effect.js @@ -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; } // 隐藏规则之"发动和解决的场所必须一致" diff --git a/Player.js b/Player.js index d826411..e389495 100644 --- a/Player.js +++ b/Player.js @@ -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