mirror of
https://github.com/webxoss/webxoss-core.git
synced 2024-11-19 22:39: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;
|
||||
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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
// 隐藏规则之"发动和解决的场所必须一致"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue