From bc47bb0e7d2520055de09c6d1637b53c85706990 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 10 Oct 2016 16:42:51 +0200 Subject: [PATCH] * Gonti, Lord of Luxury - Fixed the not working "look at the face down card" ability. --- Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java | 11 ++++++++--- Mage.Sets/src/mage/cards/i/IntetTheDreamer.java | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java index b60dbe490b8..04330dc7e29 100644 --- a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java +++ b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java @@ -34,6 +34,7 @@ import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughManaEffect; import mage.abilities.effects.ContinuousEffect; @@ -69,7 +70,7 @@ public class GontiLordOfLuxury extends CardImpl { protected static final String VALUE_PREFIX = "ExileZones"; public GontiLordOfLuxury(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.supertype.add("Legendary"); this.subtype.add("Aetherborn"); this.subtype.add("Rogue"); @@ -79,11 +80,13 @@ public class GontiLordOfLuxury extends CardImpl { // Deathtouch this.addAbility(DeathtouchAbility.getInstance()); - // When Gonti, Lord of Luxury enters the battlefield, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. For as long as that card remains exiled, you may look at it, you may cast it, and you may spend mana as though it were mana of any type to cast it. + // When Gonti, Lord of Luxury enters the battlefield, look at the top four cards of target opponent's library, exile one of them face down, + // then put the rest on the bottom of that library in a random order. For as long as that card remains exiled, + // you may look at it, you may cast it, and you may spend mana as though it were mana of any type to cast it. Ability ability = new EntersBattlefieldTriggeredAbility(new GontiLordOfLuxuryEffect()); ability.addTarget(new TargetOpponent()); this.addAbility(ability); - + this.addAbility(new SimpleStaticAbility(Zone.ALL, new GontiLordOfLuxuryLookEffect())); } public GontiLordOfLuxury(final GontiLordOfLuxury card) { @@ -130,6 +133,7 @@ class GontiLordOfLuxuryEffect extends OneShotEffect { card.setFaceDown(true, game); controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName()); card.setFaceDown(true, game); + @SuppressWarnings("unchecked") Set exileZones = (Set) game.getState().getValue(GontiLordOfLuxury.VALUE_PREFIX + source.getSourceId().toString()); if (exileZones == null) { exileZones = new HashSet<>(); @@ -145,6 +149,7 @@ class GontiLordOfLuxuryEffect extends OneShotEffect { effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); } + while (!topCards.isEmpty() && controller.isInGame()) { Card libCard = topCards.getRandom(game); topCards.remove(libCard); diff --git a/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java b/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java index a18fb478866..b6185063b05 100644 --- a/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java +++ b/Mage.Sets/src/mage/cards/i/IntetTheDreamer.java @@ -62,7 +62,7 @@ public class IntetTheDreamer extends CardImpl { protected static final String VALUE_PREFIX = "ExileZones"; public IntetTheDreamer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{R}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{R}{G}"); this.supertype.add("Legendary"); this.subtype.add("Dragon"); this.power = new MageInt(6); @@ -162,7 +162,7 @@ class IntetTheDreamerCastEffect extends AsThoughEffectImpl { if (zone != null && zone.contains(card.getId())/* && CardUtil.cardCanBePlayedNow(card, controller.getId(), game)*/) { if (card.getCardType().contains(CardType.LAND)) { if (game.canPlaySorcery(controller.getId()) && game.getPlayer(controller.getId()).canPlayLand()) { - return controller.chooseUse(outcome, "Play " + card.getName() + "?", source, game); + return controller.chooseUse(outcome, "Play " + card.getIdName() + "?", source, game); } } else { controller.setCastSourceIdWithAlternateMana(objectId, null, null);