* M15 - Added 11 blue cards.

This commit is contained in:
LevelX2 2014-07-08 02:15:45 +02:00
parent 0120808ef8
commit 08d0a3662c
19 changed files with 1219 additions and 25 deletions

View file

@ -28,6 +28,7 @@
package mage.sets.magic2012;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -49,9 +50,13 @@ public class TurnToFrog extends CardImpl {
this.color.setBlue(true);
// Target creature loses all abilities and becomes a 1/1 blue Frog until end of turn.
this.getSpellAbility().addEffect(new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn));
this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new FrogToken(), null, Duration.EndOfTurn));
// Until end of turn, target creature loses all abilities and becomes a blue Frog with base power and toughness 1/1.
Effect effect = new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn);
effect.setText("Until end of turn, target creature loses all abilities");
this.getSpellAbility().addEffect(effect);
effect = new BecomesCreatureTargetEffect(new FrogToken(), null, Duration.EndOfTurn);
effect.setText("and becomes a blue Frog with base power and toughness 1/1");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}

View file

@ -32,6 +32,7 @@ import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
@ -72,8 +73,10 @@ public class JaceTheLivingGuildpact extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false));
// +1: Look at the top two cards of your library. Put one of them into your graveyard.
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, true, false, false, Zone.GRAVEYARD, false), 1));
Effect effect = new LookLibraryAndPickControllerEffect(
new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, true, false, false, Zone.GRAVEYARD, false);
effect.setText("Look at the top two cards of your library. Put one of them into your graveyard");
this.addAbility(new LoyaltyAbility(effect, 1));
// -3: Return another target nonland permanent to its owner's hand.
LoyaltyAbility ability = new LoyaltyAbility(new ReturnToHandTargetEffect(), -3);

View file

@ -0,0 +1,85 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class KapshoKitefins extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another creature");
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
static {
filter.add(new ControllerPredicate(TargetController.YOU));
filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
}
public KapshoKitefins(UUID ownerId) {
super(ownerId, 66, "Kapsho Kitefins", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}{U}");
this.expansionSetCode = "M15";
this.subtype.add("Fish");
this.color.setBlue(true);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Kapsho Kitefins or another creature enters the battlefield under your control, tap target creature an opponent controls.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new TapTargetEffect(), filter, false);
ability.addTarget(new TargetCreaturePermanent(filterTarget));
this.addAbility(ability);
}
public KapshoKitefins(final KapshoKitefins card) {
super(card);
}
@Override
public KapshoKitefins copy() {
return new KapshoKitefins(this);
}
}

View file

@ -0,0 +1,137 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetCardInHand;
/**
*
* @author LevelX2
*/
public class MasterOfPredicaments extends CardImpl {
public MasterOfPredicaments(UUID ownerId) {
super(ownerId, 67, "Master of Predicaments", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.expansionSetCode = "M15";
this.subtype.add("Sphinx");
this.color.setBlue(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Master of Predicaments deals combat damage to a player, choose a card in your hand. That player guesses whether the card's converted mana cost is greater than 4. If the player guessed wrong, you may cast the card without paying its mana cost.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new MasterOfPredicamentsEffect(), false, true));
}
public MasterOfPredicaments(final MasterOfPredicaments card) {
super(card);
}
@Override
public MasterOfPredicaments copy() {
return new MasterOfPredicaments(this);
}
}
class MasterOfPredicamentsEffect extends OneShotEffect {
public MasterOfPredicamentsEffect() {
super(Outcome.PutCardInPlay);
this.staticText = "choose a card in your hand. That player guesses whether the card's converted mana cost is greater than 4. If the player guessed wrong, you may cast the card without paying its mana cost";
}
public MasterOfPredicamentsEffect(final MasterOfPredicamentsEffect effect) {
super(effect);
}
@Override
public MasterOfPredicamentsEffect copy() {
return new MasterOfPredicamentsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (controller.getHand().size() > 0) {
Card cardFromHand = null;
if (controller.getHand().size() > 1) {
TargetCard target = new TargetCardInHand(new FilterCard());
if (controller.choose(outcome, controller.getHand(), target, game)) {
cardFromHand = game.getCard(target.getFirstTarget());
}
} else {
cardFromHand = controller.getHand().getRandom(game);
}
if (cardFromHand == null) {
return false;
}
Player attackedPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
if (attackedPlayer == null) {
return false;
}
boolean guessWrong;
if (attackedPlayer.chooseUse(Outcome.Detriment, "Is the choosen card's converted mana cost greater than 4?", game)) {
guessWrong = cardFromHand.getManaCost().convertedManaCost() <= 4;
} else {
guessWrong = cardFromHand.getManaCost().convertedManaCost() > 4;
}
if (guessWrong) {
game.informPlayers(attackedPlayer.getName() + " guessed " + (guessWrong ? "wrong":"right"));
if (cardFromHand.getCardType().contains(CardType.LAND)) {
// If the revealed card is a land, you can't cast it. So nothing happens
} else {
if (controller.chooseUse(outcome, "Cast " + cardFromHand.getName() + " without paying its mana cost?", game)) {
controller.cast(cardFromHand.getSpellAbility(), game, true);
}
}
}
}
return true;
}
return false;
}
}

View 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BecomesTargetTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.EntersBattlefieldEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
import mage.util.functions.ApplyToPermanent;
/**
*
* @author LevelX2
*/
public class MercurialPretender extends CardImpl {
private static final String abilityText = "You may have {this} enter the battlefield as a copy of any creature you control except it gains \"{2}{U}{U}: Return this creature to its owner's hand.\"";
public MercurialPretender(UUID ownerId) {
super(ownerId, 68, "Mercurial Pretender", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}");
this.expansionSetCode = "M15";
this.subtype.add("Shapeshifter");
this.color.setBlue(true);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// You may have Mercurial Pretender enter the battlefield as a copy of any creature you control
// except it gains "{2}{U}{U}: Return this creature to its owner's hand."
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(
new MercurialPretenderCopyEffect(), abilityText, true));
this.addAbility(ability);
}
public MercurialPretender(final MercurialPretender card) {
super(card);
}
@Override
public MercurialPretender copy() {
return new MercurialPretender(this);
}
}
class MercurialPretenderCopyEffect extends OneShotEffect {
public MercurialPretenderCopyEffect() {
super(Outcome.Copy);
}
public MercurialPretenderCopyEffect(final MercurialPretenderCopyEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (player != null && sourcePermanent != null) {
Target target = new TargetPermanent(new FilterControlledCreaturePermanent());
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
player.choose(Outcome.Copy, target, source.getSourceId(), game);
Permanent copyFromPermanent = game.getPermanent(target.getFirstTarget());
if (copyFromPermanent != null) {
game.copyPermanent(copyFromPermanent, sourcePermanent, source, new ApplyToPermanent() {
@Override
public Boolean apply(Game game, Permanent permanent) {
// {2}{U}{U}: Return this creature to its owner's hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}{U}"));
permanent.addAbility(ability, game);
return true;
}
});
return true;
}
}
}
return false;
}
@Override
public MercurialPretenderCopyEffect copy() {
return new MercurialPretenderCopyEffect(this);
}
}

View file

@ -0,0 +1,96 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
/**
*
* @author LevelX2
*/
public class MilitaryIntelligence extends CardImpl {
public MilitaryIntelligence(UUID ownerId) {
super(ownerId, 69, "Military Intelligence", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
this.expansionSetCode = "M15";
this.color.setBlue(true);
// Whenever you attack with two or more creatures, draw a card.
this.addAbility(new MilitaryIntelligenceTriggeredAbility(new DrawCardSourceControllerEffect(1)));
}
public MilitaryIntelligence(final MilitaryIntelligence card) {
super(card);
}
@Override
public MilitaryIntelligence copy() {
return new MilitaryIntelligence(this);
}
}
class MilitaryIntelligenceTriggeredAbility extends TriggeredAbilityImpl {
public MilitaryIntelligenceTriggeredAbility(Effect effect) {
super(Zone.BATTLEFIELD, effect);
}
public MilitaryIntelligenceTriggeredAbility(final MilitaryIntelligenceTriggeredAbility ability) {
super(ability);
}
@Override
public MilitaryIntelligenceTriggeredAbility copy() {
return new MilitaryIntelligenceTriggeredAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.DECLARED_ATTACKERS) {
if (game.getCombat().getAttackers().size() >= 2 && game.getCombat().getAttackerId().equals(getControllerId())) {
return true;
}
}
return false;
}
@Override
public String getRule() {
return new StringBuilder("Whenever you attack with two or more creatures, ").append(super.getRule()).toString() ;
}
}

View file

@ -0,0 +1,98 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BoostAllEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
* @author LevelX2
*/
public class ParagonOfGatheringMists extends CardImpl {
private static final FilterCreaturePermanent filterBlue = new FilterCreaturePermanent("blue creatures you control");
private static final FilterControlledCreaturePermanent filterBlue2 = new FilterControlledCreaturePermanent("another target blue creature you control");
static {
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));
filterBlue.add(new ControllerPredicate(TargetController.YOU));
filterBlue2.add(new ColorPredicate(ObjectColor.BLUE));
filterBlue2.add(new AnotherPredicate());
}
public ParagonOfGatheringMists(UUID ownerId) {
super(ownerId, 73, "Paragon of Gathering Mists", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.expansionSetCode = "M15";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Other blue creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filterBlue, true)));
// {U}, {T}: Another target blue creature you control gains flying until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(),Duration.EndOfTurn), new ManaCostsImpl("{U}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetControlledCreaturePermanent(filterBlue2));
this.addAbility(ability);
}
public ParagonOfGatheringMists(final ParagonOfGatheringMists card) {
super(card);
}
@Override
public ParagonOfGatheringMists copy() {
return new ParagonOfGatheringMists(this);
}
}

View file

@ -0,0 +1,150 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.SubLayer;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPlayer;
/**
*
* @author LevelX2
*/
public class PolymorphistsJest extends CardImpl {
public PolymorphistsJest(UUID ownerId) {
super(ownerId, 75, "Polymorphist's Jest", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
this.expansionSetCode = "M15";
this.color.setBlue(true);
// Until end of turn, each creature target player controls loses all abilities and becomes a blue Frog with base power and toughness 1/1.
this.getSpellAbility().addEffect(new PolymorphistsJestEffect());
this.getSpellAbility().addTarget(new TargetPlayer());
}
public PolymorphistsJest(final PolymorphistsJest card) {
super(card);
}
@Override
public PolymorphistsJest copy() {
return new PolymorphistsJest(this);
}
}
class PolymorphistsJestEffect extends ContinuousEffectImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
public PolymorphistsJestEffect() {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
staticText = "Until end of turn, each creature target player controls loses all abilities and becomes a blue Frog with base power and toughness 1/1";
}
public PolymorphistsJestEffect(final PolymorphistsJestEffect effect) {
super(effect);
}
@Override
public PolymorphistsJestEffect copy() {
return new PolymorphistsJestEffect(this);
}
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == SubLayer.NA) {
objects.clear();
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, getTargetPointer().getFirst(game, source), game)){
if(permanent != null){
objects.add(permanent.getId());
permanent.getSubtype().clear();
permanent.getSubtype().add("Frog");
}
}
}
break;
case ColorChangingEffects_5:
if (sublayer == SubLayer.NA) {
for(UUID uuid : objects){
Permanent permanent = game.getPermanent(uuid);
if (permanent != null){
permanent.getColor().setColor(ObjectColor.BLUE);
}
}
}
break;
case AbilityAddingRemovingEffects_6:
for(UUID uuid : objects){
Permanent permanent = game.getPermanent(uuid);
if (permanent != null){
permanent.removeAllAbilities(source.getSourceId(), game);
}
}
break;
case PTChangingEffects_7:
if (sublayer == SubLayer.SetPT_7b) {
for(UUID uuid : objects){
Permanent permanent = game.getPermanent(uuid);
if(permanent != null){
permanent.getPower().setValue(1);
permanent.getToughness().setValue(1);
}
}
}
}
return true;
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean hasLayer(Layer layer) {
return layer == Layer.PTChangingEffects_7 || layer == Layer.ColorChangingEffects_5 || layer == Layer.AbilityAddingRemovingEffects_6 || layer == Layer.TypeChangingEffects_4;
}
}

View 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.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
/**
*
* @author LevelX2
*/
public class Quickling extends CardImpl {
public Quickling(UUID ownerId) {
super(ownerId, 76, "Quickling", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.expansionSetCode = "M15";
this.subtype.add("Faerie");
this.subtype.add("Rogue");
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Flash
this.addAbility(FlashAbility.getInstance());
// When Quickling enters the battlefield, sacrifice it unless you return another creature you control to its owner's hand.
this.addAbility(new EntersBattlefieldTriggeredAbility(new QuicklingEffect()));
}
public Quickling(final Quickling card) {
super(card);
}
@Override
public Quickling copy() {
return new Quickling(this);
}
}
class QuicklingEffect extends OneShotEffect {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
private static final String effectText = "sacrifice it unless you return another creature you control to its owner's hand";
static {
filter.add(new AnotherPredicate());
}
QuicklingEffect ( ) {
super(Outcome.ReturnToHand);
staticText = effectText;
}
QuicklingEffect ( QuicklingEffect effect ) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
boolean targetChosen = false;
TargetPermanent target = new TargetPermanent(1, 1, filter, false);
if (target.canChoose(controller.getId(), game)) {
controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game);
Permanent permanent = game.getPermanent(target.getFirstTarget());
if ( permanent != null ) {
targetChosen = true;
controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
}
}
if ( !targetChosen ) {
new SacrificeSourceEffect().apply(game, source);
}
return true;
}
return false;
}
@Override
public QuicklingEffect copy() {
return new QuicklingEffect(this);
}
}

View file

@ -0,0 +1,73 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.magic2015;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LevelX2
*/
public class ResearchAssistant extends CardImpl {
public ResearchAssistant(UUID ownerId) {
super(ownerId, 77, "Research Assistant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.expansionSetCode = "M15";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// {3}{U}, {T}: Draw a card, then discard a card.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new ManaCostsImpl("{3}{U}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
public ResearchAssistant(final ResearchAssistant card) {
super(card);
}
@Override
public ResearchAssistant copy() {
return new ResearchAssistant(this);
}
}

View file

@ -0,0 +1,128 @@
/*
* 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.magic2015;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileSourceFromGraveCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class SoulOfRavnica extends CardImpl {
public SoulOfRavnica(UUID ownerId) {
super(ownerId, 78, "Soul of Ravnica", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{U}{U}");
this.expansionSetCode = "M15";
this.subtype.add("Avatar");
this.color.setBlue(true);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// Flying
this.addAbility(FlyingAbility.getInstance());
// {5}{U}{U}: Draw a card for each color among permanents you control.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulOfRavnicaEffect(), new ManaCostsImpl("{5}{U}{U}")));
// {5}{U}{U}, Exile Soul of Ravnica from your graveyard: Draw a card for each color among permanents you control.
Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new SoulOfRavnicaEffect(), new ManaCostsImpl("{5}{U}{U}"));
ability.addCost(new ExileSourceFromGraveCost());
this.addAbility(ability);
}
public SoulOfRavnica(final SoulOfRavnica card) {
super(card);
}
@Override
public SoulOfRavnica copy() {
return new SoulOfRavnica(this);
}
}
class SoulOfRavnicaEffect extends OneShotEffect {
public SoulOfRavnicaEffect() {
super(Outcome.DrawCard);
this.staticText = "Draw a card for each color among permanents you control";
}
public SoulOfRavnicaEffect(final SoulOfRavnicaEffect effect) {
super(effect);
}
@Override
public SoulOfRavnicaEffect copy() {
return new SoulOfRavnicaEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
HashSet<ObjectColor> colors = new HashSet<>();
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) {
if (permanent.getColor().isBlack()) {
colors.add(ObjectColor.BLACK);
}
if (permanent.getColor().isBlue()) {
colors.add(ObjectColor.BLUE);
}
if (permanent.getColor().isRed()) {
colors.add(ObjectColor.RED);
}
if (permanent.getColor().isGreen()) {
colors.add(ObjectColor.GREEN);
}
if (permanent.getColor().isWhite()) {
colors.add(ObjectColor.WHITE);
}
}
controller.drawCards(colors.size(), game);
return true;
}
return false;
}
}

View file

@ -32,6 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileSourceCost;
import mage.abilities.costs.common.ExileSourceFromGraveCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continious.BoostControlledEffect;
@ -77,7 +78,7 @@ public class SoulOfTheros extends CardImpl {
// {4}{W}{W}, Exile Soul of Theros from your graveyard: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn.
ability = new SimpleActivatedAbility(Zone.GRAVEYARD, effect1, new ManaCostsImpl("{4}{W}{W}"));
ability.addCost(new ExileSourceCost());
ability.addCost(new ExileSourceFromGraveCost());
ability.addEffect(effect2);
ability.addEffect(effect3);
this.addAbility(ability);

View file

@ -0,0 +1,79 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.magic2015;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.condition.common.ControlsPermanentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.TargetSpell;
/**
*
* @author LevelX2
*/
public class StatuteOfDenial extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creature");
static {
filter.add(new ColorPredicate(ObjectColor.BLUE));
}
public StatuteOfDenial(UUID ownerId) {
super(ownerId, 79, "Statute of Denial", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
this.expansionSetCode = "M15";
this.color.setBlue(true);
// Counter target spell. If you control a blue creature, draw a card, then discard a card.
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell());
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DrawDiscardControllerEffect(1,1),
new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.MORE_THAN, 0, true),
"If you control a blue creature, draw a card, then discard a card"));
}
public StatuteOfDenial(final StatuteOfDenial card) {
super(card);
}
@Override
public StatuteOfDenial copy() {
return new StatuteOfDenial(this);
}
}

View file

@ -0,0 +1,62 @@
/*
* 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.magic2015;
import java.util.UUID;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.common.TargetNonlandPermanent;
/**
*
* @author LevelX2
*/
public class VoidSnare extends CardImpl {
public VoidSnare(UUID ownerId) {
super(ownerId, 82, "Void Snare", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}");
this.expansionSetCode = "M15";
this.color.setBlue(true);
// Return target nonland permanent to its owner's hand.
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
}
public VoidSnare(final VoidSnare card) {
super(card);
}
@Override
public VoidSnare copy() {
return new VoidSnare(this);
}
}

View file

@ -100,24 +100,26 @@ class FaerieImpostorEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
boolean targetChosen = false;
Player player = game.getPlayer(source.getControllerId());
TargetPermanent target = new TargetPermanent(1, 1, filter, false);
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
boolean targetChosen = false;
TargetPermanent target = new TargetPermanent(1, 1, filter, false);
if (target.canChoose(player.getId(), game)) {
player.choose(Outcome.ReturnToHand, target, source.getSourceId(), game);
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (target.canChoose(controller.getId(), game)) {
controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game);
Permanent permanent = game.getPermanent(target.getFirstTarget());
if ( permanent != null ) {
targetChosen = true;
permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
if ( permanent != null ) {
targetChosen = true;
controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
}
}
}
if ( !targetChosen ) {
new SacrificeSourceEffect().apply(game, source);
if ( !targetChosen ) {
new SacrificeSourceEffect().apply(game, source);
}
return true;
}
return false;
}

View file

@ -240,18 +240,24 @@ public class ObjectColor implements Serializable, Copyable<ObjectColor>, Compara
}
public boolean contains(ObjectColor color) {
if (this == color)
if (this == color) {
return true;
if (color.white & this.white)
}
if (color.white & this.white) {
return true;
if (color.blue & this.blue)
}
if (color.blue & this.blue) {
return true;
if (color.black & this.black)
}
if (color.black & this.black) {
return true;
if (color.red & this.red)
}
if (color.red & this.red) {
return true;
if (color.green & this.green)
}
if (color.green & this.green) {
return true;
}
return false;
}

View file

@ -198,6 +198,9 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
if (numberToPick.calculate(null, null) > 0) {

View file

@ -141,6 +141,9 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
Target target = mode.getTargets().get(0);
if(target.getMaxNumberOfTargets() > 1){

View file

@ -74,6 +74,9 @@ public class LoseAllAbilitiesTargetEffect extends ContinuousEffectImpl {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
sb.append("Target ").append(mode.getTargets().get(0).getTargetName()).append(" loses all abilities ").append(duration.toString());
return sb.toString();