From ffa519dc08da9fcd6c15c101f4e8c0827d550831 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 6 Sep 2017 22:39:28 -0400 Subject: [PATCH] Implemented Frenetic Raptor --- Mage.Sets/src/mage/cards/b/Bedlam.java | 38 ++-------- .../src/mage/cards/f/FreneticRaptor.java | 70 +++++++++++++++++++ Mage.Sets/src/mage/sets/Legions.java | 1 + 3 files changed, 75 insertions(+), 34 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/f/FreneticRaptor.java diff --git a/Mage.Sets/src/mage/cards/b/Bedlam.java b/Mage.Sets/src/mage/cards/b/Bedlam.java index 0baceb297d..ccee7bc212 100644 --- a/Mage.Sets/src/mage/cards/b/Bedlam.java +++ b/Mage.Sets/src/mage/cards/b/Bedlam.java @@ -25,18 +25,19 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.b; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; @@ -47,11 +48,10 @@ import mage.game.permanent.Permanent; public class Bedlam extends CardImpl { public Bedlam(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); // Creatures can't block. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BedlamEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.WhileOnBattlefield))); } public Bedlam(final Bedlam card) { @@ -63,33 +63,3 @@ public class Bedlam extends CardImpl { return new Bedlam(this); } } - -class BedlamEffect extends RestrictionEffect { - - BedlamEffect() { - super(Duration.WhileOnBattlefield); - staticText = "Creatures can't block"; - } - - BedlamEffect(final BedlamEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (permanent.isCreature()) { - return true; - } - return false; - } - - @Override - public BedlamEffect copy() { - return new BedlamEffect(this); - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } -} diff --git a/Mage.Sets/src/mage/cards/f/FreneticRaptor.java b/Mage.Sets/src/mage/cards/f/FreneticRaptor.java new file mode 100644 index 0000000000..096276a83c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FreneticRaptor.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.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBlockAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class FreneticRaptor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.BEAST, "Beasts"); + + public FreneticRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); + + this.subtype.add("Dinosaur"); + this.subtype.add("Beast"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Beasts can't block. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAllEffect(filter, Duration.WhileOnBattlefield))); + } + + public FreneticRaptor(final FreneticRaptor card) { + super(card); + } + + @Override + public FreneticRaptor copy() { + return new FreneticRaptor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Legions.java b/Mage.Sets/src/mage/sets/Legions.java index 6f407f9535..21d1a61636 100644 --- a/Mage.Sets/src/mage/sets/Legions.java +++ b/Mage.Sets/src/mage/sets/Legions.java @@ -97,6 +97,7 @@ public class Legions extends ExpansionSet { cards.add(new SetCardInfo("Essence Sliver", 13, Rarity.RARE, mage.cards.e.EssenceSliver.class)); cards.add(new SetCardInfo("Feral Throwback", 126, Rarity.RARE, mage.cards.f.FeralThrowback.class)); cards.add(new SetCardInfo("Flamewave Invoker", 92, Rarity.COMMON, mage.cards.f.FlamewaveInvoker.class)); + cards.add(new SetCardInfo("Frenetic Raptor", 93, Rarity.UNCOMMON, mage.cards.f.FreneticRaptor.class)); cards.add(new SetCardInfo("Fugitive Wizard", 38, Rarity.COMMON, mage.cards.f.FugitiveWizard.class)); cards.add(new SetCardInfo("Gempalm Avenger", 14, Rarity.COMMON, mage.cards.g.GempalmAvenger.class)); cards.add(new SetCardInfo("Gempalm Incinerator", 94, Rarity.UNCOMMON, mage.cards.g.GempalmIncinerator.class));