* Fixed a lot of cards with return permanent to hand costs, where the selection of the permanent was handled targeted.

This commit is contained in:
LevelX2 2015-09-25 22:32:53 +02:00
parent 28b575cf37
commit 85cec315db
50 changed files with 122 additions and 129 deletions

View file

@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.mana.BlueManaAbility;
import mage.abilities.mana.WhiteManaAbility;
@ -64,7 +64,7 @@ public class FieldmistBorderpost extends CardImpl {
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Fieldmist Borderpost's mana cost.
Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
// Fieldmist Borderpost enters the battlefield tapped.

View file

@ -32,7 +32,7 @@ import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
@ -64,7 +64,7 @@ public class FirewildBorderpost extends CardImpl {
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Firewild Borderpost's mana cost.
Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
// Veinfire Firewild enters the battlefield tapped.

View file

@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
@ -64,7 +64,7 @@ public class MistveinBorderpost extends CardImpl {
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Mistvein Borderpost's mana cost.
Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
// Mistvein Borderpost enters the battlefield tapped.

View file

@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.RedManaAbility;
@ -64,7 +64,7 @@ public class VeinfireBorderpost extends CardImpl {
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Veinfire Borderpost's mana cost.
Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
// Veinfire Borderpost enters the battlefield tapped.

View file

@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.WhiteManaAbility;
@ -64,7 +64,7 @@ public class WildfieldBorderpost extends CardImpl {
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Wildfield Borderpost's mana cost.
Ability ability = new AlternativeCostSourceAbility(new GenericManaCost(1));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
// Wildfield Borderpost enters the battlefield tapped.

View file

@ -30,7 +30,7 @@ package mage.sets.battleforzendikar;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
@ -57,7 +57,7 @@ public class SlabHammer extends CardImpl {
// Whenever equipped creature attacks, you may return a land you control to its owner's hand. If you do, the creature gets +2/+2 until end of turn.
Ability ability = new AttacksAttachedTriggeredAbility(
new DoIfCostPaid(new BoostEquippedEffect(2, 2, Duration.EndOfTurn),
new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent())),
new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent())),
"Return a land you control to its owner's hand? (giving +2/+2 to the equipped creature)"));
this.addAbility(ability);

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -64,7 +64,7 @@ public class Floodbringer extends CardImpl {
// {2}, Return a land you control to its owner's hand: Tap target land.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(2));
ReturnToHandTargetPermanentCost cost = new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter));
ReturnToHandChosenControlledPermanentCost cost = new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter));
cost.setText("Return a land you control to its owner's hand");
ability.addCost(cost);
ability.addTarget(new TargetLandPermanent());

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -66,7 +66,7 @@ public class SoratamiMindsweeper extends CardImpl {
// {2}, Return a land you control to its owner's hand: Target player puts the top two cards of his or her library into his or her graveyard.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new PutLibraryIntoGraveTargetEffect(2), new ManaCostsImpl("{2}"));
ability.addTarget(new TargetPlayer());
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
}

View file

@ -29,7 +29,7 @@ package mage.sets.betrayersofkamigawa;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
@ -71,7 +71,7 @@ public class VeilOfSecrecy extends CardImpl {
this.getSpellAbility().addEffect(effect);
// Splice onto Arcane-Return a blue creature you control to its owner's hand.
this.addAbility(new SpliceOntoArcaneAbility(new ReturnToHandTargetPermanentCost(new TargetControlledCreaturePermanent(filter))));
this.addAbility(new SpliceOntoArcaneAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent(filter))));
}
public VeilOfSecrecy(final VeilOfSecrecy card) {

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.PayCostToAttackBlockEffectImpl;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.combat.CantAttackBlockUnlessPaysSourceEffect;
@ -71,7 +71,7 @@ public class FloodtideSerpent extends CardImpl {
// Floodtide Serpent can't attack unless you return an enchantment you control to its owner's hand <i>(This cost is paid as attackers are declared.)</i>
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockUnlessPaysSourceEffect(
new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)), PayCostToAttackBlockEffectImpl.RestrictType.ATTACK)));
new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)), PayCostToAttackBlockEffectImpl.RestrictType.ATTACK)));
}
@ -106,7 +106,7 @@ class FloodtideSerpentReplacementEffect extends ReplacementEffectImpl {
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
if (player != null) {
ReturnToHandTargetPermanentCost attackCost = new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter));
ReturnToHandChosenControlledPermanentCost attackCost = new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter));
if (attackCost.canPay(source, source.getSourceId(), event.getPlayerId(), game)
&& player.chooseUse(Outcome.Neutral, "Return an enchantment you control to hand to attack?", source, game)) {
if (attackCost.pay(source, game, source.getSourceId(), event.getPlayerId(), true)) {

View file

@ -35,7 +35,7 @@ import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlyingAbility;
@ -66,7 +66,7 @@ public class MelokuTheCloudedMirror extends CardImpl {
// {1}, Return a land you control to its owner's hand: Put a 1/1 blue Illusion creature token with flying onto the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new MelokuTheCloudedMirrorToken(), 1), new GenericManaCost(1));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
}

View file

@ -25,21 +25,20 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.championsofkamigawa;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetControlledPermanent;
@ -65,7 +64,7 @@ public class SoratamiCloudskater extends CardImpl {
// {2}, Return a land you control to its owner's hand: Draw a card, then discard a card.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new GenericManaCost(2));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(1, 1, filter, true)));
this.addAbility(ability);
}

View file

@ -35,7 +35,7 @@ import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -74,7 +74,7 @@ public class SoratamiMirrorGuard extends CardImpl {
// {2}, Return a land you control to its owner's hand: Target creature with power 2 or less can't be blocked this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new GenericManaCost(2));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetCreaturePermanent(filterCreature));
this.addAbility(ability);
}

View file

@ -25,21 +25,20 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.championsofkamigawa;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetControlledPermanent;
@ -66,7 +65,7 @@ public class SoratamiMirrorMage extends CardImpl {
// {3}, Return three lands you control to their owner's hand: Return target creature to its owner's hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(3));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, filter, false)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(3, 3, filter, true)));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -35,7 +35,7 @@ import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -69,7 +69,7 @@ public class SoratamiRainshaper extends CardImpl {
// {3}, Return a land you control to its owner's hand: Target creature you control gains shroud until end of turn. (It can't be the target of spells or abilities.)
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(ShroudAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(3));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}

View file

@ -35,7 +35,7 @@ import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.keyword.FlyingAbility;
@ -67,7 +67,7 @@ public class SoratamiSavant extends CardImpl {
// {3}, Return a land you control to its owner's hand: Counter target spell unless its controller pays {3}.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(3)), new GenericManaCost(3));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetSpell());
this.addAbility(ability);
}

View file

@ -36,7 +36,7 @@ import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
@ -70,7 +70,7 @@ public class SoratamiSeer extends CardImpl {
// {4}, Return two lands you control to their owner's hand: Discard all the cards in your hand, then draw that many cards.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoratamiSeerEffect(), new GenericManaCost(4));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2, 2, filter, false)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, filter, false)));
this.addAbility(ability);
}

View file

@ -34,7 +34,7 @@ import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.keyword.FlyingAbility;
@ -75,7 +75,7 @@ public class UyoSilentProphet extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// {2}, Return two lands you control to their owner's hand: Copy target instant or sorcery spell. You may choose new targets for the copy.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new GenericManaCost(2));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false)));
ability.addTarget(new TargetSpell(filter));
this.addAbility(ability);
}

View file

@ -32,14 +32,14 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
@ -60,8 +60,8 @@ public class Stonecloaker extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Stonecloaker enters the battlefield, return a creature you control to its owner's hand.
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
ability.addTarget(new TargetControlledCreaturePermanent());
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(new FilterControlledCreaturePermanent()), true);
this.addAbility(ability);
// When Stonecloaker enters the battlefield, exile target card from a graveyard.
ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), false);

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.Mana;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.SimpleManaAbility;
@ -66,7 +66,7 @@ public class CoralAtoll extends CardImpl {
// Coral Atoll enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// When Coral Atoll enters the battlefield, sacrifice it unless you return an untapped Island you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {1}{U} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 0, 1,0 ), new TapSourceCost()));

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.Mana;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.SimpleManaAbility;
@ -66,7 +66,7 @@ public class DormantVolcano extends CardImpl {
this.addAbility(new EntersBattlefieldTappedAbility());
// When Dormant Volcano enters the battlefield, sacrifice it unless you return an untapped Mountain you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {1}{R} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 0, 1,0 ), new TapSourceCost()));

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.Mana;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.SimpleManaAbility;
@ -53,7 +53,7 @@ public class Everglades extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an untapped Swamp");
static{
static {
filter.add(new SubtypePredicate("Swamp"));
filter.add(Predicates.not(new TappedPredicate()));
}
@ -66,10 +66,10 @@ public class Everglades extends CardImpl {
this.addAbility(new EntersBattlefieldTappedAbility());
// When Everglades enters the battlefield, sacrifice it unless you return an untapped Swamp you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(1, 1, filter, true)))));
// {tap}: Add {1}{B} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 1, 1,0 ), new TapSourceCost()));
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 0, 1, 1, 0), new TapSourceCost()));
}

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.Mana;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.SimpleManaAbility;
@ -66,7 +66,7 @@ public class JungleBasin extends CardImpl {
this.addAbility(new EntersBattlefieldTappedAbility());
// When Jungle Basin enters the battlefield, sacrifice it unless you return an untapped Forest you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {1}{G} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 0, 1,0 ), new TapSourceCost()));

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.Mana;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.SimpleManaAbility;
@ -66,7 +66,7 @@ public class Karoo extends CardImpl {
this.addAbility(new EntersBattlefieldTappedAbility());
// When Karoo enters the battlefield, sacrifice it unless you return an untapped Plains you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {1}{W} to your mana pool.
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 0, 1,0 ), new TapSourceCost()));

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect;
@ -61,7 +61,7 @@ public class MasterTransmuter extends CardImpl {
// {U}, {tap}, Return an artifact you control to its owner's hand: You may put an artifact card from your hand onto the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutPermanentOnBattlefieldEffect(new FilterArtifactCard("an artifact card")), new ManaCostsImpl("{U}"));
ability.addCost(new TapSourceCost());
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
this.addAbility(ability);
}

View file

@ -30,7 +30,7 @@ package mage.sets.jacevschandra;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl;
@ -60,7 +60,7 @@ public class FathomSeer extends CardImpl {
this.toughness = new MageInt(3);
// Morph-Return two Islands you control to their owner's hand.
this.addAbility(new MorphAbility(this, new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2,2, filter, true))));
this.addAbility(new MorphAbility(this, new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2,2, filter, true))));
// When Fathom Seer is turned face up, draw two cards.
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new DrawCardSourceControllerEffect(2)));
}

View file

@ -29,7 +29,7 @@ package mage.sets.jacevschandra;
import java.util.UUID;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -55,7 +55,7 @@ public class Gush extends CardImpl {
// You may return two Islands you control to their owner's hand rather than pay Gush's mana cost.
AlternativeCostSourceAbility ability;
ability = new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2, 2, filter, true)));
ability = new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, filter, true)));
this.addAbility(ability);
// Draw two cards.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));

View file

@ -30,7 +30,7 @@ package mage.sets.jacevschandra;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@ -67,7 +67,7 @@ public class WaterspoutDjinn extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// At the beginning of your upkeep, sacrifice Waterspout Djinn unless you return an untapped Island you control to its owner's hand.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))),
new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))),
TargetController.YOU, false));
}

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.CantBeCounteredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.ProwessAbility;
@ -67,7 +67,7 @@ public class PearlLakeAncient extends CardImpl {
// Return three lands you control to their owner's hand: Return Pearl Lake Ancient to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true),
new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true))));
new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true))));
}
public PearlLakeAncient(final PearlLakeAncient card) {

View file

@ -27,17 +27,16 @@
*/
package mage.sets.lorwyn;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import java.util.UUID;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.target.TargetSpell;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.common.FilterControlledCreaturePermanent;
/**
*
* @author Loki
@ -48,7 +47,10 @@ public class FamiliarsRuse extends CardImpl {
super(ownerId, 64, "Familiar's Ruse", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{U}{U}");
this.expansionSetCode = "LRW";
this.getSpellAbility().addCost(new ReturnToHandTargetPermanentCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("creature"),false)));
// As an additional cost to cast Familiar's Ruse, return a creature you control to its owner's hand.
this.getSpellAbility().addCost(new ReturnToHandChosenControlledPermanentCost(
new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("creature"), true)));
// Counter target spell.
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell());
}

View file

@ -28,22 +28,14 @@
package mage.sets.magic2013;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*

View file

@ -29,7 +29,7 @@ package mage.sets.mercadianmasques;
import java.util.UUID;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -54,7 +54,7 @@ public class Thwart extends CardImpl {
// You may return three Islands you control to their owner's hand rather than pay Thwart's mana cost.
AlternativeCostSourceAbility ability;
ability = new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, filter, true)));
ability = new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(3, 3, filter, true)));
this.addAbility(ability);
// Counter target spell.

View file

@ -29,7 +29,7 @@ package mage.sets.mercadianmasques;
import java.util.UUID;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.MayTapOrUntapTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -58,7 +58,7 @@ public class TidalBore extends CardImpl {
this.expansionSetCode = "MMQ";
// You may return an Island you control to its owner's hand rather than pay Tidal Bore's mana cost.
this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))));
// You may tap or untap target creature.
this.getSpellAbility().addEffect(new MayTapOrUntapTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());

View file

@ -29,7 +29,7 @@ package mage.sets.nemesis;
import java.util.UUID;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.cards.CardImpl;
@ -60,7 +60,7 @@ public class Daze extends CardImpl {
// You may return an Island you control to its owner's hand rather than pay Daze's mana cost.
this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))));
// Counter target spell unless its controller pays {1}.
this.getSpellAbility().addTarget(new TargetSpell());

View file

@ -33,7 +33,7 @@ import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl;
@ -56,7 +56,7 @@ public class ArcticMerfolk extends CardImpl {
this.toughness = new MageInt(1);
// KickerReturn a creature you control to its owner's hand. (You may return a creature you control to its owner's hand in addition to any other costs as you cast this spell.)
this.addAbility(new KickerAbility(new ReturnToHandTargetPermanentCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"),true))));
this.addAbility(new KickerAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"),true))));
// If Arctic Merfolk was kicked, it enters the battlefield with a +1/+1 counter on it.
this.addAbility(new EntersBattlefieldAbility(

View file

@ -29,7 +29,7 @@ package mage.sets.planeshift;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
@ -59,7 +59,7 @@ public class CrosissCatacombs extends CardImpl {
this.subtype.add("Lair");
// When Crosis's Catacombs enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {U}, {B}, or {R} to your mana pool.
this.addAbility(new BlueManaAbility());
this.addAbility(new BlackManaAbility());

View file

@ -29,7 +29,7 @@ package mage.sets.planeshift;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.GreenManaAbility;
@ -59,7 +59,7 @@ public class DarigaazsCaldera extends CardImpl {
this.subtype.add("Lair");
// When Darigaaz's Caldera enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {B}, {R}, or {G} to your mana pool.
this.addAbility(new BlackManaAbility());
this.addAbility(new RedManaAbility());

View file

@ -29,7 +29,7 @@ package mage.sets.planeshift;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
@ -58,7 +58,7 @@ public class DromarsCavern extends CardImpl {
this.subtype.add("Lair");
// When Dromar's Cavern enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {W}, {U}, or {B} to your mana pool.
this.addAbility(new WhiteManaAbility());
this.addAbility(new BlueManaAbility());

View file

@ -29,7 +29,7 @@ package mage.sets.planeshift;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
@ -59,7 +59,7 @@ public class RithsGrove extends CardImpl {
this.subtype.add("Lair");
// When Rith's Grove enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {R}, {G}, or {W} to your mana pool.
this.addAbility(new RedManaAbility());
this.addAbility(new GreenManaAbility());

View file

@ -29,7 +29,7 @@ package mage.sets.planeshift;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.BlueManaAbility;
import mage.abilities.mana.GreenManaAbility;
@ -59,7 +59,7 @@ public class TrevasRuins extends CardImpl {
this.subtype.add("Lair");
// When Treva's Ruins enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)))));
// {tap}: Add {G}, {W}, or {U} to your mana pool.
this.addAbility(new GreenManaAbility());
this.addAbility(new WhiteManaAbility());

View file

@ -31,7 +31,7 @@ package mage.sets.riseoftheeldrazi;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledLandPermanent;
@ -52,7 +52,7 @@ public class Deprive extends CardImpl {
this.expansionSetCode = "ROE";
// As an additional cost to cast Deprive, return a land you control to its owner's hand.
this.getSpellAbility().addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
this.getSpellAbility().addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
// Counter target spell.
this.getSpellAbility().addTarget(new TargetSpell());

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -63,7 +63,7 @@ public class MoonbowIllusionist extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// {2}, Return a land you control to its owner's hand: Target land becomes the basic land type of your choice until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new GenericManaCost(2));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land"))));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land"))));
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);

View file

@ -34,7 +34,7 @@ import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -66,7 +66,7 @@ public class OboroBreezecaller extends CardImpl {
// {2}, Return a land you control to its owner's hand: Untap target land.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
@ -68,7 +68,7 @@ public class OboroEnvoy extends CardImpl {
Effect effect = new BoostTargetEffect(new SignInversionDynamicValue(new CardsInControllerHandCount()), new StaticValue(-0), Duration.EndOfTurn);
effect.setText("Target creature gets -X/-0 until end of turn, where X is the number of cards in your hand");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -32,7 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
@ -70,7 +70,7 @@ public class SoramaroFirstToDream extends CardImpl {
// {4}, Return a land you control to its owner's hand: Draw a card.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new DrawCardSourceControllerEffect(1), new GenericManaCost(4));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
this.addAbility(ability);
}

View file

@ -34,7 +34,7 @@ import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent;
@ -63,7 +63,7 @@ public class WirewoodSymbiote extends CardImpl {
this.toughness = new MageInt(1);
// Return an Elf you control to its owner's hand: Untap target creature. Activate this ability only once each turn.
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -32,7 +32,7 @@ import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility;
@ -76,7 +76,7 @@ public class ScrybRanger extends CardImpl {
// protection from blue
this.addAbility(new ProtectionAbility(filter));
// Return a Forest you control to its owner's hand: Untap target creature. Activate this ability only once each turn.
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filterForest)));
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filterForest)));
ability.addTarget(new TargetCreaturePermanent(1));
this.addAbility(ability);
}

View file

@ -34,7 +34,7 @@ import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent;
@ -63,7 +63,7 @@ public class QuirionRanger extends CardImpl {
this.toughness = new MageInt(1);
// Return a Forest you control to its owner's hand: Untap target creature. Activate this ability only once each turn.
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -34,7 +34,7 @@ import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@ -67,7 +67,7 @@ public class LivingTsunami extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// At the beginning of your upkeep, sacrifice Living Tsunami unless you return a land you control to its owner's hand.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(1, 1, filter, true))), TargetController.YOU, false));
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(1, 1, filter, true))), TargetController.YOU, false));
}
public LivingTsunami(final LivingTsunami card) {

View file

@ -40,9 +40,10 @@ import mage.target.common.TargetControlledPermanent;
*
* @author BetaSteward_at_googlemail.com
*/
public class ReturnToHandTargetPermanentCost extends CostImpl {
public class ReturnToHandChosenControlledPermanentCost extends CostImpl {
public ReturnToHandTargetPermanentCost(TargetControlledPermanent target) {
public ReturnToHandChosenControlledPermanentCost(TargetControlledPermanent target) {
target.setNotTarget(true);
this.addTarget(target);
if (target.getMaxNumberOfTargets() > 1 && target.getMaxNumberOfTargets() == target.getNumberOfTargets()) {
this.text = new StringBuilder("return ").append(target.getMaxNumberOfTargets()).append(" ").append(target.getTargetName()).append(" you control to its owner's hand").toString();
@ -51,7 +52,7 @@ public class ReturnToHandTargetPermanentCost extends CostImpl {
}
}
public ReturnToHandTargetPermanentCost(ReturnToHandTargetPermanentCost cost) {
public ReturnToHandChosenControlledPermanentCost(ReturnToHandChosenControlledPermanentCost cost) {
super(cost);
}
@ -78,8 +79,8 @@ public class ReturnToHandTargetPermanentCost extends CostImpl {
}
@Override
public ReturnToHandTargetPermanentCost copy() {
return new ReturnToHandTargetPermanentCost(this);
public ReturnToHandChosenControlledPermanentCost copy() {
return new ReturnToHandChosenControlledPermanentCost(this);
}
}