mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Merge remote-tracking branch 'refs/remotes/magefree/master' into cradle-to-the-grave
This commit is contained in:
commit
1f86a1cbf9
28 changed files with 1547 additions and 175 deletions
|
@ -152,13 +152,11 @@ class GuardianOfTazeemEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent land = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
Permanent land = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
||||||
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
|
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
|
||||||
if (land != null && targetCreature != null) {
|
if (land != null && targetCreature != null && land.hasSubtype("Island")) {
|
||||||
if (land.hasSubtype("Island")) {
|
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("that creature");
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("that creature");
|
||||||
effect.setTargetPointer(new FixedTarget(targetCreature, game));
|
effect.setTargetPointer(new FixedTarget(targetCreature, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,13 +27,15 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.commander;
|
package mage.sets.commander;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DoIfClashWonEffect;
|
import mage.abilities.effects.common.DoIfClashWonEffect;
|
||||||
import mage.abilities.effects.common.PreventAllDamageByAllEffect;
|
|
||||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||||
|
import mage.abilities.effects.common.PreventAllDamageByAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
@ -43,7 +45,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTargets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -55,7 +57,6 @@ public class PollenLullaby extends CardImpl {
|
||||||
super(ownerId, 26, "Pollen Lullaby", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
super(ownerId, 26, "Pollen Lullaby", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||||
this.expansionSetCode = "CMD";
|
this.expansionSetCode = "CMD";
|
||||||
|
|
||||||
|
|
||||||
// Prevent all combat damage that would be dealt this turn. Clash with an opponent. If you win, creatures that player controls don't untap during the player's next untap step.
|
// Prevent all combat damage that would be dealt this turn. Clash with an opponent. If you win, creatures that player controls don't untap during the player's next untap step.
|
||||||
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
|
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
|
||||||
this.getSpellAbility().addEffect(new DoIfClashWonEffect(new PollenLullabyEffect(), true, null));
|
this.getSpellAbility().addEffect(new DoIfClashWonEffect(new PollenLullabyEffect(), true, null));
|
||||||
|
@ -86,10 +87,13 @@ class PollenLullabyEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
for (Permanent creature: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) {
|
List<Permanent> doNotUntapNextUntapStep = new ArrayList<>();
|
||||||
creature.tap(game);
|
for (Permanent creature : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) {
|
||||||
|
doNotUntapNextUntapStep.add(creature);
|
||||||
|
}
|
||||||
|
if (!doNotUntapNextUntapStep.isEmpty()) {
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("This creature");
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("This creature");
|
||||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
effect.setTargetPointer(new FixedTargets(doNotUntapNextUntapStep, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -103,4 +107,3 @@ class PollenLullabyEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.commander2014;
|
package mage.sets.commander2014;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
|
@ -46,7 +48,7 @@ import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTargets;
|
||||||
import mage.watchers.common.CastFromHandWatcher;
|
import mage.watchers.common.CastFromHandWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,10 +107,14 @@ class BreachingLeviathanEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
|
List<Permanent> doNotUntapNextUntapStep = new ArrayList<>();
|
||||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
creature.tap(game);
|
creature.tap(game);
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect();
|
doNotUntapNextUntapStep.add(creature);
|
||||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
}
|
||||||
|
if (!doNotUntapNextUntapStep.isEmpty()) {
|
||||||
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("This creature");
|
||||||
|
effect.setTargetPointer(new FixedTargets(doNotUntapNextUntapStep, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -27,27 +27,25 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.darkascension;
|
package mage.sets.darkascension;
|
||||||
|
|
||||||
import mage.constants.CardType;
|
import java.util.ArrayList;
|
||||||
import mage.constants.Rarity;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.condition.common.FatefulHourCondition;
|
import mage.abilities.condition.common.FatefulHourCondition;
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||||
import mage.abilities.effects.common.PreventAllDamageByAllEffect;
|
import mage.abilities.effects.common.PreventAllDamageByAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.Rarity;
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
import mage.filter.common.FilterAttackingCreature;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.targetpointer.FixedTargets;
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
|
||||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
|
||||||
import mage.target.targetpointer.FixedTarget;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -59,7 +57,6 @@ public class ClingingMists extends CardImpl {
|
||||||
super(ownerId, 109, "Clinging Mists", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
super(ownerId, 109, "Clinging Mists", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
|
||||||
this.expansionSetCode = "DKA";
|
this.expansionSetCode = "DKA";
|
||||||
|
|
||||||
|
|
||||||
// Prevent all combat damage that would be dealt this turn.
|
// Prevent all combat damage that would be dealt this turn.
|
||||||
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(null, Duration.EndOfTurn, true));
|
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(null, Duration.EndOfTurn, true));
|
||||||
|
|
||||||
|
@ -94,10 +91,14 @@ class ClingingMistsEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
for (Permanent creature: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
List<Permanent> doNotUntapNextUntapStep = new ArrayList<>();
|
||||||
|
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
creature.tap(game);
|
creature.tap(game);
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect();
|
doNotUntapNextUntapStep.add(creature);
|
||||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
}
|
||||||
|
if (!doNotUntapNextUntapStep.isEmpty()) {
|
||||||
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("This creature");
|
||||||
|
effect.setTargetPointer(new FixedTargets(doNotUntapNextUntapStep, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
110
Mage.Sets/src/mage/sets/darksteel/ScreamsFromWithin.java
Normal file
110
Mage.Sets/src/mage/sets/darksteel/ScreamsFromWithin.java
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
/*
|
||||||
|
* 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.darksteel;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DiesAttachedTriggeredAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author spjspj
|
||||||
|
*/
|
||||||
|
public class ScreamsFromWithin extends CardImpl {
|
||||||
|
|
||||||
|
public ScreamsFromWithin(UUID ownerId) {
|
||||||
|
super(ownerId, 52, "Screams from Within", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
|
||||||
|
this.expansionSetCode = "DST";
|
||||||
|
this.subtype.add("Aura");
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets -1/-1.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-1, -1, Duration.WhileOnBattlefield)));
|
||||||
|
|
||||||
|
// When enchanted creature dies, return Screams from Within from your graveyard to the battlefield.
|
||||||
|
this.addAbility(new DiesAttachedTriggeredAbility(new ScreamsFromWithinEffect(), "enchanted creature"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScreamsFromWithin(final ScreamsFromWithin card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ScreamsFromWithin copy() {
|
||||||
|
return new ScreamsFromWithin(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScreamsFromWithinEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public ScreamsFromWithinEffect() {
|
||||||
|
super(Outcome.PutCardInPlay);
|
||||||
|
staticText = "return Screams from Within from your graveyard to the battlefield";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScreamsFromWithinEffect(final ScreamsFromWithinEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Card sourceEnchantmentCard = game.getCard(source.getSourceId());
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (sourceEnchantmentCard != null && player != null) {
|
||||||
|
return player.moveCards(sourceEnchantmentCard, Zone.BATTLEFIELD, source, game);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ScreamsFromWithinEffect copy() {
|
||||||
|
return new ScreamsFromWithinEffect(this);
|
||||||
|
}
|
||||||
|
}
|
74
Mage.Sets/src/mage/sets/iceage/HematiteTalisman.java
Normal file
74
Mage.Sets/src/mage/sets/iceage/HematiteTalisman.java
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* 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.iceage;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class HematiteTalisman extends CardImpl {
|
||||||
|
|
||||||
|
private final static FilterSpell filter = new FilterSpell("a red spell");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||||
|
}
|
||||||
|
|
||||||
|
public HematiteTalisman(UUID ownerId) {
|
||||||
|
super(ownerId, 295, "Hematite Talisman", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
this.expansionSetCode = "ICE";
|
||||||
|
|
||||||
|
// Whenever a player casts a red spell, you may pay {3}. If you do, untap target permanent.
|
||||||
|
Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new UntapTargetEffect(), new ManaCostsImpl("{3}")), filter, true);
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public HematiteTalisman(final HematiteTalisman card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HematiteTalisman copy() {
|
||||||
|
return new HematiteTalisman(this);
|
||||||
|
}
|
||||||
|
}
|
74
Mage.Sets/src/mage/sets/iceage/LapisLazuliTalisman.java
Normal file
74
Mage.Sets/src/mage/sets/iceage/LapisLazuliTalisman.java
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* 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.iceage;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class LapisLazuliTalisman extends CardImpl {
|
||||||
|
|
||||||
|
private final static FilterSpell filter = new FilterSpell("a blue spell");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||||
|
}
|
||||||
|
|
||||||
|
public LapisLazuliTalisman(UUID ownerId) {
|
||||||
|
super(ownerId, 302, "Lapis Lazuli Talisman", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
this.expansionSetCode = "ICE";
|
||||||
|
|
||||||
|
// Whenever a player casts a blue spell, you may pay {3}. If you do, untap target permanent.
|
||||||
|
Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new UntapTargetEffect(), new ManaCostsImpl("{3}")), filter, true);
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LapisLazuliTalisman(final LapisLazuliTalisman card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LapisLazuliTalisman copy() {
|
||||||
|
return new LapisLazuliTalisman(this);
|
||||||
|
}
|
||||||
|
}
|
74
Mage.Sets/src/mage/sets/iceage/MalachiteTalisman.java
Normal file
74
Mage.Sets/src/mage/sets/iceage/MalachiteTalisman.java
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* 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.iceage;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class MalachiteTalisman extends CardImpl {
|
||||||
|
|
||||||
|
private final static FilterSpell filter = new FilterSpell("a green spell");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MalachiteTalisman(UUID ownerId) {
|
||||||
|
super(ownerId, 303, "Malachite Talisman", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
this.expansionSetCode = "ICE";
|
||||||
|
|
||||||
|
// Whenever a player casts a green spell, you may pay {3}. If you do, untap target permanent.
|
||||||
|
Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new UntapTargetEffect(), new ManaCostsImpl("{3}")), filter, true);
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MalachiteTalisman(final MalachiteTalisman card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MalachiteTalisman copy() {
|
||||||
|
return new MalachiteTalisman(this);
|
||||||
|
}
|
||||||
|
}
|
74
Mage.Sets/src/mage/sets/iceage/NacreTalisman.java
Normal file
74
Mage.Sets/src/mage/sets/iceage/NacreTalisman.java
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* 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.iceage;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class NacreTalisman extends CardImpl {
|
||||||
|
|
||||||
|
private final static FilterSpell filter = new FilterSpell("a white spell");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||||
|
}
|
||||||
|
|
||||||
|
public NacreTalisman(UUID ownerId) {
|
||||||
|
super(ownerId, 304, "Nacre Talisman", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
this.expansionSetCode = "ICE";
|
||||||
|
|
||||||
|
// Whenever a player casts a white spell, you may pay {3}. If you do, untap target permanent.
|
||||||
|
Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new UntapTargetEffect(), new ManaCostsImpl("{3}")), filter, true);
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NacreTalisman(final NacreTalisman card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NacreTalisman copy() {
|
||||||
|
return new NacreTalisman(this);
|
||||||
|
}
|
||||||
|
}
|
74
Mage.Sets/src/mage/sets/iceage/OnyxTalisman.java
Normal file
74
Mage.Sets/src/mage/sets/iceage/OnyxTalisman.java
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* 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.iceage;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class OnyxTalisman extends CardImpl {
|
||||||
|
|
||||||
|
private final static FilterSpell filter = new FilterSpell("a black spell");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||||
|
}
|
||||||
|
|
||||||
|
public OnyxTalisman(UUID ownerId) {
|
||||||
|
super(ownerId, 306, "Onyx Talisman", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
this.expansionSetCode = "ICE";
|
||||||
|
|
||||||
|
// Whenever a player casts a black spell, you may pay {3}. If you do, untap target permanent.
|
||||||
|
Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new UntapTargetEffect(), new ManaCostsImpl("{3}")), filter, true);
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OnyxTalisman(final OnyxTalisman card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OnyxTalisman copy() {
|
||||||
|
return new OnyxTalisman(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,12 +27,14 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.invasion;
|
package mage.sets.invasion;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.PreventAllDamageByAllEffect;
|
|
||||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||||
|
import mage.abilities.effects.common.PreventAllDamageByAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
@ -43,7 +45,7 @@ import mage.filter.predicate.permanent.AttackingPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTargets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -55,7 +57,6 @@ public class Tangle extends CardImpl {
|
||||||
super(ownerId, 213, "Tangle", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
super(ownerId, 213, "Tangle", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
|
||||||
this.expansionSetCode = "INV";
|
this.expansionSetCode = "INV";
|
||||||
|
|
||||||
|
|
||||||
// Prevent all combat damage that would be dealt this turn.
|
// Prevent all combat damage that would be dealt this turn.
|
||||||
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
|
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
|
||||||
// Each attacking creature doesn't untap during its controller's next untap step.
|
// Each attacking creature doesn't untap during its controller's next untap step.
|
||||||
|
@ -99,9 +100,13 @@ class TangleEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
for (Permanent permanent :game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
List<Permanent> doNotUntapNextUntapStep = new ArrayList<>();
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect();
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
doNotUntapNextUntapStep.add(permanent);
|
||||||
|
}
|
||||||
|
if (!doNotUntapNextUntapStep.isEmpty()) {
|
||||||
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("This creature");
|
||||||
|
effect.setTargetPointer(new FixedTargets(doNotUntapNextUntapStep, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -25,24 +25,25 @@
|
||||||
* authors and should not be interpreted as representing official policies, either expressed
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package mage.sets.magic2010;
|
package mage.sets.magic2010;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTargets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -83,10 +84,15 @@ class SleepEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getFirstTarget());
|
Player player = game.getPlayer(source.getFirstTarget());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
for (Permanent creature: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) {
|
List<Permanent> doNotUntapNextUntapStep = new ArrayList<>();
|
||||||
|
for (Permanent creature : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) {
|
||||||
creature.tap(game);
|
creature.tap(game);
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect();
|
doNotUntapNextUntapStep.add(creature);
|
||||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
}
|
||||||
|
if (!doNotUntapNextUntapStep.isEmpty()) {
|
||||||
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("", player.getId());
|
||||||
|
effect.setText("those creatures don't untap during that player's next untap step");
|
||||||
|
effect.setTargetPointer(new FixedTargets(doNotUntapNextUntapStep, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
234
Mage.Sets/src/mage/sets/onslaught/CrypticGateway.java
Normal file
234
Mage.Sets/src/mage/sets/onslaught/CrypticGateway.java
Normal file
|
@ -0,0 +1,234 @@
|
||||||
|
/*
|
||||||
|
* 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.onslaught;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.costs.CostImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect;
|
||||||
|
import mage.abilities.keyword.ChangelingAbility;
|
||||||
|
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.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author spjspj
|
||||||
|
*/
|
||||||
|
public class CrypticGateway extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(new TappedPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
TargetControlledPermanent target;
|
||||||
|
|
||||||
|
public CrypticGateway(UUID ownerId) {
|
||||||
|
super(ownerId, 306, "Cryptic Gateway", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||||
|
this.expansionSetCode = "ONS";
|
||||||
|
|
||||||
|
// Tap two untapped creatures you control: You may put a creature card from your hand that shares a creature type with each creature tapped this way onto the battlefield.
|
||||||
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CrypticGatewayEffect(), new CrypticGatewayCost(new TargetControlledPermanent(filter))));
|
||||||
|
}
|
||||||
|
|
||||||
|
public CrypticGateway(final CrypticGateway card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CrypticGateway copy() {
|
||||||
|
return new CrypticGateway(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CrypticGatewayCost extends CostImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control");
|
||||||
|
private UUID targetCreatureId = null;
|
||||||
|
private UUID targetCreatureId2 = null;
|
||||||
|
|
||||||
|
TargetControlledPermanent target;
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(new TappedPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public CrypticGatewayCost(TargetControlledPermanent target) {
|
||||||
|
this.target = target;
|
||||||
|
this.text = "Tap two untapped creatures you control";
|
||||||
|
}
|
||||||
|
|
||||||
|
public CrypticGatewayCost(final CrypticGatewayCost cost) {
|
||||||
|
super(cost);
|
||||||
|
this.target = cost.target.copy();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||||
|
int numTargets = 0;
|
||||||
|
while (numTargets < 2 && target.choose(Outcome.Tap, controllerId, sourceId, game)) {
|
||||||
|
for (UUID targetId : (List<UUID>) target.getTargets()) {
|
||||||
|
Permanent permanent = game.getPermanent(targetId);
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
paid |= permanent.tap(game);
|
||||||
|
if (paid) {
|
||||||
|
numTargets++;
|
||||||
|
target.clearChosen();
|
||||||
|
}
|
||||||
|
for (Effect effect : ability.getEffects()) {
|
||||||
|
if (targetCreatureId == null) {
|
||||||
|
targetCreatureId = permanent.getId();
|
||||||
|
} else if (targetCreatureId2 == null) {
|
||||||
|
targetCreatureId2 = permanent.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return paid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||||
|
return target.canChoose(controllerId, game);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CrypticGatewayCost copy() {
|
||||||
|
return new CrypticGatewayCost(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UUID getTargetCreatureId() {
|
||||||
|
return targetCreatureId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UUID getTargetCreatureId2() {
|
||||||
|
return targetCreatureId2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CrypticGatewayEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public CrypticGatewayEffect() {
|
||||||
|
super(Outcome.PutCreatureInPlay);
|
||||||
|
this.staticText = "Put a creature card from your hand that shares a creature type with each creature tapped this way onto the battlefield";
|
||||||
|
}
|
||||||
|
|
||||||
|
public CrypticGatewayEffect(final CrypticGatewayEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CrypticGatewayEffect copy() {
|
||||||
|
return new CrypticGatewayEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (source == null || source.getCosts() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
FilterCard filter = new FilterCreatureCard("creature card from your hand that shares a creature type with each creature tapped this way");
|
||||||
|
|
||||||
|
for (Cost cost : source.getCosts()) {
|
||||||
|
if (cost instanceof CrypticGatewayCost) {
|
||||||
|
UUID id = ((CrypticGatewayCost) cost).getTargetCreatureId();
|
||||||
|
UUID id2 = ((CrypticGatewayCost) cost).getTargetCreatureId2();
|
||||||
|
Permanent creature = game.getPermanentOrLKIBattlefield(id);
|
||||||
|
Permanent creature2 = game.getPermanentOrLKIBattlefield(id2);
|
||||||
|
|
||||||
|
if (creature == null || creature2 == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean commonSubType = false;
|
||||||
|
boolean changeling = false;
|
||||||
|
boolean changeling2 = false;
|
||||||
|
if (creature.getAbilities().containsKey(ChangelingAbility.getInstance().getId()) || creature.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE)) {
|
||||||
|
changeling = true;
|
||||||
|
}
|
||||||
|
if (creature2.getAbilities().containsKey(ChangelingAbility.getInstance().getId()) || creature2.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE)) {
|
||||||
|
changeling2 = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList<SubtypePredicate> subtypes = new ArrayList<>();
|
||||||
|
|
||||||
|
for (String subtype : creature.getSubtype()) {
|
||||||
|
if (creature2.getSubtype().contains(subtype) || changeling2) {
|
||||||
|
subtypes.add(new SubtypePredicate(subtype));
|
||||||
|
commonSubType = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String subtype : creature2.getSubtype()) {
|
||||||
|
if (creature.getSubtype().contains(subtype) || changeling) {
|
||||||
|
subtypes.add(new SubtypePredicate(subtype));
|
||||||
|
commonSubType = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changeling && changeling2) {
|
||||||
|
filter = new FilterCreatureCard("creature card from your hand that shares a creature type with each creature tapped this way");
|
||||||
|
} else if (commonSubType) {
|
||||||
|
filter.add(Predicates.or(subtypes));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (commonSubType) {
|
||||||
|
PutPermanentOnBattlefieldEffect putIntoPlay = new PutPermanentOnBattlefieldEffect(filter);
|
||||||
|
putIntoPlay.apply(game, source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,6 +27,8 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.portalthreekingdoms;
|
package mage.sets.portalthreekingdoms;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
@ -43,7 +45,7 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTargets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -55,7 +57,6 @@ public class Exhaustion extends CardImpl {
|
||||||
super(ownerId, 42, "Exhaustion", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}");
|
super(ownerId, 42, "Exhaustion", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}");
|
||||||
this.expansionSetCode = "PTK";
|
this.expansionSetCode = "PTK";
|
||||||
|
|
||||||
|
|
||||||
// Creatures and lands target opponent controls don't untap during his or her next untap step.
|
// Creatures and lands target opponent controls don't untap during his or her next untap step.
|
||||||
this.getSpellAbility().addEffect(new ExhaustionEffect());
|
this.getSpellAbility().addEffect(new ExhaustionEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||||
|
@ -97,9 +98,13 @@ class ExhaustionEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getFirstTarget());
|
Player player = game.getPlayer(source.getFirstTarget());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
|
List<Permanent> doNotUntapNextUntapStep = new ArrayList<>();
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect();
|
doNotUntapNextUntapStep.add(permanent);
|
||||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
}
|
||||||
|
if (!doNotUntapNextUntapStep.isEmpty()) {
|
||||||
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("This creature");
|
||||||
|
effect.setTargetPointer(new FixedTargets(doNotUntapNextUntapStep, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
130
Mage.Sets/src/mage/sets/scourge/DragonFangs.java
Normal file
130
Mage.Sets/src/mage/sets/scourge/DragonFangs.java
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* 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.scourge;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.SetTargetPointer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.Filter;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class DragonFangs extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
|
||||||
|
static {
|
||||||
|
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonFangs(UUID ownerId) {
|
||||||
|
super(ownerId, 117, "Dragon Fangs", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||||
|
this.expansionSetCode = "SCG";
|
||||||
|
this.subtype.add("Aura");
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +1/+1 and has trample.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield)));
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA)));
|
||||||
|
|
||||||
|
// When a creature with converted mana cost 6 or greater enters the battlefield, you may return Dragon Fangs from your graveyard to the battlefield attached to that creature.
|
||||||
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new DragonFangsEffect(), filter, true, SetTargetPointer.PERMANENT, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonFangs(final DragonFangs card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonFangs copy() {
|
||||||
|
return new DragonFangs(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DragonFangsEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
DragonFangsEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "return {this} from your graveyard to the battlefield attached to that creature";
|
||||||
|
}
|
||||||
|
|
||||||
|
DragonFangsEffect(final DragonFangsEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonFangsEffect copy() {
|
||||||
|
return new DragonFangsEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Card sourceCard = (Card) source.getSourceObjectIfItStillExists(game);
|
||||||
|
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (sourceCard != null && permanent != null && controller != null) {
|
||||||
|
game.getState().setValue("attachTo:" + sourceCard.getId(), permanent);
|
||||||
|
if (controller.moveCards(sourceCard, Zone.BATTLEFIELD, source, game)) {
|
||||||
|
permanent.addAttachment(sourceCard.getId(), game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
129
Mage.Sets/src/mage/sets/scourge/DragonScales.java
Normal file
129
Mage.Sets/src/mage/sets/scourge/DragonScales.java
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.scourge;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.SetTargetPointer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.Filter;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class DragonScales extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
|
||||||
|
static {
|
||||||
|
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonScales(UUID ownerId) {
|
||||||
|
super(ownerId, 10, "Dragon Scales", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||||
|
this.expansionSetCode = "SCG";
|
||||||
|
this.subtype.add("Aura");
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +1/+2 and has vigilance.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield)));
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)));
|
||||||
|
|
||||||
|
// When a creature with converted mana cost 6 or greater enters the battlefield, you may return Dragon Scales from your graveyard to the battlefield attached to that creature.
|
||||||
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new DragonScalesEffect(), filter, true, SetTargetPointer.PERMANENT, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonScales(final DragonScales card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonScales copy() {
|
||||||
|
return new DragonScales(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DragonScalesEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
DragonScalesEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "return {this} from your graveyard to the battlefield attached to that creature";
|
||||||
|
}
|
||||||
|
|
||||||
|
DragonScalesEffect(final DragonScalesEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonScalesEffect copy() {
|
||||||
|
return new DragonScalesEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Card sourceCard = (Card) source.getSourceObjectIfItStillExists(game);
|
||||||
|
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (sourceCard != null && permanent != null && controller != null) {
|
||||||
|
game.getState().setValue("attachTo:" + sourceCard.getId(), permanent);
|
||||||
|
if (controller.moveCards(sourceCard, Zone.BATTLEFIELD, source, game)) {
|
||||||
|
permanent.addAttachment(sourceCard.getId(), game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
129
Mage.Sets/src/mage/sets/scourge/DragonShadow.java
Normal file
129
Mage.Sets/src/mage/sets/scourge/DragonShadow.java
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.scourge;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.keyword.FearAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.SetTargetPointer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.Filter;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class DragonShadow extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
|
||||||
|
static {
|
||||||
|
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonShadow(UUID ownerId) {
|
||||||
|
super(ownerId, 65, "Dragon Shadow", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||||
|
this.expansionSetCode = "SCG";
|
||||||
|
this.subtype.add("Aura");
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +1/+0 and has fear.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.WhileOnBattlefield)));
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.AURA)));
|
||||||
|
|
||||||
|
// When a creature with converted mana cost 6 or greater enters the battlefield, you may return Dragon Breath from your graveyard to the battlefield attached to that creature.
|
||||||
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new DragonShadowEffect(), filter, true, SetTargetPointer.PERMANENT, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonShadow(final DragonShadow card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonShadow copy() {
|
||||||
|
return new DragonShadow(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DragonShadowEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
DragonShadowEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "return {this} from your graveyard to the battlefield attached to that creature";
|
||||||
|
}
|
||||||
|
|
||||||
|
DragonShadowEffect(final DragonShadowEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonShadowEffect copy() {
|
||||||
|
return new DragonShadowEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Card sourceCard = (Card) source.getSourceObjectIfItStillExists(game);
|
||||||
|
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (sourceCard != null && permanent != null && controller != null) {
|
||||||
|
game.getState().setValue("attachTo:" + sourceCard.getId(), permanent);
|
||||||
|
if (controller.moveCards(sourceCard, Zone.BATTLEFIELD, source, game)) {
|
||||||
|
permanent.addAttachment(sourceCard.getId(), game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
131
Mage.Sets/src/mage/sets/scourge/DragonWings.java
Normal file
131
Mage.Sets/src/mage/sets/scourge/DragonWings.java
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
/*
|
||||||
|
* 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.scourge;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.CyclingAbility;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.SetTargetPointer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.Filter;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
|
*/
|
||||||
|
public class DragonWings extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with converted mana cost 6 or greater");
|
||||||
|
static {
|
||||||
|
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonWings(UUID ownerId) {
|
||||||
|
super(ownerId, 34, "Dragon Wings", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||||
|
this.expansionSetCode = "SCG";
|
||||||
|
this.subtype.add("Aura");
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature has flying.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)));
|
||||||
|
// Cycling {1}{U}
|
||||||
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{U}")));
|
||||||
|
|
||||||
|
// When a creature with converted mana cost 6 or greater enters the battlefield, you may return Dragon Breath from your graveyard to the battlefield attached to that creature.
|
||||||
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new DragonWingsEffect(), filter, true, SetTargetPointer.PERMANENT, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragonWings(final DragonWings card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonWings copy() {
|
||||||
|
return new DragonWings(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DragonWingsEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
DragonWingsEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "return {this} from your graveyard to the battlefield attached to that creature";
|
||||||
|
}
|
||||||
|
|
||||||
|
DragonWingsEffect(final DragonWingsEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DragonWingsEffect copy() {
|
||||||
|
return new DragonWingsEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Card sourceCard = (Card) source.getSourceObjectIfItStillExists(game);
|
||||||
|
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (sourceCard != null && permanent != null && controller != null) {
|
||||||
|
game.getState().setValue("attachTo:" + sourceCard.getId(), permanent);
|
||||||
|
if (controller.moveCards(sourceCard, Zone.BATTLEFIELD, source, game)) {
|
||||||
|
permanent.addAttachment(sourceCard.getId(), game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -27,8 +27,10 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.theros;
|
package mage.sets.theros;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -52,7 +54,7 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTargets;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
@ -69,7 +71,7 @@ public class TritonTactics extends CardImpl {
|
||||||
// Up to two target creatures each get +0/+3 until end of turn. Untap those creatures.
|
// Up to two target creatures each get +0/+3 until end of turn. Untap those creatures.
|
||||||
// At this turn's next end of combat, tap each creature that was blocked by one of those
|
// At this turn's next end of combat, tap each creature that was blocked by one of those
|
||||||
// creatures this turn and it doesn't untap during its controller's next untap step.
|
// creatures this turn and it doesn't untap during its controller's next untap step.
|
||||||
Effect effect = new BoostTargetEffect(0,3, Duration.EndOfTurn);
|
Effect effect = new BoostTargetEffect(0, 3, Duration.EndOfTurn);
|
||||||
effect.setText("Up to two target creatures each get +0/+3 until end of turn");
|
effect.setText("Up to two target creatures each get +0/+3 until end of turn");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||||
|
@ -78,7 +80,6 @@ public class TritonTactics extends CardImpl {
|
||||||
|
|
||||||
this.getSpellAbility().addWatcher(new BlockedCreaturesWatcher());
|
this.getSpellAbility().addWatcher(new BlockedCreaturesWatcher());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TritonTactics(final TritonTactics card) {
|
public TritonTactics(final TritonTactics card) {
|
||||||
|
@ -110,7 +111,7 @@ class TritonTacticsUntapTargetEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Set<String> targets = new HashSet<>();
|
Set<String> targets = new HashSet<>();
|
||||||
for (UUID target: targetPointer.getTargets(game, source)) {
|
for (UUID target : targetPointer.getTargets(game, source)) {
|
||||||
Permanent permanent = game.getPermanent(target);
|
Permanent permanent = game.getPermanent(target);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
permanent.untap(game);
|
permanent.untap(game);
|
||||||
|
@ -189,17 +190,21 @@ class TritonTacticsEndOfCombatEffect extends OneShotEffect {
|
||||||
Object object = game.getState().getValue("blockedAttackers" + source.getSourceId());
|
Object object = game.getState().getValue("blockedAttackers" + source.getSourceId());
|
||||||
if (object != null && object instanceof Map) {
|
if (object != null && object instanceof Map) {
|
||||||
attackerMap = (Map<Integer, Set<String>>) object;
|
attackerMap = (Map<Integer, Set<String>>) object;
|
||||||
for (Set<String> attackerSet :attackerMap.values()) {
|
for (Set<String> attackerSet : attackerMap.values()) {
|
||||||
|
List<Permanent> doNotUntapNextUntapStep = new ArrayList<>();
|
||||||
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
|
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
|
||||||
if (attackerSet.contains(CardUtil.getCardZoneString(null, creature.getId(), game))) {
|
if (attackerSet.contains(CardUtil.getCardZoneString(null, creature.getId(), game))) {
|
||||||
// tap creature and add the not untap effect
|
// tap creature and add the not untap effect
|
||||||
creature.tap(game);
|
creature.tap(game);
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect();
|
doNotUntapNextUntapStep.add(creature);
|
||||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
|
||||||
game.addEffect(effect, source);
|
|
||||||
game.informPlayers(new StringBuilder("Triton Tactics: ").append(creature.getName()).append(" doesn't untap during its controller's next untap step").toString());
|
game.informPlayers(new StringBuilder("Triton Tactics: ").append(creature.getName()).append(" doesn't untap during its controller's next untap step").toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!doNotUntapNextUntapStep.isEmpty()) {
|
||||||
|
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect("This creature");
|
||||||
|
effect.setTargetPointer(new FixedTargets(doNotUntapNextUntapStep, game));
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (attackerMap != null) {
|
if (attackerMap != null) {
|
||||||
|
|
|
@ -28,25 +28,18 @@
|
||||||
package mage.sets.zendikar;
|
package mage.sets.zendikar;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||||
|
import mage.abilities.effects.common.TapTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
|
||||||
import mage.abilities.costs.Cost;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -66,7 +59,11 @@ public class LorthosTheTidemaker extends CardImpl {
|
||||||
this.toughness = new MageInt(8);
|
this.toughness = new MageInt(8);
|
||||||
|
|
||||||
// Whenever Lorthos, the Tidemaker attacks, you may pay {8}. If you do, tap up to eight target permanents. Those permanents don't untap during their controllers' next untap steps.
|
// Whenever Lorthos, the Tidemaker attacks, you may pay {8}. If you do, tap up to eight target permanents. Those permanents don't untap during their controllers' next untap steps.
|
||||||
AttacksTriggeredAbility ability = new AttacksTriggeredAbility(new LorthosTheTideMakerEffect(), true);
|
DoIfCostPaid effect = new DoIfCostPaid(new TapTargetEffect(), new GenericManaCost(8), "Pay {8} to tap up to 8 target permanents? (They don't untap during their controllers' next untap steps)");
|
||||||
|
AttacksTriggeredAbility ability = new AttacksTriggeredAbility(effect, false);
|
||||||
|
Effect effect2 = new DontUntapInControllersNextUntapStepTargetEffect();
|
||||||
|
effect2.setText("Those permanents don't untap during their controllers' next untap steps");
|
||||||
|
effect.addEffect(effect2);
|
||||||
ability.addTarget(new TargetPermanent(0, 8, filter, false));
|
ability.addTarget(new TargetPermanent(0, 8, filter, false));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
@ -80,44 +77,3 @@ public class LorthosTheTidemaker extends CardImpl {
|
||||||
return new LorthosTheTidemaker(this);
|
return new LorthosTheTidemaker(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LorthosTheTideMakerEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
public LorthosTheTideMakerEffect() {
|
|
||||||
super(Outcome.Tap);
|
|
||||||
this.staticText = "you may pay {8}. If you do, tap up to eight target permanents. Those permanents don't untap during their controllers' next untap steps";
|
|
||||||
}
|
|
||||||
|
|
||||||
public LorthosTheTideMakerEffect(final LorthosTheTideMakerEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public LorthosTheTideMakerEffect copy() {
|
|
||||||
return new LorthosTheTideMakerEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
|
||||||
if (player != null) {
|
|
||||||
Cost cost = new ManaCostsImpl("{8}");
|
|
||||||
if (player.chooseUse(Outcome.Tap, "Pay " + cost.getText() + " and " + staticText, source, game)) {
|
|
||||||
cost.clearPaid();
|
|
||||||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) {
|
|
||||||
for (UUID target : this.targetPointer.getTargets(game, source)) {
|
|
||||||
Permanent permanent = game.getPermanent(target);
|
|
||||||
if (permanent != null) {
|
|
||||||
permanent.tap(game);
|
|
||||||
ContinuousEffect effect = new DontUntapInControllersNextUntapStepTargetEffect();
|
|
||||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
|
||||||
game.addEffect(effect, source);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,131 @@
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package org.mage.test.cards.single.ogw;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.constants.PhaseStep;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
public class ThoughtKnotSeerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reported bug I bounced a Thought-Knot Seer my opponent controlled with
|
||||||
|
* enter the battlefield ability of a Reflector Mage. I should have drawn a
|
||||||
|
* card since the Thought-Knot Seer left the battlefield but I didn't.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testThoughtKnotSeerBouncedReflectorMage() {
|
||||||
|
|
||||||
|
// {1}{W}{U} When Reflector Mage enters the battlefield, return target creature an opponent controls to its owner's hand.
|
||||||
|
// That creature's owner can't cast spells with the same name as that creature until your next turn.
|
||||||
|
addCard(Zone.HAND, playerA, "Reflector Mage"); // 2/3
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
|
||||||
|
// {3}{<>} 4/4
|
||||||
|
// When Thought-Knot Seer enters the battlefield, target opponent reveals his or her hand. You choose a nonland card from it and exile that card.
|
||||||
|
// When Thought-Knot Seer leaves the battlefield, target opponent draws a card.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Thought-Knot Seer");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reflector Mage");
|
||||||
|
addTarget(playerA, "Thought-Knot Seer");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertPermanentCount(playerA, "Reflector Mage", 1);
|
||||||
|
assertHandCount(playerB, "Thought-Knot Seer", 1);
|
||||||
|
assertHandCount(playerA, 1); // should have drawn a card from Thought-Knot Seer leaving
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple bounce test on Thought-Knot Seer to differentiate between this and
|
||||||
|
* Reflector Mage issue
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testThoughtKnotSeerBouncedUnsummon() {
|
||||||
|
|
||||||
|
// {U} Return target creature to its owner's hand.
|
||||||
|
addCard(Zone.HAND, playerA, "Unsummon");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
|
|
||||||
|
// {3}{<>} 4/4
|
||||||
|
// When Thought-Knot Seer enters the battlefield, target opponent reveals his or her hand. You choose a nonland card from it and exile that card.
|
||||||
|
// When Thought-Knot Seer leaves the battlefield, target opponent draws a card.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Thought-Knot Seer");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unsummon");
|
||||||
|
addTarget(playerA, "Thought-Knot Seer");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, "Unsummon", 1);
|
||||||
|
assertHandCount(playerB, "Thought-Knot Seer", 1);
|
||||||
|
Set<Card> hand = playerA.getHand().getCards(currentGame);
|
||||||
|
assertHandCount(playerA, 1); // should have drawn a card from Thought-Knot Seer leaving
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testThoughtKnotSeerDestroyed() {
|
||||||
|
|
||||||
|
// {1}{B} Destroy target nonblack creature.
|
||||||
|
addCard(Zone.HAND, playerA, "Doom Blade");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
|
||||||
|
|
||||||
|
// {3}{<>} 4/4
|
||||||
|
// When Thought-Knot Seer enters the battlefield, target opponent reveals his or her hand. You choose a nonland card from it and exile that card.
|
||||||
|
// When Thought-Knot Seer leaves the battlefield, target opponent draws a card.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Thought-Knot Seer");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Doom Blade");
|
||||||
|
addTarget(playerA, "Thought-Knot Seer");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerB, "Thought-Knot Seer", 1);
|
||||||
|
Set<Card> hand = playerA.getHand().getCards(currentGame);
|
||||||
|
assertHandCount(playerA, 1); // should have drawn a card from Thought-Knot Seer leaving
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testThoughtKnotSeerExiled() {
|
||||||
|
|
||||||
|
// {W} Exile target creature. Its controller may search his or her library for a basic land card, put that card onto the battlefield tapped, then shuffle his or her library.
|
||||||
|
addCard(Zone.HAND, playerA, "Path to Exile");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||||
|
|
||||||
|
// {3}{<>} 4/4
|
||||||
|
// When Thought-Knot Seer enters the battlefield, target opponent reveals his or her hand. You choose a nonland card from it and exile that card.
|
||||||
|
// When Thought-Knot Seer leaves the battlefield, target opponent draws a card.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Thought-Knot Seer");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Wastes", 4);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Path to Exile");
|
||||||
|
addTarget(playerA, "Thought-Knot Seer");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertExileCount(playerB, 1);
|
||||||
|
assertExileCount("Thought-Knot Seer", 1);
|
||||||
|
Set<Card> hand = playerA.getHand().getCards(currentGame);
|
||||||
|
assertHandCount(playerA, 1); // should have drawn a card from Thought-Knot Seer leaving
|
||||||
|
}
|
||||||
|
}
|
|
@ -94,6 +94,5 @@ public class EnterLeaveBattlefieldExileTargetTest extends CardTestPlayerBase {
|
||||||
assertHandCount(playerB, "Silvercoat Lion", 1);
|
assertHandCount(playerB, "Silvercoat Lion", 1);
|
||||||
assertHandCount(playerB, "Pillarfield Ox", 1);
|
assertHandCount(playerB, "Pillarfield Ox", 1);
|
||||||
assertExileCount(playerB, 0);
|
assertExileCount(playerB, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.mage.test.combat;
|
package org.mage.test.combat;
|
||||||
|
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
@ -35,11 +34,13 @@ public class AttackBlockRestrictionsTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests attacking creature doesn't untap after being blocked by Wall of Frost
|
* Tests attacking creature doesn't untap after being blocked by Wall of
|
||||||
|
* Frost
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWallofWrost() {
|
public void testWallofWrost() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Wall of Frost");
|
// Whenever Wall of Frost blocks a creature, that creature doesn't untap during its controller's next untap step.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Wall of Frost"); // 0/7
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Craw Wurm");
|
addCard(Zone.BATTLEFIELD, playerB, "Craw Wurm");
|
||||||
|
|
||||||
attack(2, playerB, "Craw Wurm");
|
attack(2, playerB, "Craw Wurm");
|
||||||
|
@ -56,8 +57,7 @@ public class AttackBlockRestrictionsTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests card that says that it can't block specific cards
|
* Tests card that says that it can't block specific cards Hunted Ghoul:
|
||||||
* Hunted Ghoul:
|
|
||||||
* Hunted Ghoul can't block Humans.
|
* Hunted Ghoul can't block Humans.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
|
@ -76,9 +76,8 @@ public class AttackBlockRestrictionsTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests card that says that it can't block specific cards still can block others
|
* Tests card that says that it can't block specific cards still can block
|
||||||
* Hunted Ghoul:
|
* others Hunted Ghoul: Hunted Ghoul can't block Humans.
|
||||||
* Hunted Ghoul can't block Humans.
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testFilteredBlocking2() {
|
public void testFilteredBlocking2() {
|
||||||
|
@ -176,7 +175,8 @@ public class AttackBlockRestrictionsTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests "Creatures with power less than Champion of Lambholt's power can't block creatures you control."
|
* Tests "Creatures with power less than Champion of Lambholt's power can't
|
||||||
|
* block creatures you control."
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testChampionOfLambholt() {
|
public void testChampionOfLambholt() {
|
||||||
|
|
|
@ -315,7 +315,8 @@ public abstract class AbilityImpl implements Ability {
|
||||||
VariableManaCost variableManaCost = handleManaXCosts(game, noMana, controller);
|
VariableManaCost variableManaCost = handleManaXCosts(game, noMana, controller);
|
||||||
String announceString = handleOtherXCosts(game, controller);
|
String announceString = handleOtherXCosts(game, controller);
|
||||||
// For effects from cards like Void Winnower x costs have to be set
|
// For effects from cards like Void Winnower x costs have to be set
|
||||||
if (game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL_LATE, getId(), getSourceId(), getControllerId()), this)) {
|
if (this.getAbilityType().equals(AbilityType.SPELL)
|
||||||
|
&& game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL_LATE, getId(), getSourceId(), getControllerId()), this)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (Mode mode : this.getModes().getSelectedModes()) {
|
for (Mode mode : this.getModes().getSelectedModes()) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ import mage.game.events.ZoneChangeEvent;
|
||||||
public class LeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility {
|
public class LeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||||
|
|
||||||
public LeavesBattlefieldTriggeredAbility(Effect effect, boolean optional) {
|
public LeavesBattlefieldTriggeredAbility(Effect effect, boolean optional) {
|
||||||
super(Zone.BATTLEFIELD, null, effect, "When {this} leaves the battlefield, ", optional);
|
super(Zone.ALL, Zone.BATTLEFIELD, null, effect, "When {this} leaves the battlefield, ", optional);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeavesBattlefieldTriggeredAbility(LeavesBattlefieldTriggeredAbility ability) {
|
public LeavesBattlefieldTriggeredAbility(LeavesBattlefieldTriggeredAbility ability) {
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
*/
|
*/
|
||||||
package mage.abilities.effects.common;
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -45,8 +47,10 @@ import mage.game.permanent.Permanent;
|
||||||
*/
|
*/
|
||||||
public class DontUntapInControllersNextUntapStepTargetEffect extends ContinuousRuleModifyingEffectImpl {
|
public class DontUntapInControllersNextUntapStepTargetEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
|
|
||||||
private int validForTurnNum;
|
private UUID onlyIfControlledByPlayer;
|
||||||
private String targetName;
|
private String targetName;
|
||||||
|
// holds the info what target was already handled in Untap of its controller
|
||||||
|
private final Map<UUID, Boolean> handledTargetsDuringTurn = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attention: This effect won't work with targets controlled by different
|
* Attention: This effect won't work with targets controlled by different
|
||||||
|
@ -55,19 +59,30 @@ public class DontUntapInControllersNextUntapStepTargetEffect extends ContinuousR
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public DontUntapInControllersNextUntapStepTargetEffect() {
|
public DontUntapInControllersNextUntapStepTargetEffect() {
|
||||||
super(Duration.Custom, Outcome.Detriment, false, true);
|
this("");
|
||||||
}
|
}
|
||||||
|
|
||||||
public DontUntapInControllersNextUntapStepTargetEffect(String targetName) {
|
public DontUntapInControllersNextUntapStepTargetEffect(String targetName) {
|
||||||
this();
|
this(targetName, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param targetName used as target text for the generated rule text
|
||||||
|
* @param onlyIfControlledByPlayer the effect only works if the permanent is
|
||||||
|
* controlled by that controller, null = it works for all players
|
||||||
|
*/
|
||||||
|
public DontUntapInControllersNextUntapStepTargetEffect(String targetName, UUID onlyIfControlledByPlayer) {
|
||||||
|
super(Duration.Custom, Outcome.Detriment, false, true);
|
||||||
this.targetName = targetName;
|
this.targetName = targetName;
|
||||||
|
this.onlyIfControlledByPlayer = onlyIfControlledByPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DontUntapInControllersNextUntapStepTargetEffect(final DontUntapInControllersNextUntapStepTargetEffect effect) {
|
public DontUntapInControllersNextUntapStepTargetEffect(final DontUntapInControllersNextUntapStepTargetEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.validForTurnNum = effect.validForTurnNum;
|
|
||||||
this.targetName = effect.targetName;
|
this.targetName = effect.targetName;
|
||||||
|
this.handledTargetsDuringTurn.putAll(effect.handledTargetsDuringTurn);
|
||||||
|
this.onlyIfControlledByPlayer = effect.onlyIfControlledByPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -97,42 +112,40 @@ public class DontUntapInControllersNextUntapStepTargetEffect extends ContinuousR
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
// the check for turn number is needed if multiple effects are added to prevent untap in next untap step of controller
|
// the check if a permanent untap pahse is already handled is needed if multiple effects are added to prevent untap in next untap step of controller
|
||||||
// if we don't check for turn number, every untap step of a turn only one effect would be used instead of correctly only one time
|
// if we don't check it for every untap step of a turn only one effect would be consumed instead of all be valid for the next untap step
|
||||||
// to skip the untap effect.
|
|
||||||
|
|
||||||
// Discard effect if it's related to a previous turn
|
|
||||||
if (validForTurnNum > 0 && validForTurnNum < game.getTurnNum()) {
|
|
||||||
discard();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// remember the turn of the untap step the effect has to be applied
|
|
||||||
if (GameEvent.EventType.UNTAP_STEP.equals(event.getType())) {
|
if (GameEvent.EventType.UNTAP_STEP.equals(event.getType())) {
|
||||||
UUID controllerId = null;
|
boolean allHandled = true;
|
||||||
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
||||||
Permanent permanent = game.getPermanent(targetId);
|
Permanent permanent = game.getPermanent(targetId);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
controllerId = permanent.getControllerId();
|
if (game.getActivePlayerId().equals(permanent.getControllerId())
|
||||||
|
|| (game.getActivePlayerId().equals(onlyIfControlledByPlayer))) { // if effect works only for specific player, all permanents have to be set to handled in that players untap step
|
||||||
|
if (!handledTargetsDuringTurn.containsKey(targetId)) {
|
||||||
|
// it's the untep step of the current controller and the effect was not handled for this target yet, so do it now
|
||||||
|
handledTargetsDuringTurn.put(targetId, false);
|
||||||
|
allHandled = false;
|
||||||
|
} else if (!handledTargetsDuringTurn.get(targetId)) {
|
||||||
|
// if it was already ready to be handled on an previous Untap step set it to done if not already so
|
||||||
|
handledTargetsDuringTurn.put(targetId, true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
allHandled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (controllerId == null) { // no more targets on the battlefield, effect can be discarded
|
}
|
||||||
|
if (allHandled) {
|
||||||
discard();
|
discard();
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (game.getActivePlayerId().equals(controllerId)) {
|
|
||||||
if (validForTurnNum == game.getTurnNum()) { // the turn has a second untap step but the effect is already related to the first untap step
|
|
||||||
discard();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
validForTurnNum = game.getTurnNum();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == EventType.UNTAP) {
|
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == EventType.UNTAP) {
|
||||||
if (targetPointer.getTargets(game, source).contains(event.getTargetId())) {
|
if (handledTargetsDuringTurn.containsKey(event.getTargetId())
|
||||||
|
&& !handledTargetsDuringTurn.get(event.getTargetId())
|
||||||
|
&& getTargetPointer().getTargets(game, source).contains(event.getTargetId())) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent != null && game.getActivePlayerId().equals(permanent.getControllerId())) {
|
if (permanent != null && game.getActivePlayerId().equals(permanent.getControllerId())) {
|
||||||
|
handledTargetsDuringTurn.put(event.getTargetId(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34636,6 +34636,7 @@ Stasis Snare|Game Day|47|U|{1}{W}{W}|Enchantment|||Flash$When Stasis Snare enter
|
||||||
Radiant Flames|Game Day|48|R|{2}{R}|Sorcery||<i>Converge</i> - Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames.|
|
Radiant Flames|Game Day|48|R|{2}{R}|Sorcery||<i>Converge</i> - Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames.|
|
||||||
Immolating Glare|Game Day|49|U|{1}{W}|Instant|||Destroy target attacking creature.|
|
Immolating Glare|Game Day|49|U|{1}{W}|Instant|||Destroy target attacking creature.|
|
||||||
Jori En, Ruin Diver|Game Day|50|R|{1}{U}{R}|Legendary Creature - Merfolk Wizard|2|3|Whenever you cast your second spell each turn, draw a card.|
|
Jori En, Ruin Diver|Game Day|50|R|{1}{U}{R}|Legendary Creature - Merfolk Wizard|2|3|Whenever you cast your second spell each turn, draw a card.|
|
||||||
|
Anguished Unmaking|Game Day|52|R|{1}{W}{B}|Instant|||Exile target nonland permanent. You lose 3 life.|
|
||||||
Aerial Maneuver|Gatecrash|1|C|{1}{W}|Instant|||Target creature gets +1/+1 and gains flying and first strike until end of turn.|
|
Aerial Maneuver|Gatecrash|1|C|{1}{W}|Instant|||Target creature gets +1/+1 and gains flying and first strike until end of turn.|
|
||||||
Debtor's Pulpit|Gatecrash|10|U|{4}{W}|Enchantment - Aura|||Enchant land$Enchanted land has "{tap}: Tap target creature."|
|
Debtor's Pulpit|Gatecrash|10|U|{4}{W}|Enchantment - Aura|||Enchant land$Enchanted land has "{tap}: Tap target creature."|
|
||||||
Massive Raid|Gatecrash|100|C|{1}{R}{R}|Instant|||Massive Raid deals damage to target creature or player equal to the number of creatures you control.|
|
Massive Raid|Gatecrash|100|C|{1}{R}{R}|Instant|||Massive Raid deals damage to target creature or player equal to the number of creatures you control.|
|
||||||
|
@ -56936,12 +56937,15 @@ Unknown Shores|Oath of the Gatewatch|181|C||Land|||{T}: Add {C} to your mana poo
|
||||||
Wandering Fumarole|Oath of the Gatewatch|182|R||Land|||Wandering Fumarole enters the battlefield tapped.${T}: Add {U} or {R} to your mana pool.${2}{U}{R}: Until end of turn, Wandering Fumarole becomes a 1/4 blue and red Elemental creature with "0: Switch this creature's power and toughness until end of turn." It's still a land.|
|
Wandering Fumarole|Oath of the Gatewatch|182|R||Land|||Wandering Fumarole enters the battlefield tapped.${T}: Add {U} or {R} to your mana pool.${2}{U}{R}: Until end of turn, Wandering Fumarole becomes a 1/4 blue and red Elemental creature with "0: Switch this creature's power and toughness until end of turn." It's still a land.|
|
||||||
Wastes|Oath of the Gatewatch|183|C||Basic Land|||{T}: Add {C} to your mana pool.|
|
Wastes|Oath of the Gatewatch|183|C||Basic Land|||{T}: Add {C} to your mana pool.|
|
||||||
Wastes|Oath of the Gatewatch|184|C||Basic Land|||{T}: Add {C} to your mana pool.|
|
Wastes|Oath of the Gatewatch|184|C||Basic Land|||{T}: Add {C} to your mana pool.|
|
||||||
|
Angel of Deliverance|Shadows over Innistrad|2|R|{6}{W}{W}|Creature - Angel|6|6|Flying$<i>Delirium</i> — Whenever Angel of Deliverance deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls.|
|
||||||
Archangel Avacyn|Shadows over Innistrad|5a|M|{3}{W}{W}|Legendary Creature - Angel|4|4|Flash$Flying, vigilance$When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn.$When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep.|
|
Archangel Avacyn|Shadows over Innistrad|5a|M|{3}{W}{W}|Legendary Creature - Angel|4|4|Flash$Flying, vigilance$When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn.$When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep.|
|
||||||
Avacyn, the Purifier|Shadows over Innistrad|5b|M||Legendary Creature - Angel|6|5|Flying$When this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent.|
|
Avacyn, the Purifier|Shadows over Innistrad|5b|M||Legendary Creature - Angel|6|5|Flying$When this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent.|
|
||||||
Avacynian Missionaries|Shadows over Innistrad|6a|U|{3}{W}|Creature - Human Cleric|3|3|At the beginning of your end step, if Avacynian Missionaries is equipped, transform it.|
|
Avacynian Missionaries|Shadows over Innistrad|6a|U|{3}{W}|Creature - Human Cleric|3|3|At the beginning of your end step, if Avacynian Missionaries is equipped, transform it.|
|
||||||
Lunarch Inquisitors|Shadows over Innistrad|6b|U||Creature - Human Cleric|4|4|When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield.|
|
Lunarch Inquisitors|Shadows over Innistrad|6b|U||Creature - Human Cleric|4|4|When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield.|
|
||||||
Bygone Bishop|Shadows over Innistrad|8|R|{2}{W}|Creature - Spirit Cleric|2|3|Flying$Whenever you cast a creature spell with converted mana cost 3 or less, investigate. <i>(Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")</i>|
|
Bygone Bishop|Shadows over Innistrad|8|R|{2}{W}|Creature - Spirit Cleric|2|3|Flying$Whenever you cast a creature spell with converted mana cost 3 or less, investigate. <i>(Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")</i>|
|
||||||
Declaration in Stone|Shadows over Innistrad|12|R|{1}{W}|Sorcery|||Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way.|
|
Declaration in Stone|Shadows over Innistrad|12|R|{1}{W}|Sorcery|||Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way.|
|
||||||
|
Descend upon the Sinful|Shadows over Innistrad|13|M|{4}{W}{W}|Sorcery|||Exile all creatures$<i>Delirium</i> — Put a 4/4 white Angel creature token with flying onto the battlefield if there are four or more card types among cards in your graveyard.|
|
||||||
|
Drogskol Cavalry|Shadows over Innistrad|15|R|{5}{W}{W}|Creature - Spirit Knight|4|4|Flying$Whenever another Spirit enters the battlefield under your control, you gain 2 life.${3}{W}: Put a 1/1 white Spirit creature token with flying onto the battlefield.|
|
||||||
Eerie Interlude|Shadows over Innistrad|16|R|{2}{W}|Instant|||Exile any number of target creatures you control. Return those cards to the battlefield under their owner's control at the beginning of the next end step.|
|
Eerie Interlude|Shadows over Innistrad|16|R|{2}{W}|Instant|||Exile any number of target creatures you control. Return those cards to the battlefield under their owner's control at the beginning of the next end step.|
|
||||||
Expose Evil|Shadows over Innistrad|19|C|{1}{W}|Instant|||Tap up to two target creatures.$Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")</i>|
|
Expose Evil|Shadows over Innistrad|19|C|{1}{W}|Instant|||Tap up to two target creatures.$Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")</i>|
|
||||||
Pious Evangel|Shadows over Innistrad|34a|U|{2}{W}|Creature - Human Cleric|2|2|Whenever Pious Evangel or another creature enters the battlefield under your control, you gain 1 life.${2}, {T}, Sacrifice another permanent: Transform Pious Evangel.|
|
Pious Evangel|Shadows over Innistrad|34a|U|{2}{W}|Creature - Human Cleric|2|2|Whenever Pious Evangel or another creature enters the battlefield under your control, you gain 1 life.${2}, {T}, Sacrifice another permanent: Transform Pious Evangel.|
|
||||||
|
@ -56957,9 +56961,12 @@ Geralf's Masterpiece|Shadows over Innistrad|65|M|{3}{U}{U}|Creature - Zombie Hor
|
||||||
Invasive Surgery|Shadows over Innistrad|68|U|{U}|Instant|||Counter target sorcery spell.$<i>Delirium</i> — If there are four or more card types among cards in your graveyard, search the graveyard, hand, and library of that spell's controller for any number of cards with the same name as that spell, exile those cards, then that player shuffles his or her library.|
|
Invasive Surgery|Shadows over Innistrad|68|U|{U}|Instant|||Counter target sorcery spell.$<i>Delirium</i> — If there are four or more card types among cards in your graveyard, search the graveyard, hand, and library of that spell's controller for any number of cards with the same name as that spell, exile those cards, then that player shuffles his or her library.|
|
||||||
Just the Wind|Shadows over Innistrad|71|C|{1}{U}|Instant|||Return target creature to its owner's hand.$Madness {U} <i>(If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)</i>|
|
Just the Wind|Shadows over Innistrad|71|C|{1}{U}|Instant|||Return target creature to its owner's hand.$Madness {U} <i>(If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)</i>|
|
||||||
Lamplighter of Selhoff|Shadows over Innistrad|72|C|{4}{U}|Creature - Zombie Horror|3|5|When Lamplighter of Selhoff enters the battlefield, if you control another Zombie, you may draw a card. If you do, discard a card.|
|
Lamplighter of Selhoff|Shadows over Innistrad|72|C|{4}{U}|Creature - Zombie Horror|3|5|When Lamplighter of Selhoff enters the battlefield, if you control another Zombie, you may draw a card. If you do, discard a card.|
|
||||||
|
Nephalia Moondrakes|Shadows over Innistrad|75|R|{5}{U}{U}|Creature - Drake|5|5|Flying$When Nephalia Moondrakes enters the battlefield, target creature gains flying until end of turn.${4}{U}{U}, Exile Nephalia Moondrakes from your graveyard: Creatures you control gain flying until end of turn.|
|
||||||
Niblis of Dusk|Shadows over Innistrad|76|C|{2}{U}|Creature - Spirit|2|1|Flying$Prowess|
|
Niblis of Dusk|Shadows over Innistrad|76|C|{2}{U}|Creature - Spirit|2|1|Flying$Prowess|
|
||||||
Pieces of the Puzzle|Shadows over Innistrad|78|C|{2}{U}|Sorcery|||Reveal the top five cards of your library. Put up to two instant and/or sorcery cards from among them into your hand and the rest into your graveyard.|
|
Pieces of the Puzzle|Shadows over Innistrad|78|C|{2}{U}|Sorcery|||Reveal the top five cards of your library. Put up to two instant and/or sorcery cards from among them into your hand and the rest into your graveyard.|
|
||||||
Pore Over the Pages|Shadows over Innistrad|79|U|{3}{U}{U}|Sorcery|||Draw three cards, untap up to two lands, then discard a card.|
|
Pore Over the Pages|Shadows over Innistrad|79|U|{3}{U}{U}|Sorcery|||Draw three cards, untap up to two lands, then discard a card.|
|
||||||
|
Startled Awake|Shadows over Innistrad|88a|{2}{U}{U}|Sorcery|||Target opponent puts the top thirteen cards of his or her library into his or her graveyard.${3}{U}{U}: Put Startled Awake from your graveyard onto the battlefield transformed. Activate this ability only any time you could cast a sorcery.|
|
||||||
|
Persistent Nightmare|Shadows over Innistrad|88b||Creature - Nightmare|1|1|Skulk <i>(This creature can't be blocked by creatures with greater power.)</i>$When Persistent Nightmare deals combat damage to a player, return it to its owner's hand.|
|
||||||
Stitched Mangler|Shadows over Innistrad|89|C|{2}{U}|Creature - Zombie Horror|2|3|Stitched Mangler enters the battlefield tapped.$When Stitched Mangler enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step.|
|
Stitched Mangler|Shadows over Innistrad|89|C|{2}{U}|Creature - Zombie Horror|2|3|Stitched Mangler enters the battlefield tapped.$When Stitched Mangler enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step.|
|
||||||
Thing in the Ice|Shadows over Innistrad|92a|R|{1}{U}|Creature - Horror|0|4|Defender$Thing in the Ice enters the battlefield with four ice counters on it.$Whenever you cast an instant or sorcery spell, remove an ice counter from Thing in the Ice. Then if it has no ice counters on it, transform it.|
|
Thing in the Ice|Shadows over Innistrad|92a|R|{1}{U}|Creature - Horror|0|4|Defender$Thing in the Ice enters the battlefield with four ice counters on it.$Whenever you cast an instant or sorcery spell, remove an ice counter from Thing in the Ice. Then if it has no ice counters on it, transform it.|
|
||||||
Awoken Horror|Shadows over Innistrad|92b|R||Creature - Kraken Horror|7|8|When this creature transforms into Awoken Horrow, return all non-Horror creatures to their owners' hands.|
|
Awoken Horror|Shadows over Innistrad|92b|R||Creature - Kraken Horror|7|8|When this creature transforms into Awoken Horrow, return all non-Horror creatures to their owners' hands.|
|
||||||
|
@ -56976,6 +56983,7 @@ Mindwrack Demon|Shadows over Innistrad|124|M|{2}{B}{B}|Creature - Demon|4|5|Flyi
|
||||||
Pick the Brain|Shadows over Innistrad|129|U|{2}{B}|Sorcery|||Target opponent reveals his or her hand. You choose a nonland card from it and exile that card.$<i>Delirium</i> — If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles his or her library.|
|
Pick the Brain|Shadows over Innistrad|129|U|{2}{B}|Sorcery|||Target opponent reveals his or her hand. You choose a nonland card from it and exile that card.$<i>Delirium</i> — If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles his or her library.|
|
||||||
Relentless Dead|Shadows over Innistrad|131|M|{B}{B}|Creature - Zombie|2|2|Menace <i>(This creature can't be blocked except by two or more creatures.)</i>$When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand.$When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield.|
|
Relentless Dead|Shadows over Innistrad|131|M|{B}{B}|Creature - Zombie|2|2|Menace <i>(This creature can't be blocked except by two or more creatures.)</i>$When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand.$When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield.|
|
||||||
Shamble Back|Shadows over Innistrad|134|C|{B}|Sorcery|||Exile target creature card from a graveyard. Put a 2/2 black Zombie creature token onto the battlefield. You gain 2 life.|
|
Shamble Back|Shadows over Innistrad|134|C|{B}|Sorcery|||Exile target creature card from a graveyard. Put a 2/2 black Zombie creature token onto the battlefield. You gain 2 life.|
|
||||||
|
Sinister Concoction|Shadows over Innistrad|135|U|{B}|Enchantment|||{B}, Pay 1 life, Put the top card of your library into your graveyard, Discard a card, Sacrifice Sinister Concoction: Destroy target creature.|
|
||||||
Tooth Collector|Shadows over Innistrad|140|U|{2}{B}|Creature - Human Rogue|3|2|When Tooth Collector enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn.${<i>Delirium</i> — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, target creature that player controls gets -1/-1 until end of turn.|
|
Tooth Collector|Shadows over Innistrad|140|U|{2}{B}|Creature - Human Rogue|3|2|When Tooth Collector enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn.${<i>Delirium</i> — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, target creature that player controls gets -1/-1 until end of turn.|
|
||||||
Dance with Devils|Shadows over Innistrad|150|U|{3}{R}|Instant|||Put two 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player."|
|
Dance with Devils|Shadows over Innistrad|150|U|{3}{R}|Instant|||Put two 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player."|
|
||||||
Devil's Playground|Shadows over Innistrad|151|R|{4}{R}{R}|Sorcery|||Put four 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player."|
|
Devil's Playground|Shadows over Innistrad|151|R|{4}{R}{R}|Sorcery|||Put four 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player."|
|
||||||
|
@ -56999,6 +57007,8 @@ Quilled Wolf|Shadows over Innistrad|222|C|{1}{G}|Creature - Wolf|2|2|{5}{G}: Qui
|
||||||
Soul Swallower|Shadows over Innistrad|230|R|{2}{G}{G}|Creature - Wurm|3|3|Trample$<i>Delirium</i> — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, put three +1/+1 counters on Soul Swallower.|
|
Soul Swallower|Shadows over Innistrad|230|R|{2}{G}{G}|Creature - Wurm|3|3|Trample$<i>Delirium</i> — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, put three +1/+1 counters on Soul Swallower.|
|
||||||
Stoic Builder|Shadows over Innistrad|231|C|{2}{G}|Creature - Human|2|3|When Stoic Builder enters the battlefield, you may return target land card from your graveyard to your hand.|
|
Stoic Builder|Shadows over Innistrad|231|C|{2}{G}|Creature - Human|2|3|When Stoic Builder enters the battlefield, you may return target land card from your graveyard to your hand.|
|
||||||
Watcher in the Web|Shadows over Innistrad|239|C|{4}{G}|Creature - Spider|2|5|Reach <i>(This creature can block creature with flying.)</i>$Watcher in the Web can block an additional seven creatures each combat.|
|
Watcher in the Web|Shadows over Innistrad|239|C|{4}{G}|Creature - Spider|2|5|Reach <i>(This creature can block creature with flying.)</i>$Watcher in the Web can block an additional seven creatures each combat.|
|
||||||
|
Anguished Unmaking|Shadows over Innistrad|242|R|{1}{W}{B}|Instant|||Exile target nonland permanent. You lose 3 life.|
|
||||||
|
Nahiri, the Harbinger|Shadows over Innistrad|247|M|{2}{R}{W}|Planeswalker - Nahiri|||+2: You may discard a card. If you do, draw a card.$-2: Exile target enchantment, tapped artifact, or tapped creature.$-8 Search your library for an artifact or creature card, put it onto the battlefield, then shuffle your library. It gains haste. Return it to your hand at the beginning of the next end step.|
|
||||||
Brain in a Jar|Shadows over Innistrad|252|R|{2}|Artifact|||{1}, {T}: Put a charge counter on Brain in a Jar, then you may cast an instant or sorcery card with converted mana costs equal to the number of charge counters on Brain in a Jar from your hand without paying its mana cost.${3}< {T}, Remove X charge counters from Brain in a Jar: Scry X.|
|
Brain in a Jar|Shadows over Innistrad|252|R|{2}|Artifact|||{1}, {T}: Put a charge counter on Brain in a Jar, then you may cast an instant or sorcery card with converted mana costs equal to the number of charge counters on Brain in a Jar from your hand without paying its mana cost.${3}< {T}, Remove X charge counters from Brain in a Jar: Scry X.|
|
||||||
Explosive Apparatus|Shadows over Innistrad|255|C|{1}|Artifact|||{3}, {T}, Sacrifice Explosive Apparatus: Explosive Apparatus deals 2 damage to target creature or player.|
|
Explosive Apparatus|Shadows over Innistrad|255|C|{1}|Artifact|||{3}, {T}, Sacrifice Explosive Apparatus: Explosive Apparatus deals 2 damage to target creature or player.|
|
||||||
Magnifying Glass|Shadows over Innistrad|258|U|{3}|Artifact|||{T}: Add {C} to your mana pool.${4}, {T}: Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")</i>|
|
Magnifying Glass|Shadows over Innistrad|258|U|{3}|Artifact|||{T}: Add {C} to your mana pool.${4}, {T}: Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")</i>|
|
||||||
|
|
Loading…
Reference in a new issue