1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-10 17:00:08 -09:00

* Arcane Artisan - Fixed that the tokens were not exiled but destroyes (fixes ).

This commit is contained in:
LevelX2 2020-06-23 19:47:42 +02:00
parent de9ecd58bd
commit 324c2bdcf3

View file

@ -30,6 +30,7 @@ import mage.util.CardUtil;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import mage.cards.CardsImpl;
/** /**
* @author TheElk801 * @author TheElk801
@ -167,12 +168,10 @@ class ArcaneArtisanExileEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Object object = game.getState().getValue(CardUtil.getCardZoneString("_tokensCreated", source.getSourceId(), game, true)); Object object = game.getState().getValue(CardUtil.getCardZoneString("_tokensCreated", source.getSourceId(), game, true));
if (object != null) { if (object != null) {
Set<UUID> tokensCreated = (Set<UUID>) object; Player controller = game.getPlayer(source.getControllerId());
for (UUID tokenId : tokensCreated) { if (controller != null) {
Permanent token = game.getPermanent(tokenId); controller.moveCards(new CardsImpl((Set<UUID>) object), Zone.EXILED, source, game);
if (token != null) { return true;
token.destroy(source.getSourceId(), game, true);
}
} }
} }
return true; return true;