Added cards.

This commit is contained in:
North 2011-07-03 20:39:07 +03:00
parent a0ed8dbe01
commit f35be4d99c
8 changed files with 551 additions and 2 deletions

View file

@ -0,0 +1,145 @@
/*
* 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.List;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.target.TargetCard;
/**
*
* @author North
*/
public class MorbidPlunder extends CardImpl<MorbidPlunder> {
private static final FilterCreatureCard filter = new FilterCreatureCard();
public MorbidPlunder(UUID ownerId) {
super(ownerId, 47, "Morbid Plunder", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
this.expansionSetCode = "MBS";
this.color.setBlack(true);
this.getSpellAbility().addEffect(new MorbidPlunderEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, filter));
}
public MorbidPlunder(final MorbidPlunder card) {
super(card);
}
@Override
public MorbidPlunder copy() {
return new MorbidPlunder(this);
}
}
class MorbidPlunderEffect extends OneShotEffect<MorbidPlunderEffect> {
public MorbidPlunderEffect() {
super(Outcome.ReturnToHand);
}
public MorbidPlunderEffect(final MorbidPlunderEffect effect) {
super(effect);
}
@Override
public MorbidPlunderEffect copy() {
return new MorbidPlunderEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
boolean result = false;
List<UUID> targets = source.getTargets().get(0).getTargets();
if (targets.size() > 0) {
for (UUID target : targets) {
Card card = game.getCard(target);
if (card != null) {
result |= card.moveToZone(Zone.HAND, source.getId(), game, true);
}
}
}
return result;
}
@Override
public String getText(Ability source) {
return "Return up to two target creature cards from your graveyard to your hand";
}
}
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,64 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.newphyrexia;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.continious.AddCardTypeTargetEffect;
import mage.cards.CardImpl;
import mage.target.TargetPermanent;
/**
*
* @author North
*/
public class ArgentMutation extends CardImpl<ArgentMutation> {
public ArgentMutation(UUID ownerId) {
super(ownerId, 27, "Argent Mutation", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}");
this.expansionSetCode = "NPH";
this.color.setBlue(true);
this.getSpellAbility().addEffect(new AddCardTypeTargetEffect(CardType.ARTIFACT, Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetPermanent());
this.getSpellAbility().addEffect(new DrawCardControllerEffect(1));
}
public ArgentMutation(final ArgentMutation card) {
super(card);
}
@Override
public ArgentMutation copy() {
return new ArgentMutation(this);
}
}

View file

@ -50,7 +50,7 @@ import java.util.UUID;
* @author Loki * @author Loki
*/ */
public class BarrageOgre extends CardImpl<BarrageOgre> { public class BarrageOgre extends CardImpl<BarrageOgre> {
private static FilterControlledPermanent filter = new FilterControlledPermanent("an artifact"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
static { static {
filter.getCardType().add(CardType.ARTIFACT); filter.getCardType().add(CardType.ARTIFACT);

View file

@ -0,0 +1,107 @@
/*
* 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.scarsofmirrodin;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.CostImpl;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author North
*/
public class BloodshotTrainee extends CardImpl<BloodshotTrainee> {
public BloodshotTrainee(UUID ownerId) {
super(ownerId, 85, "Bloodshot Trainee", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.expansionSetCode = "SOM";
this.subtype.add("Goblin");
this.subtype.add("Warrior");
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent());
ability.addCost(new BloodshotTraineeCost());
this.addAbility(ability);
}
public BloodshotTrainee(final BloodshotTrainee card) {
super(card);
}
@Override
public BloodshotTrainee copy() {
return new BloodshotTrainee(this);
}
}
class BloodshotTraineeCost extends CostImpl<BloodshotTraineeCost> {
public BloodshotTraineeCost() {
this.text = "Activate this ability only if Bloodshot Trainee's power is 4 or greater";
}
public BloodshotTraineeCost(final BloodshotTraineeCost cost) {
super(cost);
}
@Override
public BloodshotTraineeCost copy() {
return new BloodshotTraineeCost(this);
}
@Override
public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null) {
if (permanent.getPower().getValue() >= 4) {
return true;
}
}
return false;
}
@Override
public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
this.paid = true;
return paid;
}
}

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.tenth;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterAttackingCreature;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author North
*/
public class Quicksand extends CardImpl<Quicksand> {
private static final FilterAttackingCreature filter = new FilterAttackingCreature("attacking creature without flying");
static {
filter.getAbilities().add(FlyingAbility.getInstance());
filter.setNotAbilities(true);
}
public Quicksand(UUID ownerId) {
super(ownerId, 356, "Quicksand", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "10E";
this.addAbility(new ColorlessManaAbility());
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostTargetEffect(-1, -2, Duration.EndOfTurn),
new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}
public Quicksand(final Quicksand card) {
super(card);
}
@Override
public Quicksand copy() {
return new Quicksand(this);
}
}

View file

@ -0,0 +1,101 @@
/*
* 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.worldwake;
import java.util.ArrayList;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
/**
*
* @author North
*/
public class BojukaBog extends CardImpl<BojukaBog> {
public BojukaBog(UUID ownerId) {
super(ownerId, 132, "Bojuka Bog", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "WWK";
this.addAbility(new EntersBattlefieldTappedAbility());
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BojukaBogEffect());
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
this.addAbility(new BlackManaAbility());
}
public BojukaBog(final BojukaBog card) {
super(card);
}
@Override
public BojukaBog copy() {
return new BojukaBog(this);
}
}
class BojukaBogEffect extends OneShotEffect<BojukaBogEffect> {
public BojukaBogEffect() {
super(Outcome.Exile);
}
@Override
public BojukaBogEffect copy() {
return new BojukaBogEffect();
}
@Override
public boolean apply(Game game, Ability source) {
Player targetPlayer = game.getPlayer(source.getFirstTarget());
if (targetPlayer != null) {
ArrayList<UUID> graveyard = new ArrayList<UUID>(targetPlayer.getGraveyard());
for (UUID cardId : graveyard) {
game.getCard(cardId).moveToZone(Zone.EXILED, cardId, game, false);
}
return true;
}
return false;
}
@Override
public String getText(Ability source) {
return "exile all cards from target player's graveyard";
}
}

View file

@ -0,0 +1,54 @@
/*
* 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.worldwake;
import java.util.UUID;
import mage.Constants.Rarity;
/**
*
* @author North
*/
public class Quicksand extends mage.sets.tenth.Quicksand {
public Quicksand(UUID ownerId) {
super(ownerId);
this.cardNumber = 140;
this.rarity = Rarity.COMMON;
this.expansionSetCode = "WWK";
}
public Quicksand(final Quicksand card) {
super(card);
}
@Override
public Quicksand copy() {
return new Quicksand(this);
}
}

View file

@ -35,7 +35,6 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player;
/** /**
* *