From 208de4da21087f27aae2a451154d2573f6196711 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Sun, 15 Jul 2012 18:31:33 -0500 Subject: [PATCH] - Added Xathrid Gorgon, Hellion Crucible. --- .../mage/sets/magic2013/HellionCrucible.java | 93 +++++++++++++ .../mage/sets/magic2013/XathridGorgon.java | 130 ++++++++++++++++++ Mage/src/mage/counters/CounterType.java | 8 +- .../counters/common/PetrificationCounter.java | 47 +++++++ .../mage/counters/common/PressureCounter.java | 47 +++++++ 5 files changed, 324 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/sets/magic2013/HellionCrucible.java create mode 100644 Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java create mode 100644 Mage/src/mage/counters/common/PetrificationCounter.java create mode 100644 Mage/src/mage/counters/common/PressureCounter.java diff --git a/Mage.Sets/src/mage/sets/magic2013/HellionCrucible.java b/Mage.Sets/src/mage/sets/magic2013/HellionCrucible.java new file mode 100644 index 00000000000..91bfad49186 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2013/HellionCrucible.java @@ -0,0 +1,93 @@ +/* + * 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.magic2013; + +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.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.permanent.token.Token; + +/** + * + * @author jeffwadsworth + */ +public class HellionCrucible extends CardImpl { + + public HellionCrucible(UUID ownerId) { + super(ownerId, 226, "Hellion Crucible", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "M13"; + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {1}{R}, {tap}: Put a pressure counter on Hellion Crucible. + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.PRESSURE.createInstance()), new ManaCostsImpl("{1}{R}"))); + + // {1}{R}, {tap}, Remove two pressure counters from Hellion Crucible and sacrifice it: Put a 4/4 red Hellion creature token with haste onto the battlefield. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new HellionToken(), 1), new ManaCostsImpl("{1}{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new RemoveCountersSourceCost(CounterType.PRESSURE.createInstance(2))); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public HellionCrucible(final HellionCrucible card) { + super(card); + } + + @Override + public HellionCrucible copy() { + return new HellionCrucible(this); + } +} + +class HellionToken extends Token { + public HellionToken() { + super("Hellion", "4/4 red Hellion creature token with haste"); + cardType.add(CardType.CREATURE); + color.setRed(true); + subtype.add("Hellion"); + power = new MageInt(4); + toughness = new MageInt(4); + addAbility(HasteAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java b/Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java new file mode 100644 index 00000000000..ccd6e7f1105 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java @@ -0,0 +1,130 @@ +/* + * 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.magic2013; + +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.ManaCostsImpl; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.continious.AddCardTypeTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class XathridGorgon extends CardImpl { + + public XathridGorgon(UUID ownerId) { + super(ownerId, 118, "Xathrid Gorgon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}"); + this.expansionSetCode = "M13"; + this.subtype.add("Gorgon"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(6); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // {2}{B}, {tap}: Put a petrification counter on target creature. It gains defender and becomes a colorless artifact in addition to its other types. Its activated abilities can't be activated. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.PETRIFICATION.createInstance()), new ManaCostsImpl("{2}{B}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + ability.addEffect(new GainAbilityTargetEffect(DefenderAbility.getInstance(), Constants.Duration.EndOfGame)); + ability.addEffect(new AddCardTypeTargetEffect(CardType.ARTIFACT, Constants.Duration.EndOfGame)); + ability.addEffect(new XathridGorgonEffect()); + this.addAbility(ability); + + } + + public XathridGorgon(final XathridGorgon card) { + super(card); + } + + @Override + public XathridGorgon copy() { + return new XathridGorgon(this); + } +} + +class XathridGorgonEffect extends ReplacementEffectImpl { + + public XathridGorgonEffect() { + super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Detriment); + staticText = "Its activated abilities can't be activated"; + } + + public XathridGorgonEffect(final XathridGorgonEffect effect) { + super(effect); + } + + @Override + public XathridGorgonEffect copy() { + return new XathridGorgonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) { + Permanent target = game.getPermanent(targetPointer.getFirst(game, source)); + if (target != null) { + if (event.getSourceId().equals(target.getId())) { + return true; + } + } + } + return false; + } + +} diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 121fb031910..45ff297f2a6 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -65,7 +65,9 @@ public enum CounterType { ELIXIR(new ElixirCounter().name), PAIN(new PainCounter().name), DESPAIR(new DespairCounter().name), - PAGE(new PageCounter().name); + PAGE(new PageCounter().name), + PRESSURE(new PressureCounter().name), + PETRIFICATION(new PetrificationCounter().name); private String name; @@ -159,6 +161,10 @@ public enum CounterType { return new DespairCounter(amount); case PAGE: return new PageCounter(amount); + case PRESSURE: + return new PressureCounter(amount); + case PETRIFICATION: + return new PetrificationCounter(amount); } return null; } diff --git a/Mage/src/mage/counters/common/PetrificationCounter.java b/Mage/src/mage/counters/common/PetrificationCounter.java new file mode 100644 index 00000000000..39c68d5daaa --- /dev/null +++ b/Mage/src/mage/counters/common/PetrificationCounter.java @@ -0,0 +1,47 @@ +/* + * 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; + +/** + * + * @author jeff + */ +public class PetrificationCounter extends Counter { + + public PetrificationCounter() { + super("petrification"); + this.count = 1; + } + + public PetrificationCounter(int amount) { + super("petrification"); + this.count = amount; + } +} \ No newline at end of file diff --git a/Mage/src/mage/counters/common/PressureCounter.java b/Mage/src/mage/counters/common/PressureCounter.java new file mode 100644 index 00000000000..2769e21c4bc --- /dev/null +++ b/Mage/src/mage/counters/common/PressureCounter.java @@ -0,0 +1,47 @@ +/* + * 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; + +/** + * + * @author jeff + */ +public class PressureCounter extends Counter { + + public PressureCounter() { + super("pressure"); + this.count = 1; + } + + public PressureCounter(int amount) { + super("pressure"); + this.count = amount; + } +} \ No newline at end of file