From 3d54a8c1b468ae4434374d913827fa4c19900225 Mon Sep 17 00:00:00 2001 From: Loki Date: Thu, 29 Dec 2011 14:44:45 +0400 Subject: [PATCH] 5 timeshifted, [TSP] Ursa's Factory --- .../mage/sets/timeshifted/CallOfTheHerd.java | 67 +++++++++++ .../mage/sets/timeshifted/Pendelhaven.java | 70 +++++++++++ .../timeshifted/SolkanarTheSwampKing.java | 109 ++++++++++++++++++ .../mage/sets/timeshifted/SpikeFeeder.java | 82 +++++++++++++ .../src/mage/sets/timeshifted/Thallid.java | 74 ++++++++++++ .../mage/sets/timespiral/UrzasFactory.java | 83 +++++++++++++ Mage/src/mage/counters/CounterType.java | 3 + .../mage/counters/common/SporeCounter.java | 49 ++++++++ 8 files changed, 537 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timeshifted/CallOfTheHerd.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/Pendelhaven.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/SolkanarTheSwampKing.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/SpikeFeeder.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/Thallid.java create mode 100644 Mage.Sets/src/mage/sets/timespiral/UrzasFactory.java create mode 100644 Mage/src/mage/counters/common/SporeCounter.java diff --git a/Mage.Sets/src/mage/sets/timeshifted/CallOfTheHerd.java b/Mage.Sets/src/mage/sets/timeshifted/CallOfTheHerd.java new file mode 100644 index 00000000000..a8c75ffb5f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/CallOfTheHerd.java @@ -0,0 +1,67 @@ +/* + * 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.timeshifted; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.game.permanent.token.ElephantToken; + +/** + * + * @author Loki + */ +public class CallOfTheHerd extends CardImpl { + + public CallOfTheHerd(UUID ownerId) { + super(ownerId, 74, "Call of the Herd", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "TSB"; + + this.color.setGreen(true); + + // Put a 3/3 green Elephant creature token onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new ElephantToken())); + // Flashback {3}{G} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{G}"), Constants.TimingRule.SORCERY)); + } + + public CallOfTheHerd(final CallOfTheHerd card) { + super(card); + } + + @Override + public CallOfTheHerd copy() { + return new CallOfTheHerd(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/Pendelhaven.java b/Mage.Sets/src/mage/sets/timeshifted/Pendelhaven.java new file mode 100644 index 00000000000..2aadc5dc200 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/Pendelhaven.java @@ -0,0 +1,70 @@ +/* + * 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.timeshifted; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class Pendelhaven extends CardImpl { + + public Pendelhaven(UUID ownerId) { + super(ownerId, 120, "Pendelhaven", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "TSB"; + this.supertype.add("Legendary"); + + // {tap}: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + // {tap}: Target 1/1 creature gets +1/+2 until end of turn. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostTargetEffect(1, 2, Constants.Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Pendelhaven(final Pendelhaven card) { + super(card); + } + + @Override + public Pendelhaven copy() { + return new Pendelhaven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/SolkanarTheSwampKing.java b/Mage.Sets/src/mage/sets/timeshifted/SolkanarTheSwampKing.java new file mode 100644 index 00000000000..7cc91a20997 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/SolkanarTheSwampKing.java @@ -0,0 +1,109 @@ +/* + * 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.timeshifted; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.SwampwalkAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; + +/** + * + * @author Loki + */ +public class SolkanarTheSwampKing extends CardImpl { + + public SolkanarTheSwampKing(UUID ownerId) { + super(ownerId, 100, "Sol'kanar the Swamp King", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{B}{R}"); + this.expansionSetCode = "TSB"; + this.supertype.add("Legendary"); + this.subtype.add("Demon"); + + this.color.setRed(true); + this.color.setBlue(true); + this.color.setBlack(true); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + this.addAbility(new SwampwalkAbility()); + // Whenever a player casts a black spell, you gain 1 life. + this.addAbility(new SolkanarTheSwampKingAbility()); + + } + + public SolkanarTheSwampKing(final SolkanarTheSwampKing card) { + super(card); + } + + @Override + public SolkanarTheSwampKing copy() { + return new SolkanarTheSwampKing(this); + } +} + +class SolkanarTheSwampKingAbility extends TriggeredAbilityImpl { + + public SolkanarTheSwampKingAbility() { + super(Constants.Zone.BATTLEFIELD, new GainLifeEffect(1), false); + } + + public SolkanarTheSwampKingAbility(final SolkanarTheSwampKingAbility ability) { + super(ability); + } + + @Override + public SolkanarTheSwampKingAbility copy() { + return new SolkanarTheSwampKingAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.SPELL_CAST) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && spell.getColor().isBlack()) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player casts a black spell, you gain 1 life."; + } + +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/SpikeFeeder.java b/Mage.Sets/src/mage/sets/timeshifted/SpikeFeeder.java new file mode 100644 index 00000000000..3bc7ac03d82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/SpikeFeeder.java @@ -0,0 +1,82 @@ +/* + * 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.timeshifted; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class SpikeFeeder extends CardImpl { + + public SpikeFeeder(UUID ownerId) { + super(ownerId, 84, "Spike Feeder", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "TSB"; + this.subtype.add("Spike"); + + this.color.setGreen(true); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Spike Feeder enters the battlefield with two +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); + // {2}, Remove a +1/+1 counter from Spike Feeder: Put a +1/+1 counter on target creature. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)); + ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + // Remove a +1/+1 counter from Spike Feeder: You gain 2 life. + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainLifeEffect(2), new RemoveCountersSourceCost(CounterType.P1P1.createInstance()))); + } + + public SpikeFeeder(final SpikeFeeder card) { + super(card); + } + + @Override + public SpikeFeeder copy() { + return new SpikeFeeder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/Thallid.java b/Mage.Sets/src/mage/sets/timeshifted/Thallid.java new file mode 100644 index 00000000000..46dc0596482 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/Thallid.java @@ -0,0 +1,74 @@ +/* + * 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.timeshifted; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.permanent.token.SaprolingToken; + +/** + * + * @author Loki + */ +public class Thallid extends CardImpl { + + public Thallid(UUID ownerId) { + super(ownerId, 86, "Thallid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "TSB"; + this.subtype.add("Fungus"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, put a spore counter on Thallid. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), Constants.TargetController.YOU, false)); + // Remove three spore counters from Thallid: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + } + + public Thallid(final Thallid card) { + super(card); + } + + @Override + public Thallid copy() { + return new Thallid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/UrzasFactory.java b/Mage.Sets/src/mage/sets/timespiral/UrzasFactory.java new file mode 100644 index 00000000000..63132e7feca --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/UrzasFactory.java @@ -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.timespiral; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.game.permanent.token.Token; + +/** + * + * @author Loki + */ +public class UrzasFactory extends CardImpl { + + public UrzasFactory(UUID ownerId) { + super(ownerId, 280, "Urza's Factory", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "TSP"; + this.subtype.add("Urza's"); + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + // {7}, {tap}: Put a 2/2 colorless Assembly-Worker artifact creature token onto the battlefield. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new AssemblyWorkerToken()), new GenericManaCost(7)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public UrzasFactory(final UrzasFactory card) { + super(card); + } + + @Override + public UrzasFactory copy() { + return new UrzasFactory(this); + } +} + +class AssemblyWorkerToken extends Token { + AssemblyWorkerToken() { + super("Assembly-Worker", "a 2/2 colorless Assembly-Worker artifact creature token"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add("Assembly-Worker"); + power = new MageInt(2); + toughness = new MageInt(2); + } +} diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index c55196394c8..c765ceea9ad 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -58,6 +58,7 @@ public enum CounterType { HATCHLING(new HatchlingCounter().name), KI(new KiCounter().name), SLIME(new SlimeCounter().name), + SPORE(new SporeCounter().name), STUDY(new StudyCounter().name); private String name; @@ -136,6 +137,8 @@ public enum CounterType { return new KiCounter(amount); case SLIME: return new SlimeCounter(amount); + case SPORE: + return new SporeCounter(amount); case STUDY: return new StudyCounter(amount); } diff --git a/Mage/src/mage/counters/common/SporeCounter.java b/Mage/src/mage/counters/common/SporeCounter.java new file mode 100644 index 00000000000..381266c33ec --- /dev/null +++ b/Mage/src/mage/counters/common/SporeCounter.java @@ -0,0 +1,49 @@ +/* +* 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.counters.common; + +import mage.counters.Counter; + +/** + * Spore counter. + * + * @author Loki + */ +public class SporeCounter extends Counter { + + public SporeCounter() { + super("Spore"); + this.count = 1; + } + + public SporeCounter(int amount) { + super("Spore"); + this.count = amount; + } +}