mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 19:59:54 -08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
92e21073e1
343 changed files with 6350 additions and 1156 deletions
60
Mage.Sets/src/mage/sets/DragonsOfTarkir.java
Normal file
60
Mage.Sets/src/mage/sets/DragonsOfTarkir.java
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
|
||||
public class DragonsOfTarkir extends ExpansionSet {
|
||||
|
||||
private static final DragonsOfTarkir fINSTANCE = new DragonsOfTarkir();
|
||||
|
||||
public static DragonsOfTarkir getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private DragonsOfTarkir() {
|
||||
super("Dragons of Tarkir", "DTK", "mage.sets.dragonsoftarkir", new GregorianCalendar(2015, 3, 27).getTime(), SetType.EXPANSION);
|
||||
this.blockName = "Dragons of Tarkir";
|
||||
this.hasBoosters = true;
|
||||
this.hasBasicLands = true;
|
||||
this.numBoosterLands = 1;
|
||||
this.numBoosterCommon = 10;
|
||||
this.numBoosterUncommon = 3;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 8;
|
||||
}
|
||||
|
||||
}
|
||||
52
Mage.Sets/src/mage/sets/ajanivsnicolbolas/SapseepForest.java
Normal file
52
Mage.Sets/src/mage/sets/ajanivsnicolbolas/SapseepForest.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.ajanivsnicolbolas;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SapseepForest extends mage.sets.shadowmoor.SapseepForest {
|
||||
|
||||
public SapseepForest(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 36;
|
||||
this.expansionSetCode = "DDH";
|
||||
}
|
||||
|
||||
public SapseepForest(final SapseepForest card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SapseepForest copy() {
|
||||
return new SapseepForest(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -36,9 +36,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.MonocoloredPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -91,12 +90,11 @@ class DefilerOfSoulsEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("monocolored creature");
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("monocolored creature");
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new MonocoloredPredicate());
|
||||
|
||||
int amount;
|
||||
|
|
|
|||
|
|
@ -63,8 +63,7 @@ public class MaelstromNexus extends CardImpl {
|
|||
|
||||
|
||||
// The first spell you cast each turn has cascade.
|
||||
this.addAbility(new MaelstromNexusTriggeredAbility());
|
||||
this.addWatcher(new FirstSpellCastThisTurnWatcher());
|
||||
this.addAbility(new MaelstromNexusTriggeredAbility(), new FirstSpellCastThisTurnWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,8 +61,7 @@ public class PredatoryAdvantage extends CardImpl {
|
|||
|
||||
|
||||
// At the beginning of each opponent's end step, if that player didn't cast a creature spell this turn, put a 2/2 green Lizard creature token onto the battlefield.
|
||||
this.addWatcher(new CastCreatureWatcher());
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LizardToken()), TargetController.OPPONENT, new DidNotCastCreatureCondition(), false));
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LizardToken()), TargetController.OPPONENT, new DidNotCastCreatureCondition(), false), new CastCreatureWatcher());
|
||||
}
|
||||
|
||||
public PredatoryAdvantage(final PredatoryAdvantage card) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -50,12 +50,9 @@ public class TimeSieve extends CardImpl {
|
|||
super(ownerId, 31, "Time Sieve", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{U}{B}");
|
||||
this.expansionSetCode = "ARB";
|
||||
|
||||
|
||||
|
||||
|
||||
// {tap}, Sacrifice five artifacts: Take an extra turn after this one.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddExtraTurnControllerEffect(), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterArtifactPermanent("five artifacts"), true)));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterControlledArtifactPermanent("five artifacts"), true)));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ public class UnscytheKillerOfKings extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)));
|
||||
|
||||
// Whenever a creature dealt damage by equipped creature this turn dies, you may exile that card. If you do, put a 2/2 black Zombie creature token onto the battlefield.
|
||||
this.addAbility(new UnscytheKillerOfKingsTriggeredAbility(new UnscytheEffect()));
|
||||
this.addWatcher(new EquippedDidDamageWatcher());
|
||||
this.addAbility(new UnscytheKillerOfKingsTriggeredAbility(new UnscytheEffect()), new EquippedDidDamageWatcher());
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent()));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.antiquities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class CircleOfProtectionArtifacts extends mage.sets.fifthdawn.CircleOfProtectionArtifacts {
|
||||
|
||||
public CircleOfProtectionArtifacts(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 97;
|
||||
this.expansionSetCode = "ATQ";
|
||||
}
|
||||
|
||||
public CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CircleOfProtectionArtifacts copy() {
|
||||
return new CircleOfProtectionArtifacts(this);
|
||||
}
|
||||
}
|
||||
52
Mage.Sets/src/mage/sets/archenemy/TorrentOfSouls.java
Normal file
52
Mage.Sets/src/mage/sets/archenemy/TorrentOfSouls.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.archenemy;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class TorrentOfSouls extends mage.sets.shadowmoor.TorrentOfSouls {
|
||||
|
||||
public TorrentOfSouls(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 96;
|
||||
this.expansionSetCode = "ARC";
|
||||
}
|
||||
|
||||
public TorrentOfSouls(final TorrentOfSouls card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TorrentOfSouls copy() {
|
||||
return new TorrentOfSouls(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ public class Aggravate extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
// Each creature dealt damage this way attacks this turn if able.
|
||||
this.getSpellAbility().addEffect(new AggravateRequirementEffect());
|
||||
this.addWatcher(new DamagedByWatcher());
|
||||
this.getSpellAbility().addWatcher(new DamagedByWatcher());
|
||||
}
|
||||
|
||||
public Aggravate(final Aggravate card) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import mage.Mana;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ContinuousRuleModifiyingEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
|
|
@ -79,8 +80,7 @@ public class CavernOfSouls extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type, and that spell can't be countered.
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(1, new CavernOfSoulsManaBuilder()));
|
||||
this.addWatcher(new CavernOfSoulsWatcher());
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new CavernOfSoulsManaBuilder(), true), new CavernOfSoulsWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new CavernOfSoulsCantCounterEffect()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public class PillarOfFlame extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
|
||||
// If a creature dealt damage this way would die this turn, exile it instead.
|
||||
this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addWatcher(new DamagedByWatcher());
|
||||
}
|
||||
|
||||
public PillarOfFlame(final PillarOfFlame card) {
|
||||
|
|
|
|||
|
|
@ -63,8 +63,7 @@ public class GoblinCohort extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Goblin Cohort can't attack unless you've cast a creature spell this turn.
|
||||
this.addWatcher(new PlayerCastCreatureWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinCohortEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinCohortEffect()), new PlayerCastCreatureWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ public class KumanosBlessing extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// If a creature dealt damage by enchanted creature this turn would die, exile it instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KumanosBlessingEffect()));
|
||||
this.addWatcher(new DamagedByEnchantedWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KumanosBlessingEffect()), new DamagedByEnchantedWatcher());
|
||||
|
||||
}
|
||||
|
||||
public KumanosBlessing(final KumanosBlessing card) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
|
|
@ -70,7 +70,7 @@ public class Lifespinner extends CardImpl {
|
|||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)),
|
||||
new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterCreaturePermanent("Spirit", "three Spirits"), false)));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledCreaturePermanent("Spirit", "three Spirits"), false)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
@ -44,7 +44,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public class TorrentOfStone extends CardImpl {
|
||||
private static final FilterLandPermanent filterSacrifice = new FilterLandPermanent("two Mountains");
|
||||
private static final FilterControlledLandPermanent filterSacrifice = new FilterControlledLandPermanent("two Mountains");
|
||||
|
||||
static {
|
||||
filterSacrifice.add(new SubtypePredicate("Mountain"));
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ public class EpharaGodOfThePolis extends CardImpl {
|
|||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false),
|
||||
HadAnotherCreatureEnterTheBattlefieldCondition.getInstance(),
|
||||
"At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."));
|
||||
this.addWatcher(new CreatureEnteredBattlefieldLastTurnWatcher());
|
||||
"At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."),
|
||||
new CreatureEnteredBattlefieldLastTurnWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
package mage.sets.bornofthegods;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
|
@ -162,6 +163,7 @@ class SearingBloodDelayedEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Player player = game.getPlayer(permanent.getControllerId());
|
||||
if (player != null) {
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
player.damage(3, source.getSourceId(), game, false, true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,7 @@ public class SpiritOfTheLabyrinth extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Each player can't draw more than one card each turn.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpiritOfTheLabyrinthEffect()));
|
||||
this.addWatcher(new SpiritOfTheLabyrinthWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpiritOfTheLabyrinthEffect()), new SpiritOfTheLabyrinthWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,7 @@ public class AshenSkinZubera extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
Ability ability = new DiesTriggeredAbility(new DiscardTargetEffect(new ZuberasDiedDynamicValue()));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new ZuberasDiedWatcher());
|
||||
this.addAbility(ability, new ZuberasDiedWatcher());
|
||||
}
|
||||
|
||||
public AshenSkinZubera(final AshenSkinZubera card) {
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ public class BoseijuWhoSheltersAll extends CardImpl {
|
|||
ability.getEffects().get(0).setText("Add {1} to your mana pool. If that mana is spent on an instant or sorcery spell, that spell can't be countered by spells or abilities");
|
||||
this.addAbility(ability);
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoseijuWhoSheltersAllCantCounterEffect()));
|
||||
this.addWatcher(new BoseijuWhoSheltersAllWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoseijuWhoSheltersAllCantCounterEffect()), new BoseijuWhoSheltersAllWatcher());
|
||||
}
|
||||
|
||||
public BoseijuWhoSheltersAll(final BoseijuWhoSheltersAll card) {
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@ public class DrippingTongueZubera extends CardImpl {
|
|||
this.color.setGreen(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SpiritToken(), new ZuberasDiedDynamicValue()), false));
|
||||
this.addWatcher(new ZuberasDiedWatcher());
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SpiritToken(), new ZuberasDiedDynamicValue()), false), new ZuberasDiedWatcher());
|
||||
}
|
||||
|
||||
public DrippingTongueZubera (final DrippingTongueZubera card) {
|
||||
|
|
|
|||
|
|
@ -55,8 +55,7 @@ public class EmberFistZubera extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(new ZuberasDiedDynamicValue()));
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new ZuberasDiedWatcher());
|
||||
this.addAbility(ability, new ZuberasDiedWatcher());
|
||||
}
|
||||
|
||||
public EmberFistZubera (final EmberFistZubera card) {
|
||||
|
|
|
|||
|
|
@ -32,13 +32,12 @@ 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.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -93,22 +92,24 @@ class FeastOfWormsEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
|
||||
Player targetPlayer = game.getPlayer(permanent.getControllerId());
|
||||
if (targetPlayer != null && permanent != null && (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
|
||||
FilterPermanent filter = new FilterLandPermanent("land to sacrifice");
|
||||
filter.add(new ControllerIdPredicate(targetPlayer.getId()));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(id);
|
||||
Player targetPlayer = null;
|
||||
if (permanent != null) {
|
||||
targetPlayer = game.getPlayer(permanent.getControllerId());
|
||||
}
|
||||
if (targetPlayer != null && permanent != null && (permanent.getSupertype().get(0).equals("Legendary"))) {
|
||||
FilterControlledPermanent filter = new FilterControlledLandPermanent("land to sacrifice");
|
||||
filter.add(new ControllerIdPredicate(targetPlayer.getId()));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
|
||||
if (target.canChoose(targetPlayer.getId(), game)) {
|
||||
targetPlayer.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
|
||||
|
||||
Permanent land = game.getPermanent(target.getFirstTarget());
|
||||
if (land != null) {
|
||||
return land.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
return true;
|
||||
if (target.canChoose(targetPlayer.getId(), game)) {
|
||||
targetPlayer.chooseTarget(Outcome.Sacrifice, target, source, game);
|
||||
Permanent land = game.getPermanent(target.getFirstTarget());
|
||||
if (land != null) {
|
||||
land.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,7 @@ public class FloatingDreamZubera extends CardImpl {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(new ZuberasDiedDynamicValue())));
|
||||
this.addWatcher(new ZuberasDiedWatcher());
|
||||
this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(new ZuberasDiedDynamicValue())), new ZuberasDiedWatcher());
|
||||
}
|
||||
|
||||
public FloatingDreamZubera(final FloatingDreamZubera card) {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.watchers.common.DamagedByWatcher;
|
||||
|
||||
/**
|
||||
* @author LevelX
|
||||
|
|
@ -62,7 +63,7 @@ public class Frostwielder extends CardImpl {
|
|||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
// If a creature dealt damage by Frostwielder this turn would die, exile it instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,9 +77,7 @@ public class HallOfTheBanditLord extends CardImpl {
|
|||
effect.setText("Add {1} to your mana pool. If that mana is spent on a creature spell, it gains haste");
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||
ability.addCost(new PayLifeCost(3));
|
||||
this.addAbility(ability);
|
||||
|
||||
this.addWatcher(new HallOfTheBanditLordWatcher(ability));
|
||||
this.addAbility(ability, new HallOfTheBanditLordWatcher(ability));
|
||||
}
|
||||
|
||||
public HallOfTheBanditLord(final HallOfTheBanditLord card) {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.watchers.common.DamagedByWatcher;
|
||||
|
||||
/**
|
||||
* @author LevelX
|
||||
|
|
@ -65,7 +66,7 @@ public class KumanoMasterYamabushi extends CardImpl {
|
|||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
// If a creature dealt damage by Kumano this turn would die, exile it instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.watchers.common.DamagedByWatcher;
|
||||
|
||||
/**
|
||||
* @author LevelX
|
||||
|
|
@ -53,7 +54,7 @@ public class KumanosPupils extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// If a creature dealt damage by Kumano's Pupils this turn would die, exile it instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher());
|
||||
}
|
||||
|
||||
public KumanosPupils(final KumanosPupils card) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class MyojinOfCleansingFire extends CardImpl {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Cleansing Fire enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class MyojinOfInfiniteRage extends CardImpl {
|
|||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Infinite Rage enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class MyojinOfLifesWeb extends CardImpl {
|
|||
this.power = new MageInt(8);
|
||||
this.toughness = new MageInt(8);
|
||||
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Life's Web enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class MyojinOfNightsReach extends CardImpl {
|
|||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Night's Reach enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class MyojinOfSeeingWinds extends CardImpl {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Seeing Winds enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -106,7 +106,7 @@ class ShimatsuTheBloodcloakedEffect extends ReplacementEffectImpl {
|
|||
Permanent creature = game.getPermanent(event.getTargetId());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (creature != null && controller != null) {
|
||||
Target target = new TargetControlledPermanent(0, Integer.MAX_VALUE, new FilterPermanent(), true);
|
||||
Target target = new TargetControlledPermanent(0, Integer.MAX_VALUE, new FilterControlledPermanent(), true);
|
||||
if (!target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class SiftThroughSands extends CardImpl {
|
|||
this.getSpellAbility().addEffect(effect);
|
||||
// If you've cast a spell named Peer Through Depths and a spell named Reach Through Mists this turn, you may search your library for a card named The Unspeakable, put it onto the battlefield, then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false, true), new SiftThroughSandsCondition(), rule));
|
||||
this.addWatcher(new SiftThroughSandsWatcher());
|
||||
this.getSpellAbility().addWatcher(new SiftThroughSandsWatcher());
|
||||
}
|
||||
|
||||
public SiftThroughSands(final SiftThroughSands card) {
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ public class SilentChantZubera extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
Ability ability = new DiesTriggeredAbility(new GainLifeEffect(new SilentChantZuberaDynamicValue()));
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new ZuberasDiedWatcher());
|
||||
this.addAbility(ability, new ZuberasDiedWatcher());
|
||||
}
|
||||
|
||||
public SilentChantZubera (final SilentChantZubera card) {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
|
@ -67,7 +67,7 @@ public class UyoSilentProphet extends CardImpl {
|
|||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Moonfolk");
|
||||
this.subtype.add("Wizard");
|
||||
this.color.setBlue(true);
|
||||
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ public class UyoSilentProphet extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {2}, Return two lands you control to their owner's hand: Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, new FilterLandPermanent("lands"), false)));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false)));
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.watchers.common.DamagedByWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -55,6 +56,7 @@ public class YamabushisFlame extends CardImpl {
|
|||
|
||||
// If a creature dealt damage this way would die this turn, exile it instead.
|
||||
this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addWatcher(new DamagedByWatcher());
|
||||
}
|
||||
|
||||
public YamabushisFlame(final YamabushisFlame card) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class YamabushisStorm extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DamageAllEffect(1, new FilterCreaturePermanent()));
|
||||
// If a creature dealt damage this way would die this turn, exile it instead.
|
||||
this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addWatcher(new DamagedByWatcher());
|
||||
}
|
||||
|
||||
public YamabushisStorm(final YamabushisStorm card) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class FuryOfTheHorde extends CardImpl {
|
|||
// Untap all creatures that attacked this turn. After this main phase, there is an additional combat phase followed by an additional main phase.
|
||||
this.getSpellAbility().addEffect(new FuryOfTheHordeUntapEffect());
|
||||
this.getSpellAbility().addEffect(new FuryOfTheHordeAddPhasesEffect());
|
||||
this.addWatcher(new AttackedThisTurnWatcher());
|
||||
this.getSpellAbility().addWatcher(new AttackedThisTurnWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class LightningStormCountCondition implements DynamicValue {
|
|||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Spell spell = game.getStack().getSpell(sourceAbility.getSourceId());
|
||||
if (spell != null) {
|
||||
return spell.getCounters().getCount(counter) + 3;
|
||||
return spell.getCounters(game).getCount(counter) + 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@ public class CourtHussar extends CardImpl {
|
|||
new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false),
|
||||
false));
|
||||
// When Court Hussar enters the battlefield, sacrifice it unless {W} was spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.W)), false));
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.W)), false), new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public CourtHussar(final CourtHussar card) {
|
||||
|
|
|
|||
|
|
@ -82,8 +82,7 @@ public class KaradorGhostChieftain extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.STACK, new KaradorGhostChieftainCostReductionEffect()));
|
||||
|
||||
// During each of your turns, you may cast one creature card from your graveyard.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KaradorGhostChieftainContinuousEffect()));
|
||||
this.addWatcher(new KaradorGhostChieftainWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KaradorGhostChieftainContinuousEffect()), new KaradorGhostChieftainWatcher());
|
||||
}
|
||||
|
||||
public KaradorGhostChieftain(final KaradorGhostChieftain card) {
|
||||
|
|
|
|||
|
|
@ -60,8 +60,7 @@ public class AzoriusHerald extends CardImpl {
|
|||
// When Azorius Herald enters the battlefield, you gain 4 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4)));
|
||||
// When Azorius Herald enters the battlefield, sacrifice it unless {U} was spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false));
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false), new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public AzoriusHerald(final AzoriusHerald card) {
|
||||
|
|
|
|||
|
|
@ -78,8 +78,7 @@ public class FellShepherd extends CardImpl {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
// Whenever Fell Shepherd deals combat damage to a player, you may return to your hand all creature cards that were put into your graveyard from the battlefield this turn.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new FellShepherdEffect(), true));
|
||||
this.addWatcher(new FellShepherdWatcher());
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new FellShepherdEffect(), true), new FellShepherdWatcher());
|
||||
|
||||
// {B}, Sacrifice another creature: Target creature gets -2/-2 until end of turn.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2,-2, Duration.EndOfTurn), new ManaCostsImpl("{B}"));
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@ public class JelevaNephaliasScourge extends CardImpl {
|
|||
// When Jeleva, Nephalia's Scourge enters the battlefield, each player exiles the top X cards of his or her library, where X is the amount of mana spent to cast Jeleva.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new JelevaNephaliasScourgeEffect(), false));
|
||||
// Whenever Jeleva attacks, you may cast an instant or sorcery card exiled with it without paying its mana cost.
|
||||
this.addAbility(new AttacksTriggeredAbility(new JelevaNephaliasCastEffect(), false));
|
||||
this.addWatcher(new JelevaNephaliasWatcher());
|
||||
this.addAbility(new AttacksTriggeredAbility(new JelevaNephaliasCastEffect(), false), new JelevaNephaliasWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,13 +75,12 @@ public class OpalPalace extends CardImpl {
|
|||
// {1}, {tap}: Add to your mana pool one mana of any color in your commander's color identity. If you spend this mana to cast your commander, it enters the battlefield with a number of +1/+1 counters on it equal to the number of times it's been cast from the command zone this game.
|
||||
Ability ability = new CommanderColorIdentityManaAbility(new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability, new OpalPalaceWatcher());
|
||||
|
||||
ability = new SimpleStaticAbility(Zone.ALL, new OpalPalaceEntersBattlefieldEffect());
|
||||
ability.setRuleVisible(false);
|
||||
this.addAbility(ability);
|
||||
|
||||
this.addWatcher(new OpalPalaceWatcher());
|
||||
}
|
||||
|
||||
public OpalPalace(final OpalPalace card) {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class PhantomNantuko extends CardImpl {
|
|||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// Phantom Nantuko enters the battlefield with two +1/+1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2), true)));
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2), true), "with two +1/+1 counters on it"));
|
||||
// If damage would be dealt to Phantom Nantuko, prevent that damage. Remove a +1/+1 counter from Phantom Nantuko.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PhantomNantukoPreventionEffect()));
|
||||
// {tap}: Put a +1/+1 counter on Phantom Nantuko.
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ public class AngelOfTheDireHour extends CardImpl {
|
|||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new ExileAllEffect(new FilterAttackingCreature("attacking creatures")), new CastFromHandCondition(),
|
||||
" if you cast it from your hand, exile all attacking creatures"));
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.addAbility(ability, new CastFromHandWatcher());
|
||||
}
|
||||
|
||||
public AngelOfTheDireHour(final AngelOfTheDireHour card) {
|
||||
|
|
|
|||
|
|
@ -68,8 +68,7 @@ public class BreachingLeviathan extends CardImpl {
|
|||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new BreachingLeviathanEffect(), new CastFromHandCondition(),
|
||||
"if you cast it from your hand, tap all nonblue creatures. Those creatures don't untap during their controllers' next untap steps"));
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.addAbility(ability, new CastFromHandWatcher());
|
||||
}
|
||||
|
||||
public BreachingLeviathan(final BreachingLeviathan card) {
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ public class ContainmentPriest extends CardImpl {
|
|||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
// If a nontoken creature would enter the battlefield and it wasn't cast, exile it instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ContainmentPriestReplacementEffect()));
|
||||
this.addWatcher(new CreatureCastWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ContainmentPriestReplacementEffect()), new CreatureCastWatcher());
|
||||
}
|
||||
|
||||
public ContainmentPriest(final ContainmentPriest card) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class ImpactResonance extends CardImpl {
|
|||
effect.setText("{this} deals X damage divided as you choose among any number of target creatures, where X is the greatest amount of damage dealt by a source to a permanent or player this turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue));
|
||||
this.addWatcher(new GreatestAmountOfDamageWatcher());
|
||||
this.getSpellAbility().addWatcher(new GreatestAmountOfDamageWatcher());
|
||||
}
|
||||
|
||||
public ImpactResonance(final ImpactResonance card) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class SpoilsOfBlood extends CardImpl {
|
|||
|
||||
// Put an X/X black Horror creature token onto the battlefield, where X is the number of creatures that died this turn.
|
||||
this.getSpellAbility().addEffect(new SpoilsOfBloodEffect());
|
||||
this.addWatcher(new CreaturesDiedThisTurnWatcher());
|
||||
this.getSpellAbility().addWatcher(new CreaturesDiedThisTurnWatcher());
|
||||
}
|
||||
|
||||
public SpoilsOfBlood(final SpoilsOfBlood card) {
|
||||
|
|
|
|||
|
|
@ -81,9 +81,8 @@ public class DungeonGeists extends CardImpl {
|
|||
ability.addEffect(new DungeonGeistsEffect());
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability, new DungeonGeistsWatcher());
|
||||
// watcher needed to send normal events to Dungeon Geists ReplacementEffect
|
||||
this.addWatcher(new DungeonGeistsWatcher());
|
||||
}
|
||||
|
||||
public DungeonGeists(final DungeonGeists card) {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class Flamebreak extends CardImpl {
|
|||
// Flamebreak deals 3 damage to each creature without flying and each player. Creatures dealt damage this way can't be regenerated this turn.
|
||||
this.getSpellAbility().addEffect(new DamageEverythingEffect(new StaticValue(3), filter1));
|
||||
this.getSpellAbility().addEffect(new FlamebreakCantRegenerateEffect());
|
||||
this.addWatcher(new DamagedByWatcher());
|
||||
this.getSpellAbility().addWatcher(new DamagedByWatcher());
|
||||
}
|
||||
|
||||
public Flamebreak(final Flamebreak card) {
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ public class CryptChampion extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CryptChampionEffect()));
|
||||
|
||||
// When Crypt Champion enters the battlefield, sacrifice it unless {R} was spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.R)), false));
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.R)), false), new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public CryptChampion(final CryptChampion card) {
|
||||
|
|
|
|||
|
|
@ -63,8 +63,7 @@ public class PatagiaViper extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PatagiaViperSnakeToken(), 2), false));
|
||||
|
||||
// When Patagia Viper enters the battlefield, sacrifice it unless {U} was spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false));
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.U)), false), new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public PatagiaViper(final PatagiaViper card) {
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ public class ReiverDemon extends CardImpl {
|
|||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new DestroyAllEffect(filter), new CastFromHandCondition(),
|
||||
"if you cast it from your hand, destroy all nonartifact, nonblack creatures. They can't be regenerated"));
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
this.addAbility(ability, new CastFromHandWatcher());
|
||||
}
|
||||
|
||||
public ReiverDemon(final ReiverDemon card) {
|
||||
|
|
|
|||
|
|
@ -43,14 +43,12 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.effects.common.continious.GainControlTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledEnchantmentPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPlaneswalkerPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -70,13 +68,8 @@ public class CatchRelease extends SplitCard {
|
|||
super(ownerId, 125, "Catch", "Release", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{U}{R}", "{4}{R}{W}",true);
|
||||
this.expansionSetCode = "DGM";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Catch
|
||||
// Gain control of target permanent until end of turn. Untap it. It gains haste until end of turn.
|
||||
getLeftHalfCard().getColor().setRed(true);
|
||||
getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(new FilterPermanent()));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
||||
|
|
@ -84,7 +77,6 @@ public class CatchRelease extends SplitCard {
|
|||
|
||||
// Release
|
||||
// Each player sacrifices an artifact, a creature, an enchantment, a land, and a planeswalker.
|
||||
getRightHalfCard().getColor().setGreen(true);
|
||||
getRightHalfCard().getSpellAbility().addEffect(new ReleaseSacrificeEffect());
|
||||
|
||||
}
|
||||
|
|
@ -101,20 +93,6 @@ public class CatchRelease extends SplitCard {
|
|||
|
||||
class ReleaseSacrificeEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterArtifactPermanent filter1 = new FilterArtifactPermanent("artifact you control");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature you control");
|
||||
private static final FilterEnchantmentPermanent filter3 = new FilterEnchantmentPermanent("enchantment you control");
|
||||
private static final FilterLandPermanent filter4 = new FilterLandPermanent("land you control");
|
||||
private static final FilterPlaneswalkerPermanent filter5 = new FilterPlaneswalkerPermanent("planeswalker you control");
|
||||
|
||||
static {
|
||||
filter1.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter2.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter3.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter4.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter5.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public ReleaseSacrificeEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
staticText = "Each player sacrifices an artifact, a creature, an enchantment, a land, and a planeswalker";
|
||||
|
|
@ -126,7 +104,7 @@ class ReleaseSacrificeEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
List<UUID> chosen = new ArrayList<UUID>();
|
||||
List<UUID> chosen = new ArrayList<>();
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
|
|
@ -134,18 +112,11 @@ class ReleaseSacrificeEffect extends OneShotEffect {
|
|||
for (UUID playerId : controller.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
||||
Target target1 = new TargetControlledPermanent(1, 1, filter1, false);
|
||||
Target target2 = new TargetControlledPermanent(1, 1, filter2, false);
|
||||
Target target3 = new TargetControlledPermanent(1, 1, filter3, false);
|
||||
Target target4 = new TargetControlledPermanent(1, 1, filter4, false);
|
||||
Target target5 = new TargetControlledPermanent(1, 1, filter5, false);
|
||||
|
||||
|
||||
target1.setNotTarget(false);
|
||||
target2.setNotTarget(false);
|
||||
target3.setNotTarget(false);
|
||||
target4.setNotTarget(false);
|
||||
target5.setNotTarget(false);
|
||||
Target target1 = new TargetControlledPermanent(1, 1, new FilterControlledArtifactPermanent(), true);
|
||||
Target target2 = new TargetControlledPermanent(1, 1, new FilterControlledCreaturePermanent(), true);
|
||||
Target target3 = new TargetControlledPermanent(1, 1, new FilterControlledEnchantmentPermanent(), true);
|
||||
Target target4 = new TargetControlledPermanent(1, 1, new FilterControlledLandPermanent(), true);
|
||||
Target target5 = new TargetControlledPermanent(1, 1, new FilterControlledPlaneswalkerPermanent(), true);
|
||||
|
||||
if (target1.canChoose(player.getId(), game)) {
|
||||
while (player.isInGame() && !target1.isChosen() && target1.canChoose(player.getId(), game)) {
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ public class NotionThief extends CardImpl {
|
|||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
// If an opponent would draw a card except the first one he or she draws in each of his or her draw steps, instead that player skips that draw and you draw a card.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NotionThiefReplacementEffect()));
|
||||
this.addWatcher(new CardsDrawnDuringDrawStepWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NotionThiefReplacementEffect()), new CardsDrawnDuringDrawStepWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class RestoreThePeace extends CardImpl {
|
|||
|
||||
// Return each creature that dealt damage this turn to its owner's hand.
|
||||
this.getSpellAbility().addEffect(new RestoreThePeaceEffect());
|
||||
this.addWatcher(new SourceDidDamageWatcher());
|
||||
this.getSpellAbility().addWatcher(new SourceDidDamageWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,14 +59,12 @@ public class ScionOfVituGhazi extends CardImpl {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
this.addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// When Scion of Vitu-Ghazi enters the battlefield, if you cast it from your hand, put a 1/1 white Bird creature token with flying onto the battlefield, then populate.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new ConditionalOneShotEffect(new CreateTokenEffect(new BirdToken()), new CastFromHandCondition(),
|
||||
"if you cast it from your hand, put a 1/1 white Bird creature token with flying onto the battlefield,"));
|
||||
ability.addEffect(new PopulateEffect("then"));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability, new CastFromHandWatcher());
|
||||
}
|
||||
|
||||
public ScionOfVituGhazi (final ScionOfVituGhazi card) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class BatwingBrume extends CardImpl {
|
|||
new BatwingBrumeEffect(),
|
||||
new ManaWasSpentCondition(ColoredManaSymbol.B), "Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast {this}"));
|
||||
this.addInfo("Info1", "<i>(Do both if {W}{B} was spent.)<i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class CankerousThirst extends CardImpl {
|
|||
"If {G} was spent to cast {this}, you may have target creature get +3/+3 until end of turn"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.addInfo("Info1", "<i>(Do both if {B}{G} was spent.)<i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public CankerousThirst(final CankerousThirst card) {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,7 @@ public class DreamThief extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Dream Thief enters the battlefield, draw a card if you've cast another blue spell this turn.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), new CastBlueSpellThisTurnCondition(), rule)));
|
||||
this.addWatcher(new DreamThiefWatcher(this.getId()));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), new CastBlueSpellThisTurnCondition(), rule)), new DreamThiefWatcher(this.getId()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ public class GroundlingPouncer extends CardImpl {
|
|||
Effect effect2 = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, false, true);
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{G/U}"), condition, rule);
|
||||
ability.addEffect(effect2);
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new ActivatedAbilityUsedThisTurnWatcher());
|
||||
this.addAbility(ability, new ActivatedAbilityUsedThisTurnWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ public class HotheadedGiant extends CardImpl {
|
|||
|
||||
// Hotheaded Giant enters the battlefield with two -1/-1 counters on it unless you've cast another red spell this turn.
|
||||
Condition condition = new CastRedSpellThisTurnCondition();
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)), new InvertCondition(condition), ""), "with two -1/-1 counters on it unless you've cast another red spell this turn"));
|
||||
this.addWatcher(new HotHeadedGiantWatcher(this.getId()));
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)), new InvertCondition(condition), ""), "with two -1/-1 counters on it unless you've cast another red spell this turn"), new HotHeadedGiantWatcher(this.getId()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class InvertTheSkies extends CardImpl {
|
|||
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.U)),
|
||||
"and creatures you control gain flying until end of turn if {U} was spent to cast it"));
|
||||
this.addInfo("Info1", "<i>(Do both if {G}{U} was spent.)<i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public InvertTheSkies(final InvertTheSkies card) {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class Moonhold extends CardImpl {
|
|||
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W))));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.addInfo("Info1", "<i>(Do both if {R}{W} was spent.)</i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public Moonhold(final Moonhold card) {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class SoulReap extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new SoulReapEffect(), new CastBlackSpellThisTurnCondition(), rule));
|
||||
this.addWatcher(new SoulReapWatcher(this.getId()));
|
||||
this.getSpellAbility().addWatcher(new SoulReapWatcher(this.getId()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ public class TalarasBattalion extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Cast Talara's Battalion only if you've cast another green spell this turn.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new TalarasBattalionEffect()));
|
||||
this.addWatcher(new TalarasBattalionWatcher(this.getId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new TalarasBattalionEffect()), new TalarasBattalionWatcher(this.getId()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class UnnervingAssault extends CardImpl {
|
|||
new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false),
|
||||
new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/0 until end of turn if {R} was spent to cast it"));
|
||||
this.addInfo("Info1", "<i>(Do both if {U}{R} was spent.)</i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class WavesOfAggression extends CardImpl {
|
|||
this.color.setWhite(true);
|
||||
|
||||
// Untap all creatures that attacked this turn. After this main phase, there is an additional combat phase followed by an additional main phase.
|
||||
this.addWatcher(new AttackedThisTurnWatcher());
|
||||
this.getSpellAbility().addWatcher(new AttackedThisTurnWatcher());
|
||||
this.getSpellAbility().addEffect(new WavesOfAggressionUntapEffect());
|
||||
this.getSpellAbility().addEffect(new WavesOfAggressionAddPhasesEffect());
|
||||
// Retrace
|
||||
|
|
|
|||
|
|
@ -37,12 +37,10 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledEnchantmentPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -59,8 +57,6 @@ public class Cataclysm extends CardImpl {
|
|||
super(ownerId, 3, "Cataclysm", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}");
|
||||
this.expansionSetCode = "EXO";
|
||||
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Each player chooses from the permanents he or she controls an artifact, a creature, an enchantment, and a land, then sacrifices the rest.
|
||||
this.getSpellAbility().addEffect(new CataclysmEffect());
|
||||
}
|
||||
|
|
@ -77,18 +73,6 @@ public class Cataclysm extends CardImpl {
|
|||
|
||||
class CataclysmEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterArtifactPermanent filter1 = new FilterArtifactPermanent("artifact you control");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature you control");
|
||||
private static final FilterEnchantmentPermanent filter3 = new FilterEnchantmentPermanent("enchantment you control");
|
||||
private static final FilterLandPermanent filter4 = new FilterLandPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter1.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter2.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter3.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter4.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public CataclysmEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
staticText = "Each player chooses from among the permanents he or she controls an artifact, a creature, an enchantment, and a land, then sacrifices the rest";
|
||||
|
|
@ -105,20 +89,14 @@ class CataclysmEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getPlayerList()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
||||
Target target1 = new TargetControlledPermanent(1, 1, filter1, false);
|
||||
Target target2 = new TargetControlledPermanent(1, 1, filter2, false);
|
||||
Target target3 = new TargetControlledPermanent(1, 1, filter3, false);
|
||||
Target target4 = new TargetControlledPermanent(1, 1, filter4, false);
|
||||
|
||||
|
||||
target1.setNotTarget(true);
|
||||
target2.setNotTarget(true);
|
||||
target3.setNotTarget(true);
|
||||
target4.setNotTarget(true);
|
||||
Target target1 = new TargetControlledPermanent(1, 1, new FilterControlledArtifactPermanent(), true);
|
||||
Target target2 = new TargetControlledPermanent(1, 1, new FilterControlledCreaturePermanent(), true);
|
||||
Target target3 = new TargetControlledPermanent(1, 1, new FilterControlledEnchantmentPermanent(), true);
|
||||
Target target4 = new TargetControlledPermanent(1, 1, new FilterControlledLandPermanent(), true);
|
||||
|
||||
if (target1.canChoose(player.getId(), game)) {
|
||||
while (player.isInGame() && !target1.isChosen() && target1.canChoose(player.getId(), game)) {
|
||||
player.choose(Outcome.Benefit, target1, source.getSourceId(), game);
|
||||
player.chooseTarget(Outcome.Benefit, target1, source, game);
|
||||
}
|
||||
Permanent artifact = game.getPermanent(target1.getFirstTarget());
|
||||
if (artifact != null) {
|
||||
|
|
@ -129,7 +107,7 @@ class CataclysmEffect extends OneShotEffect {
|
|||
|
||||
if (target2.canChoose(player.getId(), game)) {
|
||||
while (player.isInGame() && !target2.isChosen() && target2.canChoose(player.getId(), game)) {
|
||||
player.choose(Outcome.Benefit, target2, source.getSourceId(), game);
|
||||
player.chooseTarget(Outcome.Benefit, target2, source, game);
|
||||
}
|
||||
Permanent creature = game.getPermanent(target2.getFirstTarget());
|
||||
if (creature != null) {
|
||||
|
|
@ -140,7 +118,7 @@ class CataclysmEffect extends OneShotEffect {
|
|||
|
||||
if (target3.canChoose(player.getId(), game)) {
|
||||
while (player.isInGame() && !target3.isChosen() && target3.canChoose(player.getId(), game)) {
|
||||
player.choose(Outcome.Benefit, target3, source.getSourceId(), game);
|
||||
player.chooseTarget(Outcome.Benefit, target3, source, game);
|
||||
}
|
||||
Permanent enchantment = game.getPermanent(target3.getFirstTarget());
|
||||
if (enchantment != null) {
|
||||
|
|
@ -151,7 +129,7 @@ class CataclysmEffect extends OneShotEffect {
|
|||
|
||||
if (target4.canChoose(player.getId(), game)) {
|
||||
while (player.isInGame() && !target4.isChosen() && target4.canChoose(player.getId(), game)) {
|
||||
player.choose(Outcome.Benefit, target4, source.getSourceId(), game);
|
||||
player.chooseTarget(Outcome.Benefit, target4, source, game);
|
||||
}
|
||||
Permanent land = game.getPermanent(target4.getFirstTarget());
|
||||
if (land != null) {
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter() +1, game);
|
||||
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
|
||||
if (card.moveToZone(Zone.BATTLEFIELD, newSource.getSourceId(), game, false)) {
|
||||
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
|
||||
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId())) {
|
||||
game.informPlayers(new StringBuilder(controller.getName())
|
||||
.append(" puts facedown card from exile onto the battlefield").toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,8 +92,7 @@ public class SoulfireGrandMaster extends CardImpl {
|
|||
// Instant and sorcery spells you control have lifelink.
|
||||
Effect effect = new GainAbilitySpellsEffect(LifelinkAbility.getInstance(), filter);
|
||||
effect.setText("Instant and sorcery spells you control have lifelink");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
this.addWatcher(new SoulfireGrandMasterLeavesStackWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new SoulfireGrandMasterLeavesStackWatcher());
|
||||
|
||||
// {2}{U/R}{U/R}: The next time you cast an instant or sorcery spell from your hand this turn, put that card into your hand instead of your graveyard as it resolves.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulfireGrandMasterCastFromHandReplacementEffect(), new ManaCostsImpl("{2}{U/R}{U/R}")));
|
||||
|
|
|
|||
73
Mage.Sets/src/mage/sets/fifthdawn/ArmedResponse.java
Normal file
73
Mage.Sets/src/mage/sets/fifthdawn/ArmedResponse.java
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthdawn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class ArmedResponse extends CardImpl {
|
||||
|
||||
private static final FilterControlledArtifactPermanent filter = new FilterControlledArtifactPermanent("Equipment you control");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Equipment"));
|
||||
}
|
||||
|
||||
|
||||
public ArmedResponse(UUID ownerId) {
|
||||
super(ownerId, 2, "Armed Response", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
this.expansionSetCode = "5DN";
|
||||
|
||||
// Armed Response deals damage to target attacking creature equal to the number of Equipment you control.
|
||||
Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter));
|
||||
effect.setText("{source} deals damage to target attacking creature equal to the number of Equipment you control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetAttackingCreature());
|
||||
}
|
||||
|
||||
public ArmedResponse(final ArmedResponse card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmedResponse copy() {
|
||||
return new ArmedResponse(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthdawn;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToYouEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterObject;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class CircleOfProtectionArtifacts extends CardImpl {
|
||||
|
||||
private static final FilterObject filter = new FilterObject("artifact source");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public CircleOfProtectionArtifacts(UUID ownerId) {
|
||||
super(ownerId, 8, "Circle of Protection: Artifacts", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
this.expansionSetCode = "5DN";
|
||||
|
||||
// {2}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage.
|
||||
Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter);
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("2")));
|
||||
}
|
||||
|
||||
public CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CircleOfProtectionArtifacts copy() {
|
||||
return new CircleOfProtectionArtifacts(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -37,8 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +58,7 @@ public class CosmicLarva extends CardImpl {
|
|||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// At the beginning of your upkeep, sacrifice Cosmic Larva unless you sacrifice two lands.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterLandPermanent("two lands"), true))), TargetController.YOU, false));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true))), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public CosmicLarva(final CosmicLarva card) {
|
||||
|
|
|
|||
89
Mage.Sets/src/mage/sets/fifthdawn/EnsouledScimitar.java
Normal file
89
Mage.Sets/src/mage/sets/fifthdawn/EnsouledScimitar.java
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthdawn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
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.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class EnsouledScimitar extends CardImpl {
|
||||
|
||||
public EnsouledScimitar(UUID ownerId) {
|
||||
super(ownerId, 119, "Ensouled Scimitar", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.expansionSetCode = "5DN";
|
||||
this.subtype.add("Equipment");
|
||||
|
||||
// {3}: Ensouled Scimitar becomes a 1/5 Spirit artifact creature with flying until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new EnsouledScimitarToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{3}")));
|
||||
// Equipped creature gets +1/+5.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 5)));
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl("{2}")));
|
||||
}
|
||||
|
||||
public EnsouledScimitar(final EnsouledScimitar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnsouledScimitar copy() {
|
||||
return new EnsouledScimitar(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EnsouledScimitarToken extends Token {
|
||||
|
||||
public EnsouledScimitarToken() {
|
||||
super("Pincher", "1/5 Spirit artifact creature with flying");
|
||||
setOriginalExpansionSetCode("5ND");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Spirit");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(5);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
|
@ -54,13 +54,12 @@ public class KrarkClanEngineers extends CardImpl {
|
|||
this.subtype.add("Goblin");
|
||||
this.subtype.add("Artificer");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {R}, Sacrifice two artifacts: Destroy target artifact.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterArtifactPermanent("two artifacts"), true)));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledArtifactPermanent("two artifacts"), true)));
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public class KrarkClanOgre extends CardImpl {
|
|||
|
||||
// {R}, Sacrifice an artifact: Target creature can't block this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBlockTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, new FilterArtifactPermanent("an artifact"), true)));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, new FilterControlledArtifactPermanent("an artifact"), true)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
64
Mage.Sets/src/mage/sets/fifthdawn/Retaliate.java
Normal file
64
Mage.Sets/src/mage/sets/fifthdawn/Retaliate.java
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthdawn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.DamagedPlayerThisTurnPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class Retaliate extends CardImpl {
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures that dealt damage to you this turn");
|
||||
static {
|
||||
filter.add(new DamagedPlayerThisTurnPredicate(TargetController.YOU));
|
||||
}
|
||||
public Retaliate(UUID ownerId) {
|
||||
super(ownerId, 13, "Retaliate", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{W}{W}");
|
||||
this.expansionSetCode = "5DN";
|
||||
|
||||
// Destroy all creatures that dealt damage to you this turn.
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(filter));
|
||||
}
|
||||
|
||||
public Retaliate(final Retaliate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Retaliate copy() {
|
||||
return new Retaliate(this);
|
||||
}
|
||||
}
|
||||
79
Mage.Sets/src/mage/sets/fifthdawn/StasisCocoon.java
Normal file
79
Mage.Sets/src/mage/sets/fifthdawn/StasisCocoon.java
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthdawn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockAttackActivateAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class StasisCocoon extends CardImpl {
|
||||
|
||||
public StasisCocoon(UUID ownerId) {
|
||||
super(ownerId, 18, "Stasis Cocoon", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
this.expansionSetCode = "5DN";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant artifact
|
||||
TargetPermanent auraTarget = new TargetArtifactPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
// Enchanted artifact can't attack or block, and its activated abilities can't be activated.
|
||||
Effect effect = new CantBlockAttackActivateAttachedEffect();
|
||||
effect.setText("Enchanted artifact can't attack or block, and its activated abilities can't be activated");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
}
|
||||
|
||||
public StasisCocoon(final StasisCocoon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StasisCocoon copy() {
|
||||
return new StasisCocoon(this);
|
||||
}
|
||||
}
|
||||
160
Mage.Sets/src/mage/sets/fifthdawn/SummonersEgg.java
Normal file
160
Mage.Sets/src/mage/sets/fifthdawn/SummonersEgg.java
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthdawn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
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.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class SummonersEgg extends CardImpl {
|
||||
|
||||
public SummonersEgg(UUID ownerId) {
|
||||
super(ownerId, 157, "Summoner's Egg", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
this.expansionSetCode = "5DN";
|
||||
this.subtype.add("Construct");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Imprint - When Summoner's Egg enters the battlefield, you may exile a card from your hand face down.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SummonersEggImprintEffect(), true, "<i>Imprint - </i>"));
|
||||
// When Summoner's Egg dies, turn the exiled card face up. If it's a creature card, put it onto the battlefield under your control.
|
||||
this.addAbility(new DiesTriggeredAbility(new SummonersEggPutOntoBattlefieldEffect()));
|
||||
}
|
||||
|
||||
public SummonersEgg(final SummonersEgg card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SummonersEgg copy() {
|
||||
return new SummonersEgg(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SummonersEggImprintEffect extends OneShotEffect {
|
||||
|
||||
public SummonersEggImprintEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile a card from your hand face down";
|
||||
}
|
||||
|
||||
public SummonersEggImprintEffect(SummonersEggImprintEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (controller != null) {
|
||||
if (controller.getHand().size() > 0) {
|
||||
TargetCard target = new TargetCard(Zone.HAND, new FilterCard());
|
||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
||||
&& controller.choose(Outcome.Benefit, controller.getHand(), target, game)) {
|
||||
Card card = controller.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
card.setFaceDown(true);
|
||||
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getLogName() +" (Imprint)", source.getSourceId(), game, Zone.HAND);
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
permanent.imprint(card.getId(), game);
|
||||
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card]"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public SummonersEggImprintEffect copy() {
|
||||
return new SummonersEggImprintEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SummonersEggPutOntoBattlefieldEffect extends OneShotEffect {
|
||||
|
||||
public SummonersEggPutOntoBattlefieldEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "turn the exiled card face up. If it's a creature card, put it onto the battlefield under your control";
|
||||
}
|
||||
|
||||
public SummonersEggPutOntoBattlefieldEffect(final SummonersEggPutOntoBattlefieldEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SummonersEggPutOntoBattlefieldEffect copy() {
|
||||
return new SummonersEggPutOntoBattlefieldEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Permanent SummonersEgg = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (SummonersEgg != null && SummonersEgg.getImprinted() != null && !SummonersEgg.getImprinted().isEmpty()) {
|
||||
Card imprintedCard = game.getCard(SummonersEgg.getImprinted().get(0));
|
||||
if (imprintedCard != null && game.getState().getZone(imprintedCard.getId()).equals(Zone.EXILED)) {
|
||||
//turn the exiled card face up.
|
||||
imprintedCard.turnFaceUp(game, source.getControllerId());
|
||||
//If it's a creature card,
|
||||
if(imprintedCard.getCardType().contains(CardType.CREATURE)){
|
||||
//put it onto the battlefield under your control
|
||||
imprintedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
82
Mage.Sets/src/mage/sets/fifthdawn/SummoningStation.java
Normal file
82
Mage.Sets/src/mage/sets/fifthdawn/SummoningStation.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthdawn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class SummoningStation extends CardImpl {
|
||||
|
||||
public SummoningStation(UUID ownerId) {
|
||||
super(ownerId, 158, "Summoning Station", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{7}");
|
||||
this.expansionSetCode = "5DN";
|
||||
|
||||
// {tap}: Put a 2/2 colorless Pincher creature token onto the battlefield.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,new CreateTokenEffect(new PincherToken()), new TapSourceCost()));
|
||||
// Whenever an artifact is put into a graveyard from the battlefield, you may untap Summoning Station.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new UntapSourceEffect(),true, new FilterArtifactPermanent(), false));
|
||||
}
|
||||
|
||||
public SummoningStation(final SummoningStation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SummoningStation copy() {
|
||||
return new SummoningStation(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PincherToken extends Token {
|
||||
|
||||
public PincherToken() {
|
||||
super("Pincher", "2/2 colorless Pincher creature token");
|
||||
setOriginalExpansionSetCode("5ND");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Pincher");
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifhedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class CircleOfProtectionArtifacts extends mage.sets.fifthdawn.CircleOfProtectionArtifacts {
|
||||
|
||||
public CircleOfProtectionArtifacts(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 292;
|
||||
this.expansionSetCode = "5ED";
|
||||
}
|
||||
|
||||
public CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CircleOfProtectionArtifacts copy() {
|
||||
return new CircleOfProtectionArtifacts(this);
|
||||
}
|
||||
}
|
||||
52
Mage.Sets/src/mage/sets/fifthedition/ForceOfNature.java
Normal file
52
Mage.Sets/src/mage/sets/fifthedition/ForceOfNature.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class ForceOfNature extends mage.sets.fourthedition.ForceOfNature {
|
||||
|
||||
public ForceOfNature(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 156;
|
||||
this.expansionSetCode = "5ED";
|
||||
}
|
||||
|
||||
public ForceOfNature(final ForceOfNature card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForceOfNature copy() {
|
||||
return new ForceOfNature(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -64,9 +64,7 @@ public class SylvanLibrary extends CardImpl {
|
|||
this.color.setGreen(true);
|
||||
|
||||
// At the beginning of your draw step, you may draw two additional cards. If you do, choose two cards in your hand drawn this turn. For each of those cards, pay 4 life or put the card on top of your library.
|
||||
this.addAbility(new BeginningOfDrawTriggeredAbility(new SylvanLibraryEffect(), TargetController.YOU, true));
|
||||
|
||||
this.addWatcher(new CardsDrawnThisTurnWatcher());
|
||||
this.addAbility(new BeginningOfDrawTriggeredAbility(new SylvanLibraryEffect(), TargetController.YOU, true), new CardsDrawnThisTurnWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fourthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class CircleOfProtectionArtifacts extends mage.sets.fifthdawn.CircleOfProtectionArtifacts {
|
||||
|
||||
public CircleOfProtectionArtifacts(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 263;
|
||||
this.expansionSetCode = "4ED";
|
||||
}
|
||||
|
||||
public CircleOfProtectionArtifacts(final CircleOfProtectionArtifacts card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CircleOfProtectionArtifacts copy() {
|
||||
return new CircleOfProtectionArtifacts(this);
|
||||
}
|
||||
}
|
||||
108
Mage.Sets/src/mage/sets/fourthedition/ForceOfNature.java
Normal file
108
Mage.Sets/src/mage/sets/fourthedition/ForceOfNature.java
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.fourthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class ForceOfNature extends CardImpl {
|
||||
|
||||
public ForceOfNature(UUID ownerId) {
|
||||
super(ownerId, 129, "Force of Nature", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}{G}{G}");
|
||||
this.expansionSetCode = "4ED";
|
||||
this.subtype.add("Elemental");
|
||||
this.power = new MageInt(8);
|
||||
this.toughness = new MageInt(8);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// At the beginning of your upkeep, Force of Nature deals 8 damage to you unless you pay {G}{G}{G}{G}.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ForceOfNatureEffect(), TargetController.YOU, false));
|
||||
|
||||
}
|
||||
|
||||
public ForceOfNature(final ForceOfNature card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForceOfNature copy() {
|
||||
return new ForceOfNature(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ForceOfNatureEffect extends OneShotEffect {
|
||||
|
||||
public ForceOfNatureEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "{this} deals 8 damage to you unless you pay {G}{G}{G}{G}";
|
||||
}
|
||||
|
||||
public ForceOfNatureEffect(final ForceOfNatureEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForceOfNatureEffect copy() {
|
||||
return new ForceOfNatureEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cost cost = new ManaCostsImpl("{G}{G}{G}{G}");
|
||||
String message = "Would you like to pay {G}{G}{G}{G} to prevent taking 8 damage from {this}?";
|
||||
if (!(controller.chooseUse(Outcome.Benefit, message, game)
|
||||
&& cost.pay(source, game, source.getSourceId(), controller.getId(), false))) {
|
||||
controller.damage(8, source.getSourceId(), game, false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ public class SirensCall extends CardImpl {
|
|||
|
||||
// At the beginning of the next end step, destroy all non-Wall creatures that player controls that didn't attack this turn. Ignore this effect for each creature the player didn't control continuously since the beginning of the turn.
|
||||
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SirensCallDestroyEffect())));
|
||||
this.addWatcher(new AttackedThisTurnWatcher());
|
||||
this.getSpellAbility().addWatcher(new AttackedThisTurnWatcher());
|
||||
}
|
||||
|
||||
public SirensCall(final SirensCall card) {
|
||||
|
|
|
|||
|
|
@ -59,8 +59,7 @@ public class PatriciansScorn extends CardImpl {
|
|||
this.color.setWhite(true);
|
||||
|
||||
// If you've cast another white spell this turn, you may cast Patrician's Scorn without paying its mana cost.
|
||||
this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()));
|
||||
this.addWatcher(new PatriciansScornWatcher());
|
||||
this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()), new PatriciansScornWatcher());
|
||||
// Destroy all enchantments.
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,10 +56,8 @@ public class RiverOfTears extends CardImpl {
|
|||
new BasicManaEffect(Mana.BlueMana),
|
||||
LandfallCondition.getInstance(),
|
||||
"Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead"),
|
||||
new TapSourceCost()));
|
||||
|
||||
|
||||
this.addWatcher(new LandfallWatcher());
|
||||
new TapSourceCost()),
|
||||
new LandfallWatcher());
|
||||
}
|
||||
|
||||
public RiverOfTears(final RiverOfTears card) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class ScoutsWarning extends CardImpl {
|
|||
|
||||
// The next creature card you play this turn can be played as though it had flash.
|
||||
this.getSpellAbility().addEffect(new ScoutsWarningAsThoughEffect());
|
||||
this.addWatcher(new ScoutsWarningWatcher());
|
||||
this.getSpellAbility().addWatcher(new ScoutsWarningWatcher());
|
||||
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ class YixlidJailerEffect extends ContinuousEffectImpl {
|
|||
for (Card card : player.getGraveyard().getCards(game)) {
|
||||
if (card != null) {
|
||||
card.getAbilities().clear(); // Will the abilities ever come back????
|
||||
// TODO: Fix that (LevelX2)
|
||||
// game.getContinuousEffects().removeGainedEffectsForSource(card.getId());
|
||||
// game.getState().resetTriggersForSourceId(card.getId());
|
||||
Abilities abilities = game.getState().getAllOtherAbilities(card.getId());
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class AureliasFury extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
|
||||
this.getSpellAbility().addEffect(new AureliasFuryEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue));
|
||||
this.addWatcher(new AureliasFuryDamagedByWatcher());
|
||||
this.getSpellAbility().addWatcher(new AureliasFuryDamagedByWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,7 @@ import mage.constants.Rarity;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -52,17 +49,10 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class DevourFlesh extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
static{
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public DevourFlesh (UUID ownerId) {
|
||||
super(ownerId, 63, "Devour Flesh", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Target player sacrifices a creature, then gains life equal to that creature's toughness.
|
||||
this.getSpellAbility().addEffect(new DevourFleshSacrificeEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
|
@ -100,13 +90,12 @@ class DevourFleshSacrificeEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new ControllerIdPredicate(player.getId()));
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
int realCount = game.getBattlefield().countAll(filter, player.getId(), game);
|
||||
if (realCount > 0) {
|
||||
Target target = new TargetControlledPermanent(1, 1, filter, true);
|
||||
while (player.isInGame() && !target.isChosen() && target.canChoose(player.getId(), game)) {
|
||||
player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
|
||||
player.chooseTarget(Outcome.Sacrifice, target, source, game);
|
||||
}
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class ExecutionersSwing extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new BoostTargetEffect(-5,-5, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentThatDealtDamageThisTurn());
|
||||
|
||||
this.addWatcher(new SourceDidDamageWatcher());
|
||||
this.getSpellAbility().addWatcher(new SourceDidDamageWatcher());
|
||||
}
|
||||
|
||||
public ExecutionersSwing(final ExecutionersSwing card) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue