mirror of
https://github.com/magefree/mage.git
synced 2026-01-22 03:09:53 -08:00
Merge origin/master
This commit is contained in:
commit
eb0ce863e7
66 changed files with 1001 additions and 590 deletions
|
|
@ -28,11 +28,6 @@
|
|||
package mage.sets.alarareborn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -41,6 +36,11 @@ import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
|||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
|
@ -54,9 +54,9 @@ import mage.target.TargetPlayer;
|
|||
* @author jeffwadsworth
|
||||
*/
|
||||
public class NecromancersCovenant extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
|
@ -65,9 +65,6 @@ public class NecromancersCovenant extends CardImpl {
|
|||
super(ownerId, 82, "Necromancer's Covenant", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{B}{B}");
|
||||
this.expansionSetCode = "ARB";
|
||||
|
||||
|
||||
|
||||
|
||||
// When Necromancer's Covenant enters the battlefield, exile all creature cards from target player's graveyard, then put a 2/2 black Zombie creature token onto the battlefield for each card exiled this way.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new NecromancersConvenantEffect(), false);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
|
|
@ -110,7 +107,7 @@ class NecromancersConvenantEffect extends OneShotEffect {
|
|||
count += 1;
|
||||
}
|
||||
}
|
||||
ZombieToken zombieToken = new ZombieToken("ALA");
|
||||
ZombieToken zombieToken = new ZombieToken();
|
||||
if (zombieToken.putOntoBattlefield(count, game, source.getSourceId(), source.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ class UnscytheEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (card != null && game.getState().getZone(card.getId()).equals(Zone.GRAVEYARD) && controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true)) {
|
||||
ZombieToken zombie = new ZombieToken("ALA");
|
||||
ZombieToken zombie = new ZombieToken();
|
||||
return zombie.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@
|
|||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
|
||||
/**
|
||||
|
|
@ -51,7 +51,7 @@ public class MaalfeldTwins extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// When Maalfeld Twins dies, put two 2/2 black Zombie creature tokens onto the battlefield.
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ZombieToken("ALA"), 2)));
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 2)));
|
||||
}
|
||||
|
||||
public MaalfeldTwins(final MaalfeldTwins card) {
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ public class GhoulcallerGisa extends CardImpl {
|
|||
|
||||
// {B}, {tap}, Sacrifice another creature: Put X 2/2 black Zombie creature tokens onto the battlefield, where X is the sacrificed creature's power.
|
||||
DynamicValue xValue = new SacrificeCostCreaturesPower();
|
||||
Token zombie = new ZombieToken("C14");
|
||||
Token zombie = new ZombieToken();
|
||||
zombie.setTokenType(2);
|
||||
Effect effect = new CreateTokenEffect(zombie, xValue);
|
||||
effect.setText("Put X 2/2 black Zombie creature tokens onto the battlefield, where X is the sacrificed creature's power");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class OverseerOfTheDamned extends CardImpl {
|
|||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
// Whenever a nontoken creature an opponent controls dies, put a 2/2 black Zombie creature token onto the battlefield tapped.
|
||||
Token zombie = new ZombieToken("C14");
|
||||
Token zombie = new ZombieToken();
|
||||
zombie.setTokenType(2);
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(zombie, 1, true, false), false, filter));
|
||||
|
||||
|
|
|
|||
|
|
@ -25,21 +25,19 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.conflux;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.UnearthAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
|
|
@ -53,7 +51,7 @@ public class GrixisSlavedriver extends CardImpl {
|
|||
this.subtype.add("Giant");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken("ALA")), false));
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken()), false));
|
||||
this.addAbility(new UnearthAbility(new ManaCostsImpl("{3}{B}")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,6 @@
|
|||
package mage.sets.darkascension;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.ExileFromGraveCost;
|
||||
|
|
@ -39,6 +36,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
|
|
@ -71,7 +71,7 @@ public class HavengulRunebinder extends CardImpl {
|
|||
// {2}{U}, {tap}, Exile a creature card from your graveyard: Put a 2/2 black Zombie creature token onto the battlefield,
|
||||
// then put a +1/+1 counter on each Zombie creature you control.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new CreateTokenEffect(new ZombieToken("ISD")),
|
||||
new CreateTokenEffect(new ZombieToken()),
|
||||
new ManaCostsImpl("{2}{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(filter)));
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ public class ReapTheSeagraf extends CardImpl {
|
|||
super(ownerId, 72, "Reap the Seagraf", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
||||
this.expansionSetCode = "DKA";
|
||||
|
||||
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken("ISD")));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken()));
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{U}"), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import mage.game.permanent.token.ZombieToken;
|
|||
* @author Loki
|
||||
*/
|
||||
public class Wakedancer extends CardImpl {
|
||||
|
||||
private static final String staticText = "Morbid - When {this} enters the battlefield, if a creature died this turn, put a 2/2 black Zombie creature token onto the battlefield.";
|
||||
|
||||
public Wakedancer(UUID ownerId) {
|
||||
|
|
@ -57,7 +58,7 @@ public class Wakedancer extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Morbid - When Wakedancer enters the battlefield, if a creature died this turn, put a 2/2 black Zombie creature token onto the battlefield.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken("ISD")));
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken()));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, MorbidCondition.getInstance(), staticText));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ public class RakshasaGravecaller extends CardImpl {
|
|||
|
||||
// Exploit
|
||||
this.addAbility(new ExploitAbility());
|
||||
|
||||
|
||||
// When Rakshasa Gravecaller exploits a creature, put two 2/2 black Zombie creature tokens onto the battlefield.
|
||||
this.addAbility(new ExploitCreatureTriggeredAbility(new CreateTokenEffect(new ZombieToken("DTK"), 2), false));
|
||||
this.addAbility(new ExploitCreatureTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 2), false));
|
||||
}
|
||||
|
||||
public RakshasaGravecaller(final RakshasaGravecaller card) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class IbHalfheartGoblinTactician extends CardImpl {
|
|||
// Sacrifice two Mountains: Put two 1/1 red Goblin creature tokens onto the battlefield.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new CreateTokenEffect(new GoblinToken(expansionSetCode), 2),
|
||||
new CreateTokenEffect(new GoblinToken(), 2),
|
||||
new SacrificeTargetCost(new TargetControlledPermanent(2, 2, filter, true))));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import mage.constants.Rarity;
|
|||
import mage.constants.TimingRule;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
|
|
@ -47,9 +46,8 @@ public class ArmyOfTheDamned extends CardImpl {
|
|||
super(ownerId, 87, "Army of the Damned", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{5}{B}{B}{B}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
|
||||
// Put thirteen 2/2 black Zombie creature tokens onto the battlefield tapped.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken("ISD"), 13, true, false));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 13, true, false));
|
||||
|
||||
// Flashback {7}{B}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}{B}{B}"), TimingRule.SORCERY));
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@
|
|||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
|
@ -39,6 +35,10 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.players.Player;
|
||||
|
|
@ -95,7 +95,7 @@ class CellarDoorEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
player.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
ZombieToken token = new ZombieToken("ISD");
|
||||
ZombieToken token = new ZombieToken();
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.OnEventTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
|
|
@ -41,8 +42,6 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
|
|
@ -53,11 +52,10 @@ public class EndlessRanksOfTheDead extends CardImpl {
|
|||
super(ownerId, 99, "Endless Ranks of the Dead", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
|
||||
// At the beginning of your upkeep, put X 2/2 black Zombie creature tokens onto the battlefield,
|
||||
// where X is half the number of Zombies you control, rounded down.
|
||||
this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep",
|
||||
new CreateTokenEffect(new ZombieToken("ISD"), new HalfZombiesCount())));
|
||||
new CreateTokenEffect(new ZombieToken(), new HalfZombiesCount())));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,9 +47,8 @@ public class MoanOfTheUnhallowed extends CardImpl {
|
|||
super(ownerId, 109, "Moan of the Unhallowed", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
|
||||
this.expansionSetCode = "ISD";
|
||||
|
||||
|
||||
// Put two 2/2 black Zombie creature tokens onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken("ISD"), 2));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 2));
|
||||
|
||||
// Flashback {5}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{B}{B}"), TimingRule.SORCERY));
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class UndeadAlchemistTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
public UndeadAlchemistTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new ExileTargetEffect(), true);
|
||||
this.addEffect(new CreateTokenEffect(new ZombieToken("ISD")));
|
||||
this.addEffect(new CreateTokenEffect(new ZombieToken()));
|
||||
}
|
||||
|
||||
public UndeadAlchemistTriggeredAbility(final UndeadAlchemistTriggeredAbility ability) {
|
||||
|
|
@ -105,7 +105,7 @@ class UndeadAlchemistTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getFromZone() == Zone.LIBRARY && zEvent.getToZone() == Zone.GRAVEYARD && game.getOpponents(this.getControllerId()).contains(zEvent.getPlayerId())) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null && card.getCardType().contains(CardType.CREATURE)) {
|
||||
|
|
|
|||
|
|
@ -44,9 +44,8 @@ public class HordelingOutburst extends CardImpl {
|
|||
super(ownerId, 111, "Hordeling Outburst", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{R}{R}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
|
||||
// Put 3 1/1 red Goblin creature tokens onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(expansionSetCode), 3));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), 3));
|
||||
}
|
||||
|
||||
public HordelingOutburst(final HordelingOutburst card) {
|
||||
|
|
|
|||
|
|
@ -64,9 +64,8 @@ public class MarduAscendancy extends CardImpl {
|
|||
super(ownerId, 185, "Mardu Ascendancy", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{R}{W}{B}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
|
||||
// Whenever a nontoken creature you control attacks, put a 1/1 red Goblin creature token onto the battlefield tapped and attacking.
|
||||
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new CreateTokenEffect(new GoblinToken(expansionSetCode), 1, true, true), false, attackFilter));
|
||||
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new CreateTokenEffect(new GoblinToken(), 1, true, true), false, attackFilter));
|
||||
|
||||
// Sacrifice Mardu Ascendancy: Creatures you control get +0/+3 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(0, 3, Duration.EndOfTurn, filter, false),
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class PonybackBrigade extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Ponyback Brigade enters the battlefield or is turned face up, put three 1/1 red Goblin creature tokens onto the battlefield.
|
||||
this.addAbility(new PonybackBrigadeAbility(new GoblinToken(expansionSetCode)));
|
||||
this.addAbility(new PonybackBrigadeAbility(new GoblinToken()));
|
||||
|
||||
// Morph {2}{R}{W}{B}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{R}{W}{B}")));
|
||||
|
|
@ -102,7 +102,7 @@ class PonybackBrigadeAbility extends TriggeredAbilityImpl {
|
|||
if (event.getType() == EventType.TURNEDFACEUP && event.getTargetId().equals(this.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId()) ) {
|
||||
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId())) {
|
||||
Permanent sourcePermanent = game.getPermanent(getSourceId());
|
||||
if (sourcePermanent != null && !sourcePermanent.isFaceDown(game)) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class SidisiBroodTyrantAbility extends TriggeredAbilityImpl {
|
|||
class SidisiBroodTyrantTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public SidisiBroodTyrantTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken("KTK")), false);
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken()), false);
|
||||
}
|
||||
|
||||
public SidisiBroodTyrantTriggeredAbility(final SidisiBroodTyrantTriggeredAbility ability) {
|
||||
|
|
@ -126,12 +126,12 @@ class SidisiBroodTyrantTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent)event;
|
||||
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
||||
if (Zone.LIBRARY == zEvent.getFromZone() && Zone.GRAVEYARD == zEvent.getToZone()) {
|
||||
for (Card card: zEvent.getCards()) {
|
||||
for (Card card : zEvent.getCards()) {
|
||||
if (card.getOwnerId().equals(getControllerId()) && card.getCardType().contains(CardType.CREATURE)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -142,7 +142,6 @@ class SidisiBroodTyrantTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return new SidisiBroodTyrantTriggeredAbility(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield.";
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* 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
|
||||
|
|
@ -20,12 +20,11 @@
|
|||
* 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.magic2011;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -74,7 +73,7 @@ public class GraveTitan extends CardImpl {
|
|||
class GraveTitanAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public GraveTitanAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken("M11"), 2), false);
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken(), 2), false);
|
||||
}
|
||||
|
||||
public GraveTitanAbility(final GraveTitanAbility ability) {
|
||||
|
|
@ -96,7 +95,7 @@ class GraveTitanAbility extends TriggeredAbilityImpl {
|
|||
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId()) ) {
|
||||
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -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.magic2012;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -55,7 +54,7 @@ import mage.target.common.TargetCardInGraveyard;
|
|||
public class CemeteryReaper extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie creatures");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
|
@ -66,14 +65,14 @@ public class CemeteryReaper extends CardImpl {
|
|||
this.subtype.add("Zombie");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
|
||||
// Other Zombie creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
|
||||
|
||||
// {2}{B}, {T} : Exile target creature card from a graveyard. Put a 2/2 black Zombie creature token onto the battlefield.
|
||||
|
||||
// {2}{B}, {T} : Exile target creature card from a graveyard. Put a 2/2 black Zombie creature token onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{2}{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addEffect(new CreateTokenEffect(new ZombieToken("M12")));
|
||||
ability.addEffect(new CreateTokenEffect(new ZombieToken()));
|
||||
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@
|
|||
package mage.sets.magic2012;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
|
@ -49,10 +49,9 @@ public class ZombieInfestation extends CardImpl {
|
|||
super(ownerId, 120, "Zombie Infestation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
this.expansionSetCode = "M12";
|
||||
|
||||
|
||||
// Discard two cards: Put a 2/2 black Zombie creature token onto the battlefield.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new CreateTokenEffect(new ZombieToken("M12")),
|
||||
new CreateTokenEffect(new ZombieToken()),
|
||||
new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ import mage.filter.common.FilterCreatureCard;
|
|||
import mage.game.permanent.token.ZombieToken;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
|
|
@ -49,13 +47,12 @@ public class VileRebirth extends CardImpl {
|
|||
super(ownerId, 115, "Vile Rebirth", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
this.expansionSetCode = "M13";
|
||||
|
||||
|
||||
// Exile target creature card from a graveyard.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
|
||||
|
||||
// Put a 2/2 black Zombie creature token onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken("M13")));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken()));
|
||||
}
|
||||
|
||||
public VileRebirth(final VileRebirth card) {
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ public class LilianasReaver extends CardImpl {
|
|||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
// Whenever Liliana's Reaver deals combat damage to a player, that player discards a card and you put a 2/2 black Zombie creature token onto the battlefield tapped.
|
||||
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1),false, true);
|
||||
ability.addEffect(new CreateTokenEffect(new ZombieToken("M14"), 1, true, false));
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1), false, true);
|
||||
ability.addEffect(new CreateTokenEffect(new ZombieToken(), 1, true, false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import mage.game.permanent.token.ZombieToken;
|
|||
public class XathridNecromancer extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
|
|
@ -64,7 +65,7 @@ public class XathridNecromancer extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever Xathrid Necromancer or another Human creature you control dies, put a 2/2 black Zombie creature token onto the battlefield tapped.
|
||||
Effect effect = new CreateTokenEffect(new ZombieToken("M14"), 1, true, false);
|
||||
Effect effect = new CreateTokenEffect(new ZombieToken(), 1, true, false);
|
||||
Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(effect, false, filter);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,11 +45,10 @@ public class FeralIncarnation extends CardImpl {
|
|||
super(ownerId, 174, "Feral Incarnation", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{8}{G}");
|
||||
this.expansionSetCode = "M15";
|
||||
|
||||
|
||||
// Convoke
|
||||
this.addAbility(new ConvokeAbility());
|
||||
// Put three 3/3 green Beast creature tokens onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken("M15", 1), 3));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken(), 3));
|
||||
}
|
||||
|
||||
public FeralIncarnation(final FeralIncarnation card) {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.sets.magic2015;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
|
|
@ -47,8 +48,6 @@ import mage.game.permanent.token.ZombieToken;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
*/
|
||||
|
|
@ -60,7 +59,6 @@ public class NecromancersStockpile extends CardImpl {
|
|||
super(ownerId, 108, "Necromancer's Stockpile", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
this.expansionSetCode = "M15";
|
||||
|
||||
|
||||
// {1}{B}, Discard a creature card: Draw a card.
|
||||
// If the discarded card was a Zombie card, put a 2/2 black Zombie creature token onto the battlefield tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}"));
|
||||
|
|
@ -97,7 +95,7 @@ class NecromancersStockpileDiscardTargetCost extends CostImpl {
|
|||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||
if (targets.choose(Outcome.Discard, controllerId, sourceId, game)) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
for (UUID targetId: targets.get(0).getTargets()) {
|
||||
for (UUID targetId : targets.get(0).getTargets()) {
|
||||
Card card = player.getHand().get(targetId, game);
|
||||
if (card == null) {
|
||||
return false;
|
||||
|
|
@ -127,6 +125,7 @@ class NecromancersStockpileDiscardTargetCost extends CostImpl {
|
|||
}
|
||||
|
||||
class NecromancersStockpilePutTokenEffect extends OneShotEffect {
|
||||
|
||||
NecromancersStockpilePutTokenEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "If the discarded card was a Zombie card, put a 2/2 black Zombie creature token onto the battlefield tapped";
|
||||
|
|
@ -140,7 +139,7 @@ class NecromancersStockpilePutTokenEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
NecromancersStockpileDiscardTargetCost cost = (NecromancersStockpileDiscardTargetCost) source.getCosts().get(0);
|
||||
if (cost != null && cost.isZombieCard()) {
|
||||
new CreateTokenEffect(new ZombieToken("M15"), 1, true, false).apply(game, source);
|
||||
new CreateTokenEffect(new ZombieToken(), 1, true, false).apply(game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -150,4 +149,3 @@ class NecromancersStockpilePutTokenEffect extends OneShotEffect {
|
|||
return new NecromancersStockpilePutTokenEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ public class SoulOfZendikar extends CardImpl {
|
|||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
// {3}{G}{G}: Put a 3/3 green Beast creature token onto the battlefield.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new BeastToken("M15")), new ManaCostsImpl("{3}{G}{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new BeastToken()), new ManaCostsImpl("{3}{G}{G}")));
|
||||
// {3}{G}{G}, Exile Soul of Zendikar from your graveyard: Put a 3/3 green Beast creature token onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new CreateTokenEffect(new BeastToken("M15")), new ManaCostsImpl("{3}{G}{G}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new CreateTokenEffect(new BeastToken()), new ManaCostsImpl("{3}{G}{G}"));
|
||||
ability.addCost(new ExileSourceFromGraveCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,13 +53,12 @@ public class WasteNot extends CardImpl {
|
|||
super(ownerId, 122, "Waste Not", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
this.expansionSetCode = "M15";
|
||||
|
||||
|
||||
// Whenever an opponent discards a creature card, put a 2/2 black Zombie creature token onto the battlefield.
|
||||
this.addAbility(new WasteNotCreatureTriggeredAbility());
|
||||
|
||||
|
||||
// Whenever an opponent discards a land card, add {B}{B} to your mana pool.
|
||||
this.addAbility(new WasteNotLandTriggeredAbility());
|
||||
|
||||
|
||||
// Whenever an opponent discards a noncreature, nonland card, draw a card.
|
||||
this.addAbility(new WasteNotOtherTriggeredAbility());
|
||||
}
|
||||
|
|
@ -75,15 +74,15 @@ public class WasteNot extends CardImpl {
|
|||
}
|
||||
|
||||
class WasteNotCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
|
||||
WasteNotCreatureTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken("M15")), false);
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken()), false);
|
||||
}
|
||||
|
||||
|
||||
WasteNotCreatureTriggeredAbility(final WasteNotCreatureTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public WasteNotCreatureTriggeredAbility copy() {
|
||||
return new WasteNotCreatureTriggeredAbility(this);
|
||||
|
|
@ -93,7 +92,7 @@ class WasteNotCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DISCARDED_CARD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) {
|
||||
|
|
@ -104,7 +103,7 @@ class WasteNotCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent discards a creature card, put a 2/2 black Zombie creature token onto the battlefield.";
|
||||
|
|
@ -112,15 +111,15 @@ class WasteNotCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
class WasteNotLandTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
|
||||
WasteNotLandTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0)), false);
|
||||
}
|
||||
|
||||
|
||||
WasteNotLandTriggeredAbility(final WasteNotLandTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public WasteNotLandTriggeredAbility copy() {
|
||||
return new WasteNotLandTriggeredAbility(this);
|
||||
|
|
@ -130,7 +129,7 @@ class WasteNotLandTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DISCARDED_CARD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) {
|
||||
|
|
@ -141,7 +140,7 @@ class WasteNotLandTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent discards a land card, add {B}{B} to your mana pool.";
|
||||
|
|
@ -149,15 +148,15 @@ class WasteNotLandTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
class WasteNotOtherTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
|
||||
WasteNotOtherTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false);
|
||||
}
|
||||
|
||||
|
||||
WasteNotOtherTriggeredAbility(final WasteNotOtherTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public WasteNotOtherTriggeredAbility copy() {
|
||||
return new WasteNotOtherTriggeredAbility(this);
|
||||
|
|
@ -167,7 +166,7 @@ class WasteNotOtherTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DISCARDED_CARD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) {
|
||||
|
|
@ -178,9 +177,9 @@ class WasteNotOtherTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent discards a noncreature, nonland card, draw a card.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ public class AspiringAeronaut extends CardImpl {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
|
||||
// When Aspiring Aeronaut enters the battlefield, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken("ORI"))));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken())));
|
||||
}
|
||||
|
||||
public AspiringAeronaut(final AspiringAeronaut card) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import mage.game.permanent.token.ThopterColorlessToken;
|
|||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
|
||||
*
|
||||
*/
|
||||
public class FoundryOfTheConsuls extends CardImpl {
|
||||
|
||||
|
|
@ -55,8 +55,8 @@ public class FoundryOfTheConsuls extends CardImpl {
|
|||
// {T}: Add {1} to your mana pool.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
// {5}, {T}, Sacrifice Foundry of the Consuls: Put two 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken("ORI"), 2),
|
||||
new ManaCostsImpl("{5}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken(), 2),
|
||||
new ManaCostsImpl("{5}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class GideonsPhalanx extends CardImpl {
|
|||
class GideonsPhalanxKnightToken extends Token {
|
||||
|
||||
public GideonsPhalanxKnightToken() {
|
||||
super("Soldier", "2/2 white Knight creature tokens with vigilance");
|
||||
super("Knight", "2/2 white Knight creature tokens with vigilance");
|
||||
this.setOriginalExpansionSetCode("ORI");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setColor(ObjectColor.WHITE);
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ public class HangarbackWalker extends CardImpl {
|
|||
|
||||
// Hangarback Walker enters the battlefield with X +1/+1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new HangarbackWalkerEffect(), "with X +1/+1 counters on it"));
|
||||
|
||||
|
||||
// When Hangarback Walker dies, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield for each +1/+1 counter on Hangarback Walker.
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken("ORI"), new CountersCount(CounterType.P1P1)), false));
|
||||
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken(), new CountersCount(CounterType.P1P1)), false));
|
||||
|
||||
// {1}, {t}: Put a +1/+1 counter on Hangarback Walker.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
@ -88,33 +88,33 @@ public class HangarbackWalker extends CardImpl {
|
|||
|
||||
class HangarbackWalkerEffect extends OneShotEffect {
|
||||
|
||||
public HangarbackWalkerEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "{this} enters the battlefield with X +1/+1 counters on it";
|
||||
}
|
||||
public HangarbackWalkerEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "{this} enters the battlefield with X +1/+1 counters on it";
|
||||
}
|
||||
|
||||
public HangarbackWalkerEffect(final HangarbackWalkerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
public HangarbackWalkerEffect(final HangarbackWalkerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
int amount = ((SpellAbility)obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
}
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HangarbackWalkerEffect copy() {
|
||||
return new HangarbackWalkerEffect(this);
|
||||
}
|
||||
@Override
|
||||
public HangarbackWalkerEffect copy() {
|
||||
return new HangarbackWalkerEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -212,7 +213,7 @@ class JaceTelepathUnboundEmblem extends Emblem {
|
|||
this.setName("Emblem - Jace");
|
||||
Effect effect = new PutTopCardOfLibraryIntoGraveTargetEffect(5);
|
||||
effect.setText("target opponent puts the top five cards of his or her library into his or her graveyard");
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(effect, false);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, new FilterSpell("a spell"), false, false);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
getAbilities().add(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class LilianaHereticalHealer extends CardImpl {
|
|||
|
||||
// Whenever another nontoken creature you control dies, exile Liliana Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new ExileAndReturnTransformedSourceEffect(ExileAndReturnTransformedSourceEffect.Gender.FEMAL,
|
||||
new CreateTokenEffect(new ZombieToken(expansionSetCode))), false, filter));
|
||||
new CreateTokenEffect(new ZombieToken())), false, filter));
|
||||
}
|
||||
|
||||
public LilianaHereticalHealer(final LilianaHereticalHealer card) {
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ public class NissaSageAnimist extends CardImpl {
|
|||
this.expansionSetCode = "ORI";
|
||||
this.subtype.add("Nissa");
|
||||
this.color.setGreen(true);
|
||||
|
||||
|
||||
this.nightCard = true;
|
||||
this.canTransform = true;
|
||||
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), false));
|
||||
|
||||
// +1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.
|
||||
|
|
@ -95,21 +95,21 @@ public class NissaSageAnimist extends CardImpl {
|
|||
}
|
||||
|
||||
class NissaSageAnimistPlusOneEffect extends OneShotEffect {
|
||||
|
||||
|
||||
NissaSageAnimistPlusOneEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.";
|
||||
}
|
||||
|
||||
|
||||
NissaSageAnimistPlusOneEffect(final NissaSageAnimistPlusOneEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NissaSageAnimistPlusOneEffect copy() {
|
||||
return new NissaSageAnimistPlusOneEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
|
|
@ -195,4 +195,4 @@ class NissaSageAnimistMinusSevenEffect extends ContinuousEffectImpl {
|
|||
public boolean hasLayer(Layer layer) {
|
||||
return layer == Layer.TypeChangingEffects_4 || layer == Layer.PTChangingEffects_7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ public class PiaAndKiranNalaar extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken("ORI"), 2)));
|
||||
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken(), 2)));
|
||||
|
||||
// {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterControlledArtifactPermanent("an artifact"),true)));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, new FilterControlledArtifactPermanent("an artifact"), true)));
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
@ -78,4 +78,4 @@ public class PiaAndKiranNalaar extends CardImpl {
|
|||
public PiaAndKiranNalaar copy() {
|
||||
return new PiaAndKiranNalaar(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class ThopterSpyNetwork extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if you control an artifact, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield.
|
||||
this.addAbility(new ThopterSpyNetworkUpkeepTriggeredAbility());
|
||||
|
||||
|
||||
// Whenever one or more artifact creatures you control deals combat damage to a player, draw a card.
|
||||
this.addAbility(new ThopterSpyNetworkDamageTriggeredAbility());
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ public class ThopterSpyNetwork extends CardImpl {
|
|||
class ThopterSpyNetworkUpkeepTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public ThopterSpyNetworkUpkeepTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken("ORI"), 1), false);
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken(), 1), false);
|
||||
}
|
||||
|
||||
public ThopterSpyNetworkUpkeepTriggeredAbility(final ThopterSpyNetworkUpkeepTriggeredAbility ability) {
|
||||
|
|
@ -98,7 +98,7 @@ class ThopterSpyNetworkUpkeepTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
return game.getBattlefield().countAll(new FilterArtifactPermanent(), this.controllerId, game) >= 1;
|
||||
return game.getBattlefield().countAll(new FilterArtifactPermanent(), this.controllerId, game) >= 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -108,7 +108,7 @@ class ThopterSpyNetworkUpkeepTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
|
||||
List<UUID> damagedPlayerIds = new ArrayList<>();
|
||||
|
||||
public ThopterSpyNetworkDamageTriggeredAbility() {
|
||||
|
|
@ -127,7 +127,7 @@ class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER
|
||||
|| event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST;
|
||||
|| event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -135,14 +135,14 @@ class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) {
|
||||
if (((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
if (creature != null && creature.getControllerId().equals(controllerId)
|
||||
&& creature.getCardType().contains(CardType.ARTIFACT) && !damagedPlayerIds.contains(event.getTargetId())) {
|
||||
damagedPlayerIds.add(event.getTargetId());
|
||||
return true;
|
||||
if (creature != null && creature.getControllerId().equals(controllerId)
|
||||
&& creature.getCardType().contains(CardType.ARTIFACT) && !damagedPlayerIds.contains(event.getTargetId())) {
|
||||
damagedPlayerIds.add(event.getTargetId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event.getType().equals(GameEvent.EventType.END_COMBAT_STEP_POST)){
|
||||
if (event.getType().equals(GameEvent.EventType.END_COMBAT_STEP_POST)) {
|
||||
damagedPlayerIds.clear();
|
||||
}
|
||||
return false;
|
||||
|
|
@ -152,4 +152,4 @@ class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public String getRule() {
|
||||
return "Whenever one or more artifact creatures you control deals combat damage to a player, draw a card";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class UndeadServant extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Undead Servant enters the battlefield, put a 2/2 black Zombie creature token onto the battlefield for each card named Undead Servant in your graveyard.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken(expansionSetCode), new CardsInControllerGraveyardCount(filter))));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken(), new CardsInControllerGraveyardCount(filter))));
|
||||
}
|
||||
|
||||
public UndeadServant(final UndeadServant card) {
|
||||
|
|
|
|||
|
|
@ -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.mirrodinbesieged;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -47,7 +46,7 @@ import mage.game.permanent.token.ZombieToken;
|
|||
*/
|
||||
public class NestedGhoul extends CardImpl {
|
||||
|
||||
public NestedGhoul (UUID ownerId) {
|
||||
public NestedGhoul(UUID ownerId) {
|
||||
super(ownerId, 48, "Nested Ghoul", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
this.expansionSetCode = "MBS";
|
||||
this.subtype.add("Zombie");
|
||||
|
|
@ -58,7 +57,7 @@ public class NestedGhoul extends CardImpl {
|
|||
this.addAbility(new NestedGhoulTriggeredAbility());
|
||||
}
|
||||
|
||||
public NestedGhoul (final NestedGhoul card) {
|
||||
public NestedGhoul(final NestedGhoul card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
@ -70,8 +69,9 @@ public class NestedGhoul extends CardImpl {
|
|||
}
|
||||
|
||||
class NestedGhoulTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
NestedGhoulTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken("MBS")));
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken()));
|
||||
}
|
||||
|
||||
NestedGhoulTriggeredAbility(final NestedGhoulTriggeredAbility ability) {
|
||||
|
|
@ -97,4 +97,4 @@ class NestedGhoulTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public String getRule() {
|
||||
return "Whenever a source deals damage to {this}, put a 2/2 black Zombie creature token onto the battlefield.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@
|
|||
package mage.sets.planechase2012;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
|
||||
/**
|
||||
|
|
@ -52,7 +52,7 @@ public class BeetlebackChief extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Beetleback Chief enters the battlefield, put two 1/1 red Goblin creature tokens onto the battlefield.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(expansionSetCode), 2)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(), 2)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,33 +25,32 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class KuldothaRebirth extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public KuldothaRebirth (UUID ownerId) {
|
||||
public KuldothaRebirth(UUID ownerId) {
|
||||
super(ownerId, 96, "Kuldotha Rebirth", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{R}");
|
||||
this.expansionSetCode = "SOM";
|
||||
|
||||
|
|
@ -59,7 +58,7 @@ public class KuldothaRebirth extends CardImpl {
|
|||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
}
|
||||
|
||||
public KuldothaRebirth (final KuldothaRebirth card) {
|
||||
public KuldothaRebirth(final KuldothaRebirth card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
@ -68,4 +67,4 @@ public class KuldothaRebirth extends CardImpl {
|
|||
return new KuldothaRebirth(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,10 +51,11 @@ import mage.game.permanent.token.ZombieToken;
|
|||
public class ArchdemonOfUnx extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Zombie creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SubtypePredicate("Zombie")));
|
||||
}
|
||||
|
||||
|
||||
public ArchdemonOfUnx(UUID ownerId) {
|
||||
super(ownerId, 64, "Archdemon of Unx", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
|
@ -69,7 +70,7 @@ public class ArchdemonOfUnx extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
// At the beginning of your upkeep, sacrifice a non-Zombie creature, then put a 2/2 black Zombie creature token onto the battlefield.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(filter, 1, ""), TargetController.YOU, false);
|
||||
ability.addEffect(new CreateTokenEffect(new ZombieToken("ALA")));
|
||||
ability.addEffect(new CreateTokenEffect(new ZombieToken()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@
|
|||
package mage.sets.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.CreateTokenTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -83,14 +82,14 @@ class MoggInfestationEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public MoggInfestationEffect copy() {
|
||||
return new MoggInfestationEffect(this);
|
||||
return new MoggInfestationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null && getTargetPointer().getFirst(game, source) != null) {
|
||||
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), getTargetPointer().getFirst(game, source), game)) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), getTargetPointer().getFirst(game, source), game)) {
|
||||
if (permanent.destroy(source.getSourceId(), game, false)) {
|
||||
Effect effect = new CreateTokenTargetEffect(new GoblinToken(), 2);
|
||||
effect.setTargetPointer(getTargetPointer());
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@
|
|||
package mage.sets.timespiral;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.StormAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
|
||||
/**
|
||||
|
|
@ -45,7 +45,6 @@ public class EmptyTheWarrens extends CardImpl {
|
|||
super(ownerId, 152, "Empty the Warrens", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||
this.expansionSetCode = "TSP";
|
||||
|
||||
|
||||
// Put two 1/1 red Goblin creature tokens onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), 2));
|
||||
// Storm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue