mirror of
https://github.com/webxoss/webxoss-core.git
synced 2024-11-20 06:49:53 +01:00
🐛 fix not removing triggering effects when lose ability
This commit is contained in:
parent
160d4ca8fb
commit
420a917225
2 changed files with 6 additions and 0 deletions
|
@ -160,6 +160,11 @@ ConstEffectManager.prototype.compute = function () {
|
|||
cardsAbilityLost.forEach(function (card) {
|
||||
if (!oldAbilityLostMap[card.gid]) {
|
||||
// 从"不失去能力"变为"失去能力"
|
||||
this.game.triggeringEffects.forEach(function (effect) {
|
||||
if (effect.source === card) {
|
||||
effect.disabled = true;
|
||||
}
|
||||
});
|
||||
this.game.effectManager.removeTriggeredEffectBySource(card);
|
||||
}
|
||||
},this);
|
||||
|
|
|
@ -65,6 +65,7 @@ Effect.prototype.triggerAndHandleAsyn = function (event) {
|
|||
};
|
||||
|
||||
Effect.prototype.checkCondition = function () {
|
||||
if (this.disabled) return false;
|
||||
// "结束这个回合",如<终结之洞>
|
||||
var game = this.effectManager.game;
|
||||
if (game.getData(game,'endThisTurn')) return false;
|
||||
|
|
Loading…
Reference in a new issue