- Fixed Karn Liberated.

This commit is contained in:
Jeff 2017-04-06 11:41:51 -05:00
parent 8072e79571
commit f43a15ab22

View file

@ -57,7 +57,6 @@ import mage.game.permanent.PermanentImpl;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
import mage.util.CardUtil;
/**
*
@ -68,7 +67,7 @@ public class KarnLiberated extends CardImpl {
private UUID exileId = UUID.randomUUID();
public KarnLiberated(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{7}");
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{7}");
this.subtype.add("Karn");
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(6));
@ -221,13 +220,19 @@ class KarnLiberatedDelayedEffect extends OneShotEffect {
// since the beginning of the first turn. They can attack and their activated abilities with {T} in the cost can be activated.
Cards cards = new CardsImpl(); // needed because putOntoTheBattlefield removes from exile
cards.addAll(exile);
controller.moveCards(cards, Zone.BATTLEFIELD, source, game);
for (Card card : cards.getCards(game)) {
Permanent permanent = game.getPermanent(card.getId());
((PermanentImpl) permanent).removeSummoningSickness();
if (!cards.isEmpty()) {
controller.moveCards(cards, Zone.BATTLEFIELD, source, game);
for (Card card : cards.getCards(game)) {
if (card != null) {
Permanent permanent = game.getPermanent(card.getId());
if (permanent != null) {
((PermanentImpl) permanent).removeSummoningSickness();
}
}
}
}
return true;
}
return true;
}
return false;
}