Some minor changes/renames.

This commit is contained in:
LevelX2 2015-06-26 18:28:50 +02:00
parent fffbc526b1
commit f37761fbc1
48 changed files with 102 additions and 108 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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
// Wildfield Borderpost enters the battlefield tapped.

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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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));
ReturnToHandTargetCost cost = new ReturnToHandTargetCost(new TargetControlledPermanent(filter));
ReturnToHandTargetPermanentCost cost = new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledCreaturePermanent(filter))));
this.addAbility(new SpliceOntoArcaneAbility(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -98,7 +98,7 @@ class FloodtideSerpentReplacementEffect extends ReplacementEffectImpl {
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
if ( player != null ) {
ReturnToHandTargetCost attackCost = new ReturnToHandTargetCost(new TargetControlledPermanent(filter));
ReturnToHandTargetPermanentCost attackCost = new ReturnToHandTargetPermanentCost(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?", game) )
{

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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.keyword.FlyingAbility;
@ -65,7 +65,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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetCreaturePermanent(filterCreature));
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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -66,7 +66,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 ReturnToHandTargetCost(new TargetControlledPermanent(3, 3, filter, false)));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, filter, false)));
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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, filter, false)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false)));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false)));
ability.addTarget(new TargetSpell(filter));
this.addAbility(ability);
}

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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.mana.SimpleManaAbility;
@ -66,7 +66,7 @@ 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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter)))));
// {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()));

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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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

@ -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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
@ -67,7 +67,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 MasterTransmuterEffect(), new ManaCostsImpl("{U}"));
ability.addCost(new TapSourceCost());
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
ability.addCost(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
this.addAbility(ability);
}

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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.FlyingAbility;

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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(2,2, filter, true))));
this.addAbility(new MorphAbility(this, new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, filter, true)));
ability = new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter))),
new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true))));
new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true))));
}
public PearlLakeAncient(final PearlLakeAncient card) {

View file

@ -29,7 +29,7 @@ package mage.sets.lorwyn;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.costs.common.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl;
import mage.target.TargetSpell;
@ -48,7 +48,7 @@ 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 ReturnToHandTargetCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("creature"),false)));
this.getSpellAbility().addCost(new ReturnToHandTargetPermanentCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("creature"),false)));
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell());
}

View file

@ -29,7 +29,7 @@ package mage.sets.nemesis;
import java.util.UUID;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(filter))));
// Counter target spell unless its controller pays {1}.
this.getSpellAbility().addTarget(new TargetSpell());

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.newphyrexia;
import java.util.UUID;
@ -89,7 +88,7 @@ class NornsAnnexReplacementEffect extends ReplacementEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getControllerId()) ) {
if (event.getTargetId().equals(source.getControllerId())) {
return true;
}
// planeswalker
@ -98,14 +97,13 @@ class NornsAnnexReplacementEffect extends ReplacementEffectImpl {
&& permanent.getCardType().contains(CardType.PLANESWALKER);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
if (player != null) {
ManaCostsImpl propagandaTax = new ManaCostsImpl("{WP}");
if (propagandaTax.canPay(source, source.getSourceId(), event.getPlayerId(), game) &&
player.chooseUse(Outcome.Benefit, "Pay {WP} to declare attacker?", game)) {
if (propagandaTax.canPay(source, source.getSourceId(), event.getPlayerId(), game)
&& player.chooseUse(Outcome.Benefit, "Pay to declare attacker?", game)) {
if (propagandaTax.payOrRollback(source, game, source.getSourceId(), event.getPlayerId())) {
return false;
}
@ -115,7 +113,6 @@ class NornsAnnexReplacementEffect extends ReplacementEffectImpl {
return false;
}
@Override
public NornsAnnexReplacementEffect copy() {
return new NornsAnnexReplacementEffect(this);

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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"),true))));
this.addAbility(new KickerAbility(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)))));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
this.getSpellAbility().addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land"))));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
ability.addCost(new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filterForest)));
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ReturnToHandTargetPermanentCost(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.ReturnToHandTargetCost;
import mage.abilities.costs.common.ReturnToHandTargetPermanentCost;
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 ReturnToHandTargetCost(new TargetControlledPermanent(1, 1, filter, true))), TargetController.YOU, false));
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new ReturnToHandTargetPermanentCost(new TargetControlledPermanent(1, 1, filter, true))), TargetController.YOU, false));
}
public LivingTsunami(final LivingTsunami card) {

View file

@ -42,9 +42,9 @@ import mage.target.common.TargetControlledPermanent;
*
* @author BetaSteward_at_googlemail.com
*/
public class ReturnToHandTargetCost extends CostImpl {
public class ReturnToHandTargetPermanentCost extends CostImpl {
public ReturnToHandTargetCost(TargetControlledPermanent target) {
public ReturnToHandTargetPermanentCost(TargetControlledPermanent target) {
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 it's owner's hand").toString();
@ -53,7 +53,7 @@ public class ReturnToHandTargetCost extends CostImpl {
}
}
public ReturnToHandTargetCost(ReturnToHandTargetCost cost) {
public ReturnToHandTargetPermanentCost(ReturnToHandTargetPermanentCost cost) {
super(cost);
}
@ -80,8 +80,8 @@ public class ReturnToHandTargetCost extends CostImpl {
}
@Override
public ReturnToHandTargetCost copy() {
return new ReturnToHandTargetCost(this);
public ReturnToHandTargetPermanentCost copy() {
return new ReturnToHandTargetPermanentCost(this);
}

View file

@ -3,7 +3,6 @@ package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -11,12 +10,10 @@ import mage.game.permanent.Permanent;
* @author Loki
*/
public class SourcePermanentPowerCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
Permanent sourcePermanent = game.getPermanent(sourceAbility.getSourceId());
if (sourcePermanent == null) {
sourcePermanent = (Permanent) game.getLastKnownInformation(sourceAbility.getSourceId(), Zone.BATTLEFIELD);
}
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId());
if (sourcePermanent != null) {
return sourcePermanent.getPower().getValue();
}