mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 19:59:54 -08:00
Merge origin/master
This commit is contained in:
commit
7963e62e81
59 changed files with 598 additions and 239 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
129
Mage.Sets/src/mage/sets/apocalypse/UnnaturalSelection.java
Normal file
129
Mage.Sets/src/mage/sets/apocalypse/UnnaturalSelection.java
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesSubtypeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author EvilGeek
|
||||
*/
|
||||
public class UnnaturalSelection extends CardImpl {
|
||||
|
||||
public UnnaturalSelection(UUID ownerId) {
|
||||
super(ownerId, 32, "Unnatural Selection", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
this.expansionSetCode = "APC";
|
||||
|
||||
// {1}: Choose a creature type other than Wall. Target creature becomes that type until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UnnaturalSelectionEffect(), new GenericManaCost(1));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public UnnaturalSelection(final UnnaturalSelection card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnnaturalSelection copy() {
|
||||
return new UnnaturalSelection(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UnnaturalSelectionEffect extends OneShotEffect {
|
||||
|
||||
public UnnaturalSelectionEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "choose a creature type other than wall, target creature's type becomes that type until end of turn";
|
||||
}
|
||||
|
||||
public UnnaturalSelectionEffect(final UnnaturalSelectionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
String chosenType = "";
|
||||
if (player != null && permanent != null) {
|
||||
Choice typeChoice = new ChoiceImpl(true);
|
||||
typeChoice.setMessage("Choose creature type other than Wall");
|
||||
Set<String> types = CardRepository.instance.getCreatureTypes();
|
||||
types.remove("Wall");
|
||||
typeChoice.setChoices(types);
|
||||
while (!player.choose(Outcome.BoostCreature, typeChoice, game)) {
|
||||
if (!player.isInGame()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice());
|
||||
chosenType = typeChoice.getChoice();
|
||||
if (chosenType != null && !chosenType.isEmpty()) {
|
||||
// ADD TYPE TO TARGET
|
||||
ContinuousEffect effect = new BecomesSubtypeTargetEffect(Duration.EndOfTurn, chosenType);
|
||||
effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source)));
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effect copy() {
|
||||
return new UnnaturalSelectionEffect(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,15 +61,16 @@ public class FaithsFetters extends CardImpl {
|
|||
this.expansionSetCode = "DDC";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
|
||||
// Enchant permanent
|
||||
TargetPermanent auraTarget = new TargetPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainControl));
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.LoseAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// When Faith's Fetters enters the battlefield, you gain 4 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4)));
|
||||
|
||||
// Enchanted permanent can't attack or block, and its activated abilities can't be activated unless they're mana abilities.
|
||||
Effect effect = new CantAttackBlockAttachedEffect(AttachmentType.AURA);
|
||||
effect.setText("Enchanted permanent can't attack or block,");
|
||||
|
|
@ -108,12 +109,12 @@ class FaithsFettersEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ACTIVATE_ABILITY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
|
|
@ -127,4 +128,4 @@ class FaithsFettersEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
|
@ -76,7 +77,6 @@ public class NotionThief extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class NotionThiefReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
public NotionThiefReplacementEffect() {
|
||||
|
|
@ -106,21 +106,22 @@ class NotionThiefReplacementEffect extends ReplacementEffectImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DRAW_CARD;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||
if (game.getActivePlayerId().equals(event.getPlayerId())) {
|
||||
if (game.getActivePlayerId().equals(event.getPlayerId()) && game.getStep().getType().equals(PhaseStep.DRAW)) {
|
||||
CardsDrawnDuringDrawStepWatcher watcher = (CardsDrawnDuringDrawStepWatcher) game.getState().getWatchers().get("CardsDrawnDuringDrawStep");
|
||||
if (watcher != null && watcher.getAmountCardsDrawn(event.getPlayerId()) > 0) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
// not an opponents players draw step, always replace draw
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
/*
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
|
|
@ -70,7 +70,6 @@ public class ObzedatGhostCouncil extends CardImpl {
|
|||
this.subtype.add("Advisor");
|
||||
this.supertype.add("Legendary");
|
||||
|
||||
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
|
|
@ -95,7 +94,6 @@ public class ObzedatGhostCouncil extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class ObzedatGhostCouncilExileSourceEffect extends OneShotEffect {
|
||||
|
||||
public ObzedatGhostCouncilExileSourceEffect() {
|
||||
|
|
@ -116,7 +114,7 @@ class ObzedatGhostCouncilExileSourceEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
return permanent.moveToExile(source.getSourceId(),permanent.getName(), source.getSourceId(), game);
|
||||
return permanent.moveToExile(source.getSourceId(), permanent.getName(), source.getSourceId(), game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -180,7 +178,7 @@ class ObzedatGhostCouncilReturnEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
ExileZone currentZone = game.getState().getExile().getExileZone(source.getSourceId());
|
||||
// return it only from the own exile zone
|
||||
if (currentZone.size() > 0) {
|
||||
if (currentZone != null && currentZone.size() > 0) {
|
||||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
if (owner != null && owner.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId())) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,18 +25,16 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.mirrodinbesieged;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -48,14 +46,15 @@ import mage.game.permanent.token.Token;
|
|||
*/
|
||||
public class PhyrexianRebirth extends CardImpl {
|
||||
|
||||
public PhyrexianRebirth (UUID ownerId) {
|
||||
public PhyrexianRebirth(UUID ownerId) {
|
||||
super(ownerId, 15, "Phyrexian Rebirth", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{W}{W}");
|
||||
this.expansionSetCode = "MBS";
|
||||
|
||||
// Destroy all creatures, then put an X/X colorless Horror artifact creature token onto the battlefield, where X is the number of creatures destroyed this way.
|
||||
this.getSpellAbility().addEffect(new PhyrexianRebirthEffect());
|
||||
}
|
||||
|
||||
public PhyrexianRebirth (final PhyrexianRebirth card) {
|
||||
public PhyrexianRebirth(final PhyrexianRebirth card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +77,7 @@ public class PhyrexianRebirth extends CardImpl {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int count = 0;
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
|
||||
count += permanent.destroy(source.getSourceId(), game, false) ? 1 : 0;
|
||||
}
|
||||
HorrorToken horrorToken = new HorrorToken();
|
||||
|
|
@ -95,14 +94,15 @@ public class PhyrexianRebirth extends CardImpl {
|
|||
|
||||
}
|
||||
|
||||
class HorrorToken extends Token {
|
||||
public HorrorToken() {
|
||||
super("Horror", "X/X colorless Horror artifact creature token");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Horror");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
class HorrorToken extends Token {
|
||||
|
||||
public HorrorToken() {
|
||||
super("Horror", "X/X colorless Horror artifact creature token");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Horror");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -52,7 +51,7 @@ public class NornsAnnex extends CardImpl {
|
|||
public NornsAnnex(UUID ownerId) {
|
||||
super(ownerId, 17, "Norn's Annex", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}{WP}{WP}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
|
||||
// {WP} ({WP} can be paid with either or 2 life.)
|
||||
// Creatures can't attack you or a planeswalker you control unless their controller pays for each of those creatures.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NornsAnnexReplacementEffect()));
|
||||
|
|
@ -81,15 +80,15 @@ class NornsAnnexReplacementEffect extends ReplacementEffectImpl {
|
|||
NornsAnnexReplacementEffect(NornsAnnexReplacementEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DECLARE_ATTACKER;
|
||||
}
|
||||
|
||||
|
||||
@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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
// Kicker—Return 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(
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue