* Fixed a problem that triggered abilities of created tokens were not removed properly if the token left has left the battlefield.

This commit is contained in:
LevelX2 2015-07-12 11:08:33 +02:00
parent 6f2a7f8c73
commit 4094fe5ecf
3 changed files with 82 additions and 2 deletions

View file

@ -116,6 +116,7 @@ import mage.game.events.ZoneChangeGroupEvent;
import mage.game.match.MatchPlayer;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.game.permanent.PermanentToken;
import mage.game.stack.Spell;
import mage.game.stack.StackAbility;
import mage.game.stack.StackObject;
@ -812,6 +813,9 @@ public abstract class PlayerImpl implements Player, Serializable {
pairedCard.clearPairedCard();
}
}
if (permanent instanceof PermanentToken) {
game.getState().getTriggers().removeAbilitiesOfSource(permanent.getId());
}
return true;
}