Added Grinding Stone ; Terrarion and Krak-Clan Ironworks. Made targets of Tamiyo the Moon Sage mandatory.

This commit is contained in:
LevelX2 2013-05-24 08:30:25 +02:00
parent 6718332f6a
commit 25b283483f
4 changed files with 283 additions and 2 deletions

View file

@ -56,6 +56,7 @@ import mage.game.Game;
import mage.game.command.Emblem; import mage.game.command.Emblem;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent; import mage.game.events.ZoneChangeEvent;
import mage.target.Target;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
@ -79,12 +80,14 @@ public class TamiyoTheMoonSage extends CardImpl<TamiyoTheMoonSage> {
// +1: Tap target permanent. It doesn't untap during its controller's next untap step. // +1: Tap target permanent. It doesn't untap during its controller's next untap step.
LoyaltyAbility ability = new LoyaltyAbility(new TapTargetEffect(), 1); LoyaltyAbility ability = new LoyaltyAbility(new TapTargetEffect(), 1);
ability.addEffect(new SkipNextUntapTargetEffect()); ability.addEffect(new SkipNextUntapTargetEffect());
ability.addTarget(new TargetPermanent()); Target target = new TargetPermanent();
target.setRequired(true);
ability.addTarget(target);
this.addAbility(ability); this.addAbility(ability);
// -2: Draw a card for each tapped creature target player controls. // -2: Draw a card for each tapped creature target player controls.
ability = new LoyaltyAbility(new DrawCardControllerEffect(new TappedCreaturesControlledByTargetCount()), -2); ability = new LoyaltyAbility(new DrawCardControllerEffect(new TappedCreaturesControlledByTargetCount()), -2);
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer(true));
this.addAbility(ability); this.addAbility(ability);
// -8: You get an emblem with "You have no maximum hand size" and "Whenever a card is put into your graveyard from anywhere, you may return it to your hand." // -8: You get an emblem with "You have no maximum hand size" and "Whenever a card is put into your graveyard from anywhere, you may return it to your hand."

View file

@ -0,0 +1,83 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.fifthdawn;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.PutTopCardOfTargetPlayerLibraryIntoGraveEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.TargetPlayer;
import mage.target.common.TargetControlledPermanent;
/**
*
* @author LevelX2
*/
public class GrindingStation extends CardImpl<GrindingStation> {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
static {
filter.add(new CardTypePredicate(CardType.ARTIFACT));
}
public GrindingStation(UUID ownerId) {
super(ownerId, 127, "Grinding Station", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "5DN";
// {tap}, Sacrifice an artifact: Target player puts the top three cards of his or her library into his or her graveyard.
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PutTopCardOfTargetPlayerLibraryIntoGraveEffect(3), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetPlayer(true));
this.addAbility(ability);
// Whenever an artifact enters the battlefield, you may untap Grinding Station.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterArtifactPermanent("an artifact"), true));
}
public GrindingStation(final GrindingStation card) {
super(card);
}
@Override
public GrindingStation copy() {
return new GrindingStation(this);
}
}

View file

@ -0,0 +1,66 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.fifthdawn;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledArtifactPermanent;
import mage.target.common.TargetControlledPermanent;
/**
*
* @author LevelX2
*/
public class KrarkClanIronworks extends CardImpl<KrarkClanIronworks> {
public KrarkClanIronworks(UUID ownerId) {
super(ownerId, 134, "Krark-Clan Ironworks", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "5DN";
// Sacrifice an artifact: Add {2} to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
this.addAbility(ability);
}
public KrarkClanIronworks(final KrarkClanIronworks card) {
super(card);
}
@Override
public KrarkClanIronworks copy() {
return new KrarkClanIronworks(this);
}
}

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.ravnika;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.ManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class Terrarion extends CardImpl<Terrarion> {
public Terrarion(UUID ownerId) {
super(ownerId, 273, "Terrarion", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
this.expansionSetCode = "RAV";
// Terrarion enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {2}, {tap}, Sacrifice Terrarion: Add two mana in any combination of colors to your mana pool.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new TerrarionManaEffect(), new GenericManaCost(2));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addChoice(new ChoiceColor());
ability.addChoice(new ChoiceColor());
this.addAbility(ability);
// When Terrarion is put into a graveyard from the battlefield, draw a card.
this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new DrawCardControllerEffect(1)));
}
public Terrarion(final Terrarion card) {
super(card);
}
@Override
public Terrarion copy() {
return new Terrarion(this);
}
}
class TerrarionManaEffect extends ManaEffect<TerrarionManaEffect> {
public TerrarionManaEffect() {
super();
this.staticText = "Add two mana in any combination of colors to your mana pool";
}
public TerrarionManaEffect(final TerrarionManaEffect effect) {
super(effect);
}
@Override
public TerrarionManaEffect copy() {
return new TerrarionManaEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
boolean result = false;
for (int i = 0; i < 2; i++) {
ChoiceColor choice = (ChoiceColor) source.getChoices().get(i);
Mana mana = null;
if (choice.getColor().isBlack()) {
mana = Mana.BlackMana(1);
} else if (choice.getColor().isBlue()) {
mana = Mana.BlueMana(1);
} else if (choice.getColor().isRed()) {
mana = Mana.RedMana(1);
} else if (choice.getColor().isGreen()) {
mana = Mana.GreenMana(1);
} else if (choice.getColor().isWhite()) {
mana = Mana.WhiteMana(1);
}
if (mana != null) {
player.getManaPool().addMana(mana, game, source);
result = true;
}
}
return result;
}
}