Added cards.

This commit is contained in:
North 2011-08-03 20:04:31 +03:00
parent 8d404138c3
commit a9e2bfe52a
7 changed files with 289 additions and 45 deletions

View file

@ -0,0 +1,125 @@
/*
* 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.magic2012;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.ActivateOncePerTurnActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
/**
*
* @author North
*/
public class Skinshifter extends CardImpl<Skinshifter> {
public Skinshifter(UUID ownerId) {
super(ownerId, 195, "Skinshifter", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.expansionSetCode = "M12";
this.subtype.add("Human");
this.subtype.add("Shaman");
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
Ability ability = new ActivateOncePerTurnActivatedAbility(Zone.BATTLEFIELD,
new BecomesCreatureSourceEOTEffect(new RhinoToken(), ""),
new ManaCostsImpl("{G}"));
Mode mode = new Mode();
mode.getEffects().add(new BecomesCreatureSourceEOTEffect(new BirdToken(), ""));
ability.addMode(mode);
mode = new Mode();
mode.getEffects().add(new BecomesCreatureSourceEOTEffect(new PlantToken(), ""));
ability.addMode(mode);
this.addAbility(ability);
}
public Skinshifter(final Skinshifter card) {
super(card);
}
@Override
public Skinshifter copy() {
return new Skinshifter(this);
}
private class RhinoToken extends Token {
public RhinoToken() {
super("Rhino", "4/4 Rhino with trample");
this.cardType.add(CardType.CREATURE);
this.subtype.add("Rhino");
this.color.setGreen(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
this.addAbility(TrampleAbility.getInstance());
}
}
private class BirdToken extends Token {
public BirdToken() {
super("Bird", "2/2 Bird with flying");
this.cardType.add(CardType.CREATURE);
this.subtype.add("Bird");
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.addAbility(FlyingAbility.getInstance());
}
}
private class PlantToken extends Token {
public PlantToken() {
super("Plant", "0/8 Plant");
this.cardType.add(CardType.CREATURE);
this.subtype.add("Plant");
this.color.setGreen(true);
this.power = new MageInt(0);
this.toughness = new MageInt(8);
}
}
}

View file

@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard;
import java.util.UUID;
import mage.target.common.TargetCardInYourGraveyard;
/**
*

View file

@ -37,10 +37,9 @@ import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.target.TargetCard;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
@ -100,43 +99,4 @@ class MorbidPlunderEffect extends OneShotEffect<MorbidPlunderEffect> {
}
return result;
}
}
class TargetCardInYourGraveyard extends TargetCard<TargetCardInYourGraveyard> {
public TargetCardInYourGraveyard() {
this(1, 1, new FilterCard());
}
public TargetCardInYourGraveyard(FilterCard filter) {
this(1, 1, filter);
}
public TargetCardInYourGraveyard(int numTargets, FilterCard filter) {
this(numTargets, numTargets, filter);
}
public TargetCardInYourGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
super(minNumTargets, maxNumTargets, Zone.GRAVEYARD, filter);
this.targetName = filter.getMessage() + " in your graveyard";
}
public TargetCardInYourGraveyard(final TargetCardInYourGraveyard target) {
super(target);
}
@Override
public boolean canTarget(UUID id, Ability source, Game game) {
Card card = game.getCard(id);
if (card != null && game.getZone(card.getId()) == Zone.GRAVEYARD && card.getOwnerId().equals(source.getControllerId()))
return filter.match(card);
return false;
}
@Override
public TargetCardInYourGraveyard copy() {
return new TargetCardInYourGraveyard(this);
}
}

View file

@ -0,0 +1,76 @@
/*
* 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.mirrodinbesieged;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Mode;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.filter.FilterSpell;
import mage.target.TargetSpell;
import mage.target.common.TargetArtifactPermanent;
/**
*
* @author North
*/
public class SteelSabotage extends CardImpl<SteelSabotage> {
private static final FilterSpell filter = new FilterSpell("artifact spell");
static {
filter.getCardType().add(CardType.ARTIFACT);
}
public SteelSabotage(UUID ownerId) {
super(ownerId, 33, "Steel Sabotage", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}");
this.expansionSetCode = "MBS";
this.color.setBlue(true);
// Choose one - Counter target artifact spell; or return target artifact to its owner's hand.
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell(filter));
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetArtifactPermanent());
this.getSpellAbility().addMode(mode);
}
public SteelSabotage(final SteelSabotage card) {
super(card);
}
@Override
public SteelSabotage copy() {
return new SteelSabotage(this);
}
}

View file

@ -0,0 +1,86 @@
/*
* 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.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.TargetController;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.filter.FilterPermanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent;
/**
*
* @author North
*/
public class DeceiverExarch extends CardImpl<DeceiverExarch> {
private static final FilterPermanent filter = new FilterPermanent("permanent an opponent controls");
static {
filter.setTargetController(TargetController.OPPONENT);
}
public DeceiverExarch(UUID ownerId) {
super(ownerId, 33, "Deceiver Exarch", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.expansionSetCode = "NPH";
this.subtype.add("Cleric");
this.color.setBlue(true);
this.power = new MageInt(1);
this.toughness = new MageInt(4);
this.addAbility(FlashAbility.getInstance());
// When Deceiver Exarch enters the battlefield, choose one - Untap target permanent you control; or tap target permanent an opponent controls.
Ability ability = new EntersBattlefieldTriggeredAbility(new UntapTargetEffect());
ability.addTarget(new TargetControlledPermanent());
Mode mode = new Mode();
mode.getEffects().add(new TapTargetEffect());
mode.getTargets().add(new TargetPermanent(filter));
ability.addMode(mode);
this.addAbility(ability);
}
public DeceiverExarch(final DeceiverExarch card) {
super(card);
}
@Override
public DeceiverExarch copy() {
return new DeceiverExarch(this);
}
}

View file

@ -39,14 +39,11 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.watchers.Watcher;
import mage.watchers.WatcherImpl;
import java.util.*;

View file

@ -28,7 +28,6 @@
package mage.abilities.costs.common;
import java.util.List;
import java.util.UUID;
import mage.Constants.Outcome;
import mage.abilities.costs.CostImpl;