mirror of
https://github.com/webxoss/webxoss-core.git
synced 2024-11-20 06:49:53 +01:00
🐛 fix wisdom comparison
This commit is contained in:
parent
2d62d360c7
commit
926ce55faf
3 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ ConstEffect.prototype.compute = function () {
|
||||||
if (this.fixed && this.computed) return;
|
if (this.fixed && this.computed) return;
|
||||||
this.clear();
|
this.clear();
|
||||||
if (this.cross && !this.source.crossed) return;
|
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)) {
|
if (!this.condition || this.condition.call(this.source)) {
|
||||||
var control = {
|
var control = {
|
||||||
reregister: false
|
reregister: false
|
||||||
|
|
|
@ -74,7 +74,7 @@ Effect.prototype.checkCondition = function () {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// wisdom
|
// wisdom
|
||||||
if (this.wisdom && !(this.source.player.getWisdom() > this.wisdom)) {
|
if (this.wisdom && (this.source.player.getWisdom() !== this.wisdom)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 隐藏规则之"发动和解决的场所必须一致"
|
// 隐藏规则之"发动和解决的场所必须一致"
|
||||||
|
|
|
@ -868,7 +868,7 @@ Player.prototype.canUseActionEffect = function (effect,arg) {
|
||||||
// cross
|
// cross
|
||||||
if (effect.cross && !effect.source.crossed) return false;
|
if (effect.cross && !effect.source.crossed) return false;
|
||||||
// wisdom
|
// wisdom
|
||||||
if (effect.wisdom && !(effect.source.player.getWisdom() >= effect.wisdom)) return false;
|
if (effect.wisdom && (effect.source.player.getWisdom() !== effect.wisdom)) return false;
|
||||||
// once
|
// once
|
||||||
if (effect.once && inArr(effect,this.usedActionEffects)) return false;
|
if (effect.once && inArr(effect,this.usedActionEffects)) return false;
|
||||||
// condition
|
// condition
|
||||||
|
|
Loading…
Reference in a new issue