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 #6710).
This commit is contained in:
parent
de9ecd58bd
commit
324c2bdcf3
1 changed files with 5 additions and 6 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue