forked from External/mage
* Fixed Brood Of Cockroaches text
This commit is contained in:
parent
207e95e001
commit
0670c401e0
19 changed files with 103 additions and 114 deletions
|
|
@ -51,7 +51,7 @@ public final class BroodOfCockroaches extends CardImpl {
|
|||
}
|
||||
|
||||
class BroodOfCockroachesEffect extends OneShotEffect {
|
||||
private static final String effectText = "at the beginning of the next end step, you lose 1 life and return Brood of Cockroaches to your hand.";
|
||||
private static final String effectText = "at the beginning of the next end step, you lose 1 life and return {this} to your hand.";
|
||||
|
||||
BroodOfCockroachesEffect() {
|
||||
super(Benefit);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -11,33 +9,31 @@ import mage.abilities.effects.common.combat.CantAttackAttachedEffect;
|
|||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Backfir3
|
||||
*/
|
||||
public final class Cessation extends CardImpl {
|
||||
|
||||
public Cessation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
|
||||
//Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
//Enchanted creature can't attack.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackAttachedEffect(AttachmentType.AURA)));
|
||||
|
||||
//When Cessation is put into a graveyard from the battlefield, return Cessation to its owner's hand.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ChimeOfNight extends CardImpl {
|
||||
|
|
@ -43,7 +43,7 @@ public final class ChimeOfNight extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// When Chime of Night is put into a graveyard from the battlefield, destroy target nonblack creature.
|
||||
ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DestroyTargetEffect());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
|
|
@ -34,8 +30,12 @@ import mage.target.common.TargetLandPermanent;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MTGfan
|
||||
*/
|
||||
public final class CyclopeanTomb extends CardImpl {
|
||||
|
|
@ -55,6 +55,7 @@ public final class CyclopeanTomb extends CardImpl {
|
|||
ability.addTarget(new TargetLandPermanent(filter));
|
||||
ability.addEffect(new BecomeSwampEffect(Duration.Custom, false, true, SubType.SWAMP));
|
||||
this.addAbility(ability, new CyclopeanTombCounterWatcher());
|
||||
|
||||
// When Cyclopean Tomb is put into a graveyard from the battlefield, at the beginning of each of your upkeeps for the rest of the game, remove all mire counters from a land that a mire counter was put onto with Cyclopean Tomb but that a mire counter has not been removed from with Cyclopean Tomb.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CyclopeanTombCreateTriggeredEffect()));
|
||||
}
|
||||
|
|
@ -168,8 +169,8 @@ class CyclopeanTombEffect extends OneShotEffect {
|
|||
filter.add(Predicates.or(idPref));
|
||||
TargetLandPermanent target = new TargetLandPermanent(1, 1, filter, true);
|
||||
/*Player must choose a land each upkeep. Using the message are above the player hand where frequent interactions
|
||||
* take place is the most logical way to prompt for this scenario. A new constructor added to provide a not optional
|
||||
* option for any cards like this where the player must choose a target in such the way this card requires.
|
||||
* take place is the most logical way to prompt for this scenario. A new constructor added to provide a not optional
|
||||
* option for any cards like this where the player must choose a target in such the way this card requires.
|
||||
*/
|
||||
if (controller.chooseTarget(Outcome.Neutral, target, source, game)) {
|
||||
Permanent chosenLand = game.getPermanent(target.getFirstTarget());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
|
|
@ -11,21 +9,23 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class DunesOfTheDead extends CardImpl {
|
||||
|
||||
public DunesOfTheDead(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
|
||||
this.subtype.add(SubType.DESERT);
|
||||
|
||||
// {T}: Add {C}.
|
||||
addAbility(new ColorlessManaAbility());
|
||||
|
||||
// When Dunes of the Dead is put into a graveyard from the battlefield, create a 2/2 black Zombie creature token.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 1), false));
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 1)));
|
||||
}
|
||||
|
||||
public DunesOfTheDead(final DunesOfTheDead card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
|
|
@ -14,8 +12,9 @@ import mage.filter.common.FilterLandCard;
|
|||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class FlagstonesOfTrokair extends CardImpl {
|
||||
|
|
@ -34,7 +33,7 @@ public final class FlagstonesOfTrokair extends CardImpl {
|
|||
this.addAbility(new WhiteManaAbility());
|
||||
|
||||
// When Flagstones of Trokair is put into a graveyard from the battlefield, you may search your library for a Plains card and put it onto the battlefield tapped. If you do, shuffle your library.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(FILTER), true, false), true));
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(FILTER), true, false), true, false));
|
||||
}
|
||||
|
||||
public FlagstonesOfTrokair(final FlagstonesOfTrokair card) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -14,20 +11,21 @@ import mage.constants.CardType;
|
|||
import mage.constants.TargetController;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class GoblinBoomKeg extends CardImpl {
|
||||
|
||||
public GoblinBoomKeg(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
// At the beginning of your upkeep, sacrifice Goblin Boom Keg.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false));
|
||||
|
||||
// When Goblin Boom Keg is put into a graveyard from the battlefield, it deals 3 damage to any target.
|
||||
Ability ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DamageTargetEffect(3, "it"), false);
|
||||
Ability ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DamageTargetEffect(3, "it"));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
|
|
@ -11,19 +9,22 @@ import mage.constants.CardType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.game.permanent.token.SpiritToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public final class GodsEyeGateToTheReikai extends CardImpl {
|
||||
|
||||
public GodsEyeGateToTheReikai(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// {tap}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// When Gods' Eye, Gate to the Reikai is put into a graveyard from the battlefield, create a 1/1 colorless Spirit creature token.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new SpiritToken(), 1), false));
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new SpiritToken(), 1)));
|
||||
}
|
||||
|
||||
public GodsEyeGateToTheReikai(final GodsEyeGateToTheReikai card) {
|
||||
|
|
|
|||
|
|
@ -1,27 +1,26 @@
|
|||
|
||||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public final class HatchingPlans extends CardImpl {
|
||||
|
||||
public HatchingPlans (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
||||
public HatchingPlans(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
// When Hatching Plans is put into a graveyard from the battlefield, draw three cards.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DrawCardSourceControllerEffect(3)));
|
||||
}
|
||||
|
||||
public HatchingPlans (final HatchingPlans card) {
|
||||
public HatchingPlans(final HatchingPlans card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
|
|
@ -11,22 +9,18 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
*/
|
||||
public final class Launch extends CardImpl {
|
||||
|
||||
public Launch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
|
|
@ -34,8 +28,10 @@ public final class Launch extends CardImpl {
|
|||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Enchanted creature has flying.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield)));
|
||||
|
||||
// When Launch is put into a graveyard from the battlefield, return Launch to its owner's hand.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect()));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -18,20 +15,21 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class Liability extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("a nontoken permanent");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new TokenPredicate()));
|
||||
}
|
||||
|
||||
|
||||
public Liability(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
|
||||
|
||||
// Whenever a nontoken permanent is put into a player's graveyard from the battlefield, that player loses 1 life.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new LiabilityEffect(), false, filter, true));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||
|
|
@ -10,8 +8,9 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author HCrescent
|
||||
*/
|
||||
public final class Mortuary extends CardImpl {
|
||||
|
|
@ -19,9 +18,9 @@ public final class Mortuary extends CardImpl {
|
|||
|
||||
public Mortuary(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
|
||||
|
||||
Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new PutOnLibraryTargetEffect(true, "put that card on top of your library."), false, StaticFilters.FILTER_PERMANENT_CREATURE, true, true);
|
||||
|
||||
// Whenever a creature is put into your graveyard from the battlefield, put that card on top of your library.
|
||||
Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new PutOnLibraryTargetEffect(true, "put that card on top of your library."), false, StaticFilters.FILTER_PERMANENT_CREATURE, true, true);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.o;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesAttachedTriggeredAbility;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
|
|
@ -22,33 +20,38 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class OathkeeperTakenosDaisho extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("it's a Samurai card");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.SAMURAI));
|
||||
}
|
||||
|
||||
public OathkeeperTakenosDaisho(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature gets +3/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3,1, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 1, Duration.WhileOnBattlefield)));
|
||||
|
||||
// Whenever equipped creature dies, return that card to the battlefield under your control if it's a Samurai card.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new DiesAttachedTriggeredAbility(new ReturnToBattlefieldUnderYourControlAttachedEffect(),"equipped creature", false),
|
||||
new DiesAttachedTriggeredAbility(new ReturnToBattlefieldUnderYourControlAttachedEffect(), "equipped creature", false),
|
||||
new OathkeeperEquippedMatchesFilterCondition(filter),
|
||||
""));
|
||||
|
||||
// When Oathkeeper, Takeno's Daisho is put into a graveyard from the battlefield, exile equipped creature.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ExileEquippedEffect()));
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility( Outcome.BoostCreature, new ManaCostsImpl("{2}")));
|
||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl("{2}")));
|
||||
}
|
||||
|
||||
public OathkeeperTakenosDaisho(final OathkeeperTakenosDaisho card) {
|
||||
|
|
@ -114,14 +117,12 @@ class OathkeeperEquippedMatchesFilterCondition implements Condition {
|
|||
}
|
||||
}
|
||||
if (attachedTo == null) {
|
||||
for (Effect effect :source.getEffects()) {
|
||||
for (Effect effect : source.getEffects()) {
|
||||
attachedTo = (Permanent) effect.getValue("attachedTo");
|
||||
}
|
||||
}
|
||||
if (attachedTo != null) {
|
||||
if (filter.match(attachedTo, attachedTo.getId(),attachedTo.getControllerId(), game)) {
|
||||
return true;
|
||||
}
|
||||
return filter.match(attachedTo, attachedTo.getId(), attachedTo.getControllerId(), game);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -18,14 +16,15 @@ import mage.constants.Duration;
|
|||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public final class PanicSpellbomb extends CardImpl {
|
||||
|
||||
public PanicSpellbomb(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
|
||||
// Tap, Sacrifice Panic Spellbomb: Target creature can't block this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBlockTargetEffect(Duration.EndOfTurn), new TapSourceCost());
|
||||
|
|
@ -34,7 +33,7 @@ public final class PanicSpellbomb extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// When Panic Spellbomb is put into a graveyard from the battlefield, you may pay Red. If you do, draw a card.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{R}")), false));
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{R}")), false, false));
|
||||
}
|
||||
|
||||
public PanicSpellbomb(final PanicSpellbomb card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.DoIfClashWonEffect;
|
||||
|
|
@ -12,24 +10,25 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class Ringskipper extends CardImpl {
|
||||
|
||||
public Ringskipper(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.subtype.add(SubType.FAERIE);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
//Flying
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
//When {this} is put into graveyard from play, clash with an opponent. If you win return {this} to its owner's hand
|
||||
// When {this} is put into graveyard from play, clash with an opponent. If you win return {this} to its owner's hand
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DoIfClashWonEffect(new ReturnToHandSourceEffect())));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
|
|
@ -18,8 +16,9 @@ import mage.filter.FilterPermanent;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class SoulcatchersAerie extends CardImpl {
|
||||
|
|
@ -33,15 +32,16 @@ public final class SoulcatchersAerie extends CardImpl {
|
|||
}
|
||||
|
||||
public SoulcatchersAerie(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
|
||||
// Whenever a Bird is put into your graveyard from the battlefield, put a feather counter on Soulcatchers' Aerie.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new AddCountersSourceEffect(CounterType.FEATHER.createInstance()),
|
||||
false, filter, false, true));
|
||||
false, filter, false, true));
|
||||
|
||||
// Bird creatures get +1/+1 for each feather counter on Soulcatchers' Aerie.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.FEATHER),
|
||||
new CountersSourceCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter2, false,
|
||||
"Bird creatures get +1/+1 for each feather counter on {this}.")));
|
||||
new CountersSourceCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter2, false,
|
||||
"Bird creatures get +1/+1 for each feather counter on {this}.")));
|
||||
}
|
||||
|
||||
public SoulcatchersAerie(final SoulcatchersAerie card) {
|
||||
|
|
|
|||
|
|
@ -1,37 +1,38 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.mana.AddManaInAnyCombinationEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.mana.AddManaInAnyCombinationEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class Terrarion extends CardImpl {
|
||||
|
||||
public Terrarion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
|
||||
// Terrarion enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {2}, {T}, Sacrifice Terrarion: Add two mana in any combination of colors.
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaInAnyCombinationEffect(2), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
// When Terrarion is put into a graveyard from the battlefield, draw a card.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package org.mage.test.cards.single.vis;
|
||||
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -21,7 +20,6 @@ public class BroodOfCockroachesTest extends CardTestPlayerBase {
|
|||
private static final String SHOCK = "Shock";
|
||||
|
||||
@Test
|
||||
@Ignore // TODO: fix "put into your graveyard from the battlefield" texts for some cards
|
||||
public void should_display_correct_text() {
|
||||
String expectedText = "When {this} is put into your graveyard from the battlefield, at the beginning of the next end step, you lose 1 life and return {this} to your hand.";
|
||||
|
||||
|
|
|
|||
|
|
@ -13,17 +13,21 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class PutIntoGraveFromBattlefieldSourceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private boolean onlyToControllerGraveyard;
|
||||
|
||||
public PutIntoGraveFromBattlefieldSourceTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
this(effect, false, false);
|
||||
}
|
||||
|
||||
public PutIntoGraveFromBattlefieldSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
public PutIntoGraveFromBattlefieldSourceTriggeredAbility(Effect effect, boolean optional, boolean onlyToControllerGraveyard) {
|
||||
super(Zone.ALL, effect, optional);
|
||||
setLeavesTheBattlefieldTrigger(true);
|
||||
this.onlyToControllerGraveyard = onlyToControllerGraveyard;
|
||||
}
|
||||
|
||||
public PutIntoGraveFromBattlefieldSourceTriggeredAbility(final PutIntoGraveFromBattlefieldSourceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.onlyToControllerGraveyard = ability.onlyToControllerGraveyard;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -44,7 +48,7 @@ public class PutIntoGraveFromBattlefieldSourceTriggeredAbility extends Triggered
|
|||
if (permanent != null
|
||||
&& zEvent.getToZone() == Zone.GRAVEYARD
|
||||
&& zEvent.getFromZone() == Zone.BATTLEFIELD) {
|
||||
return true;
|
||||
return !onlyToControllerGraveyard || this.isControlledBy(game.getOwnerId(zEvent.getTargetId()));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -52,6 +56,6 @@ public class PutIntoGraveFromBattlefieldSourceTriggeredAbility extends Triggered
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When {this} is put into a graveyard from the battlefield, " + super.getRule();
|
||||
return "When {this} is put into " + (onlyToControllerGraveyard ? "your" : "a") + " graveyard from the battlefield, " + super.getRule();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue