From 109678403be164db59291df7da5126ff8f49509a Mon Sep 17 00:00:00 2001 From: jeffwadsworth <> Date: Fri, 3 Aug 2012 18:46:20 -0500 Subject: [PATCH] - Requested. Added Boon Reflection, Furnace of Rath, and Rage Reflection. --- .../mage/sets/shadowmoor/BoonReflection.java | 104 +++++++++++++++++ .../mage/sets/shadowmoor/RageReflection.java | 65 +++++++++++ .../src/mage/sets/tempest/FurnaceOfRath.java | 106 ++++++++++++++++++ 3 files changed, 275 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java create mode 100644 Mage.Sets/src/mage/sets/shadowmoor/RageReflection.java create mode 100644 Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java diff --git a/Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java b/Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java new file mode 100644 index 0000000000..098a0b9e6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java @@ -0,0 +1,104 @@ +/* + * 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.shadowmoor; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author jeffwadsworth + * + */ +public class BoonReflection extends CardImpl { + + public BoonReflection(UUID ownerId) { + super(ownerId, 5, "Boon Reflection", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}"); + this.expansionSetCode = "SHM"; + + this.color.setWhite(true); + + // If you would gain life, you gain twice that much life instead. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoonReflectionEffect())); + } + + public BoonReflection(final BoonReflection card) { + super(card); + } + + @Override + public BoonReflection copy() { + return new BoonReflection(this); + } +} + +class BoonReflectionEffect extends ReplacementEffectImpl { + + public BoonReflectionEffect() { + super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Benefit); + staticText = "If you would gain life, you gain twice that much life instead"; + } + + public BoonReflectionEffect(final BoonReflectionEffect effect) { + super(effect); + } + + @Override + public BoonReflectionEffect copy() { + return new BoonReflectionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return apply(game, source); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + switch (event.getType()) { + case GAIN_LIFE: + if (event.getPlayerId().equals(source.getControllerId()) && (source.getControllerId() != null)) { + event.setAmount(event.getAmount() * 2); + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/shadowmoor/RageReflection.java b/Mage.Sets/src/mage/sets/shadowmoor/RageReflection.java new file mode 100644 index 0000000000..5f2cc973b2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowmoor/RageReflection.java @@ -0,0 +1,65 @@ +/* + * 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.shadowmoor; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityControlledEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author jeffwadsworth + + */ +public class RageReflection extends CardImpl { + + public RageReflection(UUID ownerId) { + super(ownerId, 104, "Rage Reflection", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}{R}"); + this.expansionSetCode = "SHM"; + + this.color.setRed(true); + + // Creatures you control have double strike. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Constants.Duration.WhileOnBattlefield, new FilterCreaturePermanent(), false))); + } + + public RageReflection(final RageReflection card) { + super(card); + } + + @Override + public RageReflection copy() { + return new RageReflection(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java b/Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java new file mode 100644 index 0000000000..930a74cfce --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java @@ -0,0 +1,106 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author jeffwadsworth + * + */ +public class FurnaceOfRath extends CardImpl { + + public FurnaceOfRath(UUID ownerId) { + super(ownerId, 177, "Furnace of Rath", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}{R}"); + this.expansionSetCode = "TMP"; + + this.color.setRed(true); + + // If a source would deal damage to a creature or player, it deals double that damage to that creature or player instead. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new FurnaceOfRathEffect())); + } + + public FurnaceOfRath(final FurnaceOfRath card) { + super(card); + } + + @Override + public FurnaceOfRath copy() { + return new FurnaceOfRath(this); + } +} + +class FurnaceOfRathEffect extends ReplacementEffectImpl { + + public FurnaceOfRathEffect() { + super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Damage); + staticText = "If a source would deal damage to a creature or player, that source deals double that damage to that creature or player instead"; + } + + public FurnaceOfRathEffect(final FurnaceOfRathEffect effect) { + super(effect); + } + + @Override + public FurnaceOfRathEffect copy() { + return new FurnaceOfRathEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + switch (event.getType()) { + case DAMAGE_PLAYER: + event.setAmount(event.getAmount() * 2); + return true; + case DAMAGE_CREATURE: + event.setAmount(event.getAmount() * 2); + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return apply(game, source); + } +}