diff --git a/Mage.Sets/src/mage/cards/g/GetLost.java b/Mage.Sets/src/mage/cards/g/GetLost.java new file mode 100644 index 00000000000..35333bd2e07 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GetLost.java @@ -0,0 +1,47 @@ +package mage.cards.g; + +import mage.abilities.effects.common.CreateTokenControllerTargetPermanentEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.MapToken; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class GetLost extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("creature, enchantment, or planeswalker"); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.ENCHANTMENT.getPredicate(), + CardType.PLANESWALKER.getPredicate() + )); + } + + public GetLost(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); + + // Destroy target creature, enchantment, or planeswalker. Its controller creates two Map tokens. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenControllerTargetPermanentEffect(new MapToken(), 2, false)); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + private GetLost(final GetLost card) { + super(card); + } + + @Override + public GetLost copy() { + return new GetLost(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java b/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java index 73120fde79a..e16432bdc82 100644 --- a/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java @@ -35,6 +35,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Dinotomaton", 144, Rarity.COMMON, mage.cards.d.Dinotomaton.class)); cards.add(new SetCardInfo("Forest", 401, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Geological Appraiser", 150, Rarity.UNCOMMON, mage.cards.g.GeologicalAppraiser.class)); + cards.add(new SetCardInfo("Get Lost", 14, Rarity.RARE, mage.cards.g.GetLost.class)); cards.add(new SetCardInfo("Ghalta, Stampede Tyrant", 185, Rarity.MYTHIC, mage.cards.g.GhaltaStampedeTyrant.class)); cards.add(new SetCardInfo("Gishath, Sun's Avatar", 229, Rarity.MYTHIC, mage.cards.g.GishathSunsAvatar.class)); cards.add(new SetCardInfo("Goldfury Strider", 152, Rarity.UNCOMMON, mage.cards.g.GoldfuryStrider.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenControllerTargetPermanentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenControllerTargetPermanentEffect.java index d0ab7573f25..1aa42c8411d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenControllerTargetPermanentEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenControllerTargetPermanentEffect.java @@ -13,7 +13,7 @@ import mage.util.CardUtil; /** * @author Susucr - * + *

* Have the Controller of target permanent (or LKI controller) create Tokens. */ public class CreateTokenControllerTargetPermanentEffect extends OneShotEffect { @@ -51,9 +51,9 @@ public class CreateTokenControllerTargetPermanentEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent creature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source); - if (creature != null) { - Player controllerOfTarget = game.getPlayer(creature.getControllerId()); + Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source); + if (permanent != null) { + Player controllerOfTarget = game.getPlayer(permanent.getControllerId()); if (controllerOfTarget != null) { int value = amount.calculate(game, source, this); return token.putOntoBattlefield(value, game, source, controllerOfTarget.getId(), tapped, false);