* Return to hand - Fixed some cards that returned card also from graveyard but should only from battlefield.

This commit is contained in:
LevelX2 2014-11-13 17:25:19 +01:00
parent 41bc244433
commit ac07076c69
43 changed files with 144 additions and 43 deletions

View file

@ -54,8 +54,12 @@ public class CoastalDrake extends CardImpl {
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{U}"));
// {1}{U}, {T} : Return target Kavu to its owner's hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{U}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}

View file

@ -56,7 +56,7 @@ public class ArchwingDragon extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
this.addAbility(HasteAbility.getInstance());
// At the beginning of the end step, return Archwing Dragon to its owner's hand.
this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", new ReturnToHandSourceEffect(), false));
this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", new ReturnToHandSourceEffect(true), false));
}
public ArchwingDragon(final ArchwingDragon card) {

View file

@ -38,6 +38,7 @@ import mage.abilities.Ability;
import mage.abilities.common.DiesAttachedTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.effects.common.continious.BecomesCreatureAttachedEffect;
@ -80,7 +81,9 @@ public class GenjuOfTheCedars extends CardImpl {
this.addAbility(ability2);
// When enchanted Forest is put into a graveyard, you may return Genju of the Cedars from your graveyard to your hand.
Ability ability3 = new DiesAttachedTriggeredAbility(new ReturnToHandSourceEffect(), "enchanted Forest", true, false);
Effect effect = new ReturnToHandSourceEffect();
effect.setText("you may return {this} from your graveyard to your hand");
Ability ability3 = new DiesAttachedTriggeredAbility(effect , "enchanted Forest", true, false);
this.addAbility(ability3);
}

View file

@ -56,13 +56,19 @@ public class CageOfHands extends CardImpl {
this.expansionSetCode = "CHK";
this.subtype.add("Aura");
this.color.setWhite(true);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Neutral));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature can't attack or block.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CageOfHandsEffect()));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{W}")));
// {1}{W}: Return Cage of Hands to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{W}")));
}
public CageOfHands (final CageOfHands card) {

View file

@ -70,7 +70,7 @@ public class FieldOfReality extends CardImpl {
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new FieldOfRealityEvasionAbility(), AttachmentType.AURA )));
// {1}{U}: Return Field of Reality to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{U}")));
}
public FieldOfReality(final FieldOfReality card) {

View file

@ -62,8 +62,12 @@ public class NeurokProdigy extends CardImpl {
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new DiscardTargetCost(new TargetCardInHand(filter))));
// Discard an artifact card: Return Neurok Prodigy to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new DiscardTargetCost(new TargetCardInHand(filter))));
}
public NeurokProdigy(final NeurokProdigy card) {

View file

@ -68,7 +68,7 @@ public class Windreaver extends CardImpl {
// {U}: Switch Windreaver's power and toughness until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{U}")));
// {U}: Return Windreaver to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{U}")));
}
public Windreaver(final Windreaver card) {

View file

@ -59,7 +59,7 @@ public class Ephemeron extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Discard a card: Return Ephemeron to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new DiscardTargetCost(new TargetCardInHand())));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new DiscardTargetCost(new TargetCardInHand())));
}
public Ephemeron(final Ephemeron card) {

View file

@ -68,7 +68,7 @@ public class Suncrusher extends CardImpl {
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// {2}, Remove a +1/+1 counter from Suncrusher: Return Suncrusher to its owner's hand.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new GenericManaCost(2));
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new GenericManaCost(2));
ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)));
this.addAbility(ability);
}

View file

@ -69,7 +69,7 @@ public class Agoraphobia extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-5, 0)));
// {2}{U}: Return Agoraphobia to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{2}{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}")));
}
public Agoraphobia(final Agoraphobia card) {

View file

@ -60,7 +60,7 @@ public class CrystalSeer extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4)));
// {4}{U}: Return Crystal Seer to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{4}{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{4}{U}")));
}
public CrystalSeer (final CrystalSeer card) {

View file

@ -56,15 +56,22 @@ public class HypervoltGrasp extends CardImpl {
this.expansionSetCode = "GPT";
this.subtype.add("Aura");
this.color.setRed(true);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature has "Tap: This creature deals 1 damage to target creature or player."
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
gainedAbility.addTarget(new TargetCreatureOrPlayer());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{U}")));
// {1}{U}: Return Hypervolt Grasp to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{U}")));
}
public HypervoltGrasp(final HypervoltGrasp card) {

View file

@ -51,7 +51,8 @@ public class Petrahydrox extends CardImpl {
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.addAbility(new BecomesTargetTriggeredAbility(new ReturnToHandSourceEffect()));
// When Petrahydrox becomes the target of a spell or ability, return Petrahydrox to its owner's hand.
this.addAbility(new BecomesTargetTriggeredAbility(new ReturnToHandSourceEffect(true)));
}
public Petrahydrox(final Petrahydrox card) {

View file

@ -55,7 +55,7 @@ public class LanternSpirit extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// {U}: Return Lantern Spirit to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{U}")));
}
public LanternSpirit(final LanternSpirit card) {

View file

@ -29,16 +29,20 @@ package mage.sets.invasion;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CountersCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.BoostAllEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.KickerAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@ -48,6 +52,7 @@ import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
/**
*
@ -81,7 +86,7 @@ public class KangeeAerieKeeper extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// When Kangee, Aerie Keeper enters the battlefield, if it was kicked, put X feather counters on it.
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.FEATHER.createInstance(), new GetKickerXValue(), true));
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.FEATHER.createInstance(), new KangeeAerieKeeperGetKickerXValue(), true));
this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.getInstance(), "When {this} enters the battlefield, if it was kicked, put X feather counters on it."));
// Other Bird creatures get +1/+1 for each feather counter on Kangee, Aerie Keeper.
@ -97,3 +102,38 @@ public class KangeeAerieKeeper extends CardImpl {
return new KangeeAerieKeeper(this);
}
}
class KangeeAerieKeeperGetKickerXValue implements DynamicValue {
public KangeeAerieKeeperGetKickerXValue() {
}
@Override
public int calculate(Game game, Ability source, Effect effect) {
int count = 0;
Card card = game.getCard(source.getSourceId());
if (card != null) {
for (Ability ability: card.getAbilities()) {
if (ability instanceof KickerAbility) {
count += ((KickerAbility) ability).getXManaValue();
}
}
}
return count;
}
@Override
public KangeeAerieKeeperGetKickerXValue copy() {
return new KangeeAerieKeeperGetKickerXValue();
}
@Override
public String toString() {
return "X";
};
@Override
public String getMessage() {
return "X";
};
}

View file

@ -70,7 +70,7 @@ public class Shackles extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipEnchantedUntapEffect()));
// {W}: Return Shackles to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{W}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{W}")));
}
public Shackles(final Shackles card) {

View file

@ -64,7 +64,7 @@ public class SavageKnuckleblade extends CardImpl {
this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{2}{G}")));
// {2}{U}: Return Savage Knuckleblade to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{2}{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}")));
// {R}: Savage Knuckleblade gains haste until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}")));

View file

@ -60,8 +60,9 @@ public class WydwenTheBitingGale extends CardImpl {
this.toughness = new MageInt(3);
this.addAbility(FlashAbility.getInstance());
this.addAbility(FlyingAbility.getInstance());
// {U}{B}, Pay 1 life: Return Wydwen, the Biting Gale to its owner's hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{U}{B}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{U}{B}"));
ability.addCost(new PayLifeCost(1));
this.addAbility(ability);
}

View file

@ -53,7 +53,7 @@ public class DartingMerfolk extends CardImpl {
this.toughness = new MageInt(1);
// {U}: Return Darting Merfolk to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{U}")));
}
public DartingMerfolk(final DartingMerfolk card) {

View file

@ -32,6 +32,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.cards.CardImpl;
@ -47,10 +48,13 @@ public class SpineOfIshSah extends CardImpl {
super(ownerId, 136, "Spine of Ish Sah", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{7}");
this.expansionSetCode = "MBS";
// When Spine of Ish Sah enters the battlefield, destroy target permanent.
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
ability.addTarget(new TargetPermanent());
this.addAbility(ability);
this.addAbility(new DiesTriggeredAbility(new ReturnToHandSourceEffect()));
// When Spine of Ish Sah is put into a graveyard from the battlefield, return Spine of Ish Sah to its owner's hand
this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new ReturnToHandSourceEffect()));
}
public SpineOfIshSah(final SpineOfIshSah card) {

View file

@ -86,7 +86,7 @@ class ThopterAssemblyTriggeredAbility extends TriggeredAbilityImpl {
}
ThopterAssemblyTriggeredAbility() {
super(Zone.BATTLEFIELD, new ReturnToHandSourceEffect());
super(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true));
this.addEffect(new CreateTokenEffect(new ThopterToken(), 5));
}

View file

@ -67,7 +67,7 @@ public class ForcedWorship extends CardImpl {
// Enchanted creature can't attack.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackAttachedEffect(AttachmentType.AURA)));
// {2}{W}: Return Forced Worship to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{2}{W}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{W}")));
}
public ForcedWorship (final ForcedWorship card) {

View file

@ -58,13 +58,21 @@ public class GlisteningOil extends CardImpl {
this.expansionSetCode = "NPH";
this.subtype.add("Aura");
this.color.setBlack(true);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature has infect.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(InfectAbility.getInstance(), AttachmentType.AURA)));
// At the beginning of your upkeep, put a -1/-1 counter on enchanted creature.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GlisteningOilEffect(), TargetController.YOU, false));
// When Glistening Oil is put into a graveyard from the battlefield, return Glistening Oil to its owner's hand.
this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new ReturnToHandSourceEffect()));
}

View file

@ -54,7 +54,7 @@ public class BlinkingSpirit extends CardImpl {
this.toughness = new MageInt(2);
// {0}: Return Blinking Spirit to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new GenericManaCost(0)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new GenericManaCost(0)));
}
public BlinkingSpirit(final BlinkingSpirit card) {

View file

@ -60,7 +60,7 @@ public class Amugaba extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// {2}{U}, Discard a card: Return Amugaba to its owner's hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{2}{U}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}"));
ability.addCost(new DiscardTargetCost(new TargetCardInHand()));
this.addAbility(ability);
}

View file

@ -60,7 +60,7 @@ public class BalshanGriffin extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// {1}{U}, Discard a card: Return Balshan Griffin to its owner's hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{U}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{U}"));
ability.addCost(new DiscardTargetCost(new TargetCardInHand()));
this.addAbility(ability);
}

View file

@ -61,7 +61,7 @@ public class EscapeArtist extends CardImpl {
// Escape Artist is unblockable.
this.addAbility(new UnblockableAbility());
// {U}, Discard a card: Return Escape Artist to its owner's hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{U}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{U}"));
ability.addCost(new DiscardTargetCost(new TargetCardInHand()));
this.addAbility(ability);
}

View file

@ -73,7 +73,7 @@ public class CrovaxAscendantHero extends CardImpl {
// Nonwhite creatures get -1/-1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1, -1, Duration.WhileOnBattlefield, filter2, false)));
// Pay 2 life: Return Crovax, Ascendant Hero to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new PayLifeCost(2)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new PayLifeCost(2)));
}
public CrovaxAscendantHero(final CrovaxAscendantHero card) {

View file

@ -76,7 +76,7 @@ public class CavernHarpy extends CardImpl {
ability.addTarget(new TargetControlledCreaturePermanent(1,1,filter, false));
this.addAbility(ability);
// Pay 1 life: Return Cavern Harpy to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new PayLifeCost(1)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new PayLifeCost(1)));
}
public CavernHarpy(final CavernHarpy card) {

View file

@ -55,7 +55,7 @@ public class CyclopeanSnare extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(3));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent());
ability.addEffect(new ReturnToHandSourceEffect());
ability.addEffect(new ReturnToHandSourceEffect(true));
this.addAbility(ability);
}

View file

@ -76,7 +76,7 @@ public class ManaBloom extends CardImpl {
this.addAbility(ability);
// At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.
TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(), TargetController.YOU, false);
TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false);
this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0,0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand."));
}

View file

@ -57,7 +57,7 @@ public class HaruOnna extends CardImpl {
// When Haru-Onna enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
// Whenever you cast a Spirit or Arcane spell, you may return Haru-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), filter, true));
}
public HaruOnna(final HaruOnna card) {

View file

@ -61,7 +61,7 @@ public class KemuriOnna extends CardImpl {
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Kemuri-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), filter, true));
}
public KemuriOnna(final KemuriOnna card) {

View file

@ -61,7 +61,7 @@ public class KiriOnna extends CardImpl {
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Kiri-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), filter, true));
}
public KiriOnna(final KiriOnna card) {

View file

@ -61,7 +61,7 @@ public class NikkoOnna extends CardImpl {
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Nikko-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(), new FilterSpiritOrArcaneCard(), true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), new FilterSpiritOrArcaneCard(), true));
}
public NikkoOnna(final NikkoOnna card) {

View file

@ -51,7 +51,7 @@ public class OboroPalaceInTheClouds extends CardImpl {
// {tap}: Add {U} to your mana pool.
this.addAbility(new BlueManaAbility());
// {1}: Return Oboro, Palace in the Clouds to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new GenericManaCost(1)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new GenericManaCost(1)));
}
public OboroPalaceInTheClouds(final OboroPalaceInTheClouds card) {

View file

@ -68,7 +68,7 @@ public class YukiOnna extends CardImpl {
ability.addTarget(new TargetPermanent(filterTarget));
this.addAbility(ability);
// Whenever you cast a Spirit or Arcane spell, you may return Yuki-Onna to its owner's hand.
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(), filter, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), filter, true));
}
public YukiOnna(final YukiOnna card) {

View file

@ -33,6 +33,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
import mage.cards.CardImpl;
@ -59,7 +60,9 @@ public class HibernationSliver extends CardImpl {
this.toughness = new MageInt(2);
// All Slivers have "Pay 2 life: Return this permanent to its owner's hand."
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new PayLifeCost(2));
Effect effect = new ReturnToHandSourceEffect(true);
effect.setText("Return this permanent to its owner's hand");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new PayLifeCost(2));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterPermanent("Sliver", "All Slivers"), "All Slivers have \"Pay 2 life: Return this permanent to its owner's hand")));
}

View file

@ -48,17 +48,23 @@ import mage.target.common.TargetCreaturePermanent;
public class CrownOfFlames extends CardImpl {
public CrownOfFlames(UUID ownerId) {
super(ownerId, 169, "Crown of Flames", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}");
super(ownerId, 169, "Crown of Flames", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}");
this.expansionSetCode = "TMP";
this.subtype.add("Aura");
this.color.setRed(true);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// {R}: Enchanted creature gets +1/+0 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ColoredManaCost(ColoredManaSymbol.R)));
// {R}: Return Crown of Flames to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ColoredManaCost(ColoredManaSymbol.R)));
}
public CrownOfFlames(final CrownOfFlames card) {

View file

@ -54,8 +54,12 @@ public class SeleniaDarkAngel extends CardImpl {
this.color.setWhite(true);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new PayLifeCost(2)));
// Pay 2 life: Return Selenia, Dark Angel to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new PayLifeCost(2)));
}
public SeleniaDarkAngel(final SeleniaDarkAngel card) {

View file

@ -54,13 +54,19 @@ public class ShimmeringWings extends CardImpl {
this.expansionSetCode = "TMP";
this.subtype.add("Aura");
this.color.setBlue(true);
// Enchant creature (Target a creature as you cast this. This card enters the battlefield attached to that creature.)
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature has flying. (It can't be blocked except by creatures with flying or reach.)
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ColoredManaCost(ColoredManaSymbol.U)));
// {U}: Return Shimmering Wings to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ColoredManaCost(ColoredManaSymbol.U)));
}
public ShimmeringWings(final ShimmeringWings card) {

View file

@ -54,8 +54,12 @@ public class ArcanisTheOmnipotent extends CardImpl {
this.color.setBlue(true);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Tap: Draw three cards.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(3), new TapSourceCost()));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{2}{U}{U}")));
// {2}{U}{U}: Return Arcanis the Omnipotent to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}{U}")));
}
public ArcanisTheOmnipotent(final ArcanisTheOmnipotent card) {

View file

@ -62,7 +62,7 @@ public class ThawingGlaciers extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, Outcome.PutLandInPlay), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new ReturnToHandSourceEffect())));
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new ReturnToHandSourceEffect(true))));
this.addAbility(ability);
}