Merge origin/master

This commit is contained in:
LevelX2 2015-07-01 01:57:23 +02:00
commit 5f5513f4ed
12 changed files with 768 additions and 116 deletions

View file

@ -29,14 +29,11 @@
package mage.sets.magic2011; package mage.sets.magic2011;
import java.util.UUID; import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.FilterCard; import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterInstantOrSorceryCard; import mage.filter.common.FilterInstantOrSorceryCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
/** /**

View file

@ -0,0 +1,69 @@
/*
* 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.magicorigins;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.game.permanent.token.ThopterColorlessToken;
/**
*
* @author fireshoes
*/
public class AspiringAeronaut extends CardImpl {
public AspiringAeronaut(UUID ownerId) {
super(ownerId, 46, "Aspiring Aeronaut", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.expansionSetCode = "ORI";
this.subtype.add("Human");
this.subtype.add("Artificer");
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Aspiring Aeronaut enters the battlefield, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken("ORI"))));
}
public AspiringAeronaut(final AspiringAeronaut card) {
super(card);
}
@Override
public AspiringAeronaut copy() {
return new AspiringAeronaut(this);
}
}

View file

@ -0,0 +1,61 @@
/*
* 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.magicorigins;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.TargetSpell;
/**
*
* @author fireshoes
*/
public class ClashOfWills extends CardImpl {
public ClashOfWills(UUID ownerId) {
super(ownerId, 49, "Clash of Wills", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{U}");
this.expansionSetCode = "ORI";
// Counter target spell unless its controller pays {X}.
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManacostVariableValue()));
this.getSpellAbility().addTarget(new TargetSpell());
}
public ClashOfWills(final ClashOfWills card) {
super(card);
}
@Override
public ClashOfWills copy() {
return new ClashOfWills(this);
}
}

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.magicorigins;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileFromGraveCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.filter.common.FilterInstantOrSorceryCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.target.TargetSpell;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author fireshoes
*/
public class DiscipleOfTheRing extends CardImpl {
private static final FilterSpell filterSpell = new FilterSpell("noncreature spell");
static {
filterSpell.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
}
public DiscipleOfTheRing(UUID ownerId) {
super(ownerId, 53, "Disciple of the Ring", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.expansionSetCode = "ORI";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// {1}, Exile an instant or sorcery card from your graveyard: Choose one - Counter target noncreature spell unless its controller pay {2};
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(2)), new GenericManaCost(1));
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(1, new FilterInstantOrSorceryCard("an instant or sorcery card from your graveyard"))));
ability.addTarget(new TargetSpell(filterSpell));
// or Disciple of the Ring gets +1/+1 until end of turn;
Mode mode = new Mode();
mode.getEffects().add(new BoostSourceEffect(1, 1, Duration.EndOfTurn));
ability.addMode(mode);
// or Tap target creature;
mode = new Mode();
mode.getEffects().add(new TapTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
ability.addMode(mode);
// or Untap target creature.
mode = new Mode();
mode.getEffects().add(new UntapTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
ability.addMode(mode);
this.addAbility(ability);
}
public DiscipleOfTheRing(final DiscipleOfTheRing card) {
super(card);
}
@Override
public DiscipleOfTheRing copy() {
return new DiscipleOfTheRing(this);
}
}

View file

@ -0,0 +1,120 @@
/*
* 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.magicorigins;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.CountersCount;
import mage.abilities.effects.EntersBattlefieldEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.ThopterColorlessToken;
/**
*
* @author fireshoes
*/
public class HangarbackWalker extends CardImpl {
public HangarbackWalker(UUID ownerId) {
super(ownerId, 229, "Hangarback Walker", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{X}{X}");
this.expansionSetCode = "ORI";
this.subtype.add("Construct");
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Hangarback Walker enters the battlefield with X +1/+1 counters on it.
this.addAbility(new EntersBattlefieldAbility(new HangarbackWalkerEffect(), "with X +1/+1 counters on it"));
// When Hangarback Walker dies, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield for each +1/+1 counter on Hangarback Walker.
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken("ORI"), new CountersCount(CounterType.P1P1)), false));
// {1}, {t}: Put a +1/+1 counter on Hangarback Walker.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
public HangarbackWalker(final HangarbackWalker card) {
super(card);
}
@Override
public HangarbackWalker copy() {
return new HangarbackWalker(this);
}
}
class HangarbackWalkerEffect extends OneShotEffect {
public HangarbackWalkerEffect() {
super(Outcome.BoostCreature);
staticText = "{this} enters the battlefield with X +1/+1 counters on it";
}
public HangarbackWalkerEffect(final HangarbackWalkerEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
if (obj != null && obj instanceof SpellAbility) {
int amount = ((SpellAbility)obj).getManaCostsToPay().getX();
if (amount > 0) {
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
}
}
}
return true;
}
@Override
public HangarbackWalkerEffect copy() {
return new HangarbackWalkerEffect(this);
}
}

View file

@ -1,95 +1,81 @@
/* /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, are * Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met: * permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this list of * 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer. * conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list * 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 * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution. * provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * 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 * 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 * 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 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * 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 * 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 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* The views and conclusions contained in the software and documentation are those of the * 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 * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.sets.magicorigins; package mage.sets.magicorigins;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl;
import mage.cards.CardImpl; import mage.constants.CardType;
import mage.constants.CardType; import mage.constants.Rarity;
import mage.constants.Rarity; import mage.constants.Zone;
import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.common.FilterControlledArtifactPermanent; import mage.game.permanent.token.ThopterColorlessToken;
import mage.game.permanent.token.Token; import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreatureOrPlayer;
/**
/** *
* * @author LevelX2
* @author LevelX2 */
*/ public class PiaAndKiranNalaar extends CardImpl {
public class PiaAndKiranNalaar extends CardImpl {
public PiaAndKiranNalaar(UUID ownerId) {
public PiaAndKiranNalaar(UUID ownerId) { super(ownerId, 157, "Pia and Kiran Nalaar", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
super(ownerId, 157, "Pia and Kiran Nalaar", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.expansionSetCode = "ORI";
this.expansionSetCode = "ORI"; this.supertype.add("Legendary");
this.supertype.add("Legendary"); this.subtype.add("Human");
this.subtype.add("Human"); this.subtype.add("Artificer");
this.subtype.add("Artificer"); this.power = new MageInt(2);
this.power = new MageInt(2); this.toughness = new MageInt(2);
this.toughness = new MageInt(2);
// When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield.
// When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ThopterColorlessToken("ORI"), 2)));
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PiaAndKiranNalaarThopterToken(), 2)));
// {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player.
// {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterControlledArtifactPermanent("an artifact"),true)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterControlledArtifactPermanent("an artifact"),true))); ability.addTarget(new TargetCreatureOrPlayer());
ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability);
this.addAbility(ability); }
}
public PiaAndKiranNalaar(final PiaAndKiranNalaar card) {
public PiaAndKiranNalaar(final PiaAndKiranNalaar card) { super(card);
super(card); }
}
@Override
@Override public PiaAndKiranNalaar copy() {
public PiaAndKiranNalaar copy() { return new PiaAndKiranNalaar(this);
return new PiaAndKiranNalaar(this); }
}
}
class PiaAndKiranNalaarThopterToken extends Token {
PiaAndKiranNalaarThopterToken() {
super("Thopter", "a 1/1 colorless Thopter artifact creature token with flying");
cardType.add(CardType.CREATURE);
cardType.add(CardType.ARTIFACT);
subtype.add("Thopter");
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(FlyingAbility.getInstance());
}
} }

View file

@ -0,0 +1,155 @@
/*
* 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.magicorigins;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterArtifactPermanent;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.ThopterColorlessToken;
/**
*
* @author fireshoes
*/
public class ThopterSpyNetwork extends CardImpl {
public ThopterSpyNetwork(UUID ownerId) {
super(ownerId, 79, "Thopter Spy Network", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
this.expansionSetCode = "ORI";
// At the beginning of your upkeep, if you control an artifact, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield.
this.addAbility(new ThopterSpyNetworkUpkeepTriggeredAbility());
// Whenever one or more artifact creatures you control deals combat damage to a player, draw a card.
this.addAbility(new ThopterSpyNetworkDamageTriggeredAbility());
}
public ThopterSpyNetwork(final ThopterSpyNetwork card) {
super(card);
}
@Override
public ThopterSpyNetwork copy() {
return new ThopterSpyNetwork(this);
}
}
class ThopterSpyNetworkUpkeepTriggeredAbility extends TriggeredAbilityImpl {
public ThopterSpyNetworkUpkeepTriggeredAbility() {
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ThopterColorlessToken("ORI"), 1), false);
}
public ThopterSpyNetworkUpkeepTriggeredAbility(final ThopterSpyNetworkUpkeepTriggeredAbility ability) {
super(ability);
}
@Override
public ThopterSpyNetworkUpkeepTriggeredAbility copy() {
return new ThopterSpyNetworkUpkeepTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return event.getPlayerId().equals(this.controllerId);
}
@Override
public boolean checkInterveningIfClause(Game game) {
return game.getBattlefield().countAll(new FilterArtifactPermanent(), this.controllerId, game) >= 1;
}
@Override
public String getRule() {
return "At the beginning of your upkeep, if you control an artifact, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield";
}
}
class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl {
List<UUID> damagedPlayerIds = new ArrayList<>();
public ThopterSpyNetworkDamageTriggeredAbility() {
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false);
}
public ThopterSpyNetworkDamageTriggeredAbility(final ThopterSpyNetworkDamageTriggeredAbility ability) {
super(ability);
}
@Override
public ThopterSpyNetworkDamageTriggeredAbility copy() {
return new ThopterSpyNetworkDamageTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER
|| event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) {
if (((DamagedPlayerEvent) event).isCombatDamage()) {
Permanent creature = game.getPermanent(event.getSourceId());
if (creature != null && creature.getControllerId().equals(controllerId)
&& creature.getCardType().contains(CardType.ARTIFACT) && !damagedPlayerIds.contains(event.getTargetId())) {
damagedPlayerIds.add(event.getTargetId());
return true;
}
}
}
if (event.getType().equals(GameEvent.EventType.END_COMBAT_STEP_POST)){
damagedPlayerIds.clear();
}
return false;
}
@Override
public String getRule() {
return "Whenever one or more artifact creatures you control deals combat damage to a player, draw a card";
}
}

View file

@ -0,0 +1,112 @@
/*
* 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.magicorigins;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.keyword.FlashbackAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.CostModificationType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.util.CardUtil;
/**
*
* @author fireshoes
*/
public class VrynWingmare extends CardImpl {
public VrynWingmare(UUID ownerId) {
super(ownerId, 40, "Vryn Wingmare", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.expansionSetCode = "ORI";
this.subtype.add("Pegasus");
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Noncreature spells cost {1} more to cast.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VrynWingmareCostReductionEffect()));
}
public VrynWingmare(final VrynWingmare card) {
super(card);
}
@Override
public VrynWingmare copy() {
return new VrynWingmare(this);
}
}
class VrynWingmareCostReductionEffect extends CostModificationEffectImpl {
VrynWingmareCostReductionEffect ( ) {
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
staticText = "Noncreature spells cost {1} more to cast";
}
VrynWingmareCostReductionEffect(VrynWingmareCostReductionEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source, Ability abilityToModify) {
CardUtil.increaseCost(abilityToModify, 1);
return true;
}
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) {
Card card = game.getCard(abilityToModify.getSourceId());
if (card != null && !card.getCardType().contains(CardType.CREATURE)) {
return true;
}
}
return false;
}
@Override
public VrynWingmareCostReductionEffect copy() {
return new VrynWingmareCostReductionEffect(this);
}
}

View file

@ -43,7 +43,7 @@ import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
import mage.game.permanent.token.Token; import mage.game.permanent.token.ThopterColorlessToken;
/** /**
* *
@ -88,7 +88,7 @@ class ThopterAssemblyTriggeredAbility extends TriggeredAbilityImpl {
ThopterAssemblyTriggeredAbility() { ThopterAssemblyTriggeredAbility() {
super(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true)); super(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true));
this.addEffect(new CreateTokenEffect(new ThopterToken(), 5)); this.addEffect(new CreateTokenEffect(new ThopterColorlessToken(), 5));
} }
ThopterAssemblyTriggeredAbility(final ThopterAssemblyTriggeredAbility ability) { ThopterAssemblyTriggeredAbility(final ThopterAssemblyTriggeredAbility ability) {
@ -119,16 +119,4 @@ class ThopterAssemblyTriggeredAbility extends TriggeredAbilityImpl {
public String getRule() { public String getRule() {
return "At the beginning of your upkeep, if you control no Thopters other than {this}, return {this} to its owner's hand and put five 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield"; return "At the beginning of your upkeep, if you control no Thopters other than {this}, return {this} to its owner's hand and put five 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield";
} }
} }
class ThopterToken extends Token {
ThopterToken() {
super("Thopter", "a 1/1 colorless Thopter artifact creature token with flying");
cardType.add(CardType.CREATURE);
cardType.add(CardType.ARTIFACT);
subtype.add("Thopter");
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(FlyingAbility.getInstance());
}
}

View file

@ -29,7 +29,6 @@
package mage.game.permanent.token; package mage.game.permanent.token;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor;
import mage.constants.CardType; import mage.constants.CardType;
/** /**

View file

@ -0,0 +1,58 @@
/*
* 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.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
/**
*
* @author fireshoes
*/
public class ThopterColorlessToken extends Token {
public ThopterColorlessToken() {
this("EXO");
}
public ThopterColorlessToken(String expansionSetCode) {
super("Thopter", "1/1 colorless Thopter creature token with flying");
this.setOriginalExpansionSetCode(expansionSetCode);
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add("Thopter");
power = new MageInt(1);
toughness = new MageInt(1);
addAbility(FlyingAbility.getInstance());
}
}

View file

@ -26094,7 +26094,7 @@ Aspiring Aeronaut|Magic Origins|46|C|{3}{U}|Creature - Human Artificer|1|2|Flyin
Clash of Wills|Magic Origins|49|U|{X}{U}|Instant|||Counter target spell unless its controller pays {X}.| Clash of Wills|Magic Origins|49|U|{X}{U}|Instant|||Counter target spell unless its controller pays {X}.|
Claustrophobia|Magic Origins|50|C|{1}{U}{U}|Enchantment - Aura|||$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| Claustrophobia|Magic Origins|50|C|{1}{U}{U}|Enchantment - Aura|||$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.|
Day's Undoing|Magic Origins|51|M|{2}{U}|Sorcery|||Each player shuffles his or her hand and graveyard into his or her library, then draws 7 cards. If it's your turn, end the turn. <i>(Exile all spells and abilities on the stack, including this card. Discard down to your maximum hand size. Damage wears off, and "this turn" and "until end of turn" effects end.)</i>| Day's Undoing|Magic Origins|51|M|{2}{U}|Sorcery|||Each player shuffles his or her hand and graveyard into his or her library, then draws 7 cards. If it's your turn, end the turn. <i>(Exile all spells and abilities on the stack, including this card. Discard down to your maximum hand size. Damage wears off, and "this turn" and "until end of turn" effects end.)</i>|
Disciple of the Ring|Magic Origins|53|M|{3}{U}{U}|Creature - Human Wizard|3|4|{1}, Exile an instant or sorcery from your graveyard: Choose one - Counter target noncreature spell unless its controller pay {2}; or Disciple of the Ring gets +1/+1 until end of turn; or Tap target creature; or Untap target creature.| Disciple of the Ring|Magic Origins|53|M|{3}{U}{U}|Creature - Human Wizard|3|4|{1}, Exile an instant or sorcery card from your graveyard: Choose one - Counter target noncreature spell unless its controller pays {2}; or Disciple of the Ring gets +1/+1 until end of turn; or Tap target creature; or Untap target creature.|
Disperse|Magic Origins|54|C|{1}{U}|Instant|||Return target nonland permanent to its owner's hand.| Disperse|Magic Origins|54|C|{1}{U}|Instant|||Return target nonland permanent to its owner's hand.|
Displacement Wave|Magic Origins|55|R|{X}{U}{U}|Sorcery|||Return all nonland permanents with converted mana cost X or less to their owners' hands.| Displacement Wave|Magic Origins|55|R|{X}{U}{U}|Sorcery|||Return all nonland permanents with converted mana cost X or less to their owners' hands.|
Faerie Miscreant|Magic Origins|57|C|{U}|Creature - Faerie Rogue|1|1|Flying <i>(This creature can't be blocked except by creatures with flying or reach.)</i>$When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card.| Faerie Miscreant|Magic Origins|57|C|{U}|Creature - Faerie Rogue|1|1|Flying <i>(This creature can't be blocked except by creatures with flying or reach.)</i>$When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card.|