From ed654092f3972dbd92d371bb464b5153fa1064c4 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Sat, 28 Jul 2012 17:51:31 -0500 Subject: [PATCH] - Added Gelatinous Genesis and Lust for War. --- .../riseoftheeldrazi/GelatinousGenesis.java | 105 ++++++++++++++++++ .../sets/riseoftheeldrazi/LustForWar.java | 82 ++++++++++++++ 2 files changed, 187 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/GelatinousGenesis.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/GelatinousGenesis.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GelatinousGenesis.java new file mode 100644 index 0000000000..733c20c2af --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GelatinousGenesis.java @@ -0,0 +1,105 @@ +/* + * 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.riseoftheeldrazi; + +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.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.token.Token; + +/** + * + * @author jeffwadsworth + */ +public class GelatinousGenesis extends CardImpl { + + public GelatinousGenesis(UUID ownerId) { + super(ownerId, 183, "Gelatinous Genesis", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{X}{G}"); + this.expansionSetCode = "ROE"; + + this.color.setGreen(true); + + // Put X X/X green Ooze creature tokens onto the battlefield. + this.getSpellAbility().addEffect(new GelatinousGenesisEffect()); + } + + public GelatinousGenesis(final GelatinousGenesis card) { + super(card); + } + + @Override + public GelatinousGenesis copy() { + return new GelatinousGenesis(this); + } +} + +class GelatinousGenesisEffect extends OneShotEffect { + + public GelatinousGenesisEffect() { + super(Constants.Outcome.PutCreatureInPlay); + staticText = "Put X X/X green Ooze creature tokens onto the battlefield"; + } + + public GelatinousGenesisEffect(GelatinousGenesisEffect ability) { + super(ability); + } + + @Override + public boolean apply(Game game, Ability source) { + int count = source.getManaCostsToPay().getX(); + + OozeToken oozeToken = new OozeToken(); + oozeToken.getPower().setValue(count); + oozeToken.getToughness().setValue(count); + oozeToken.putOntoBattlefield(count, game, source.getId(), source.getControllerId()); + return true; + } + + @Override + public GelatinousGenesisEffect copy() { + return new GelatinousGenesisEffect(this); + } +} + +class OozeToken extends Token { + + public OozeToken() { + super("Ooze", "X/X green ooze creature token"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Ooze"); + power = new MageInt(0); + toughness = new MageInt(0); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java new file mode 100644 index 0000000000..6dda498f49 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class LustForWar extends CardImpl { + + public LustForWar(UUID ownerId) { + super(ownerId, 157, "Lust for War", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Aura"); + + this.color.setRed(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Whenever enchanted creature becomes tapped, Lust for War deals 3 damage to that creature's controller. + Ability attachedAbility = new BecomesTappedTriggeredAbility(new DamageControllerEffect(3)); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(attachedAbility, Constants.AttachmentType.AURA))); + + // Enchanted creature attacks each turn if able. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new AttacksEachTurnStaticAbility(), Constants.AttachmentType.AURA))); + } + + public LustForWar(final LustForWar card) { + super(card); + } + + @Override + public LustForWar copy() { + return new LustForWar(this); + } +}