From a9a23026fc37298e8ad7795831b02ba38313e8b7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 17 Mar 2015 08:08:15 +0100 Subject: [PATCH] [DTK] Added 6 black cards. --- .../sets/dragonsoftarkir/ShamblingGoblin.java | 79 ++++++++++++++++ .../dragonsoftarkir/SibsigIcebreakers.java | 63 +++++++++++++ .../dragonsoftarkir/SilumgarAssassin.java | 92 +++++++++++++++++++ .../mage/sets/dragonsoftarkir/UkudCobra.java | 62 +++++++++++++ .../sets/dragonsoftarkir/VirulentPlague.java | 68 ++++++++++++++ .../sets/dragonsoftarkir/VulturousAven.java | 82 +++++++++++++++++ ...ckedByCreaturesWithGreaterPowerEffect.java | 72 +++++++++++++++ Mage/src/mage/util/CardUtil.java | 2 +- 8 files changed, 519 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/ShamblingGoblin.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/SibsigIcebreakers.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarAssassin.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/UkudCobra.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/VirulentPlague.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/VulturousAven.java create mode 100644 Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ShamblingGoblin.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShamblingGoblin.java new file mode 100644 index 0000000000..1cb53704bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShamblingGoblin.java @@ -0,0 +1,79 @@ +/* + * 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.dragonsoftarkir; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ShamblingGoblin extends CardImpl { + + private static final FilterCreaturePermanent filterOpponentCreature = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filterOpponentCreature.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public ShamblingGoblin(UUID ownerId) { + super(ownerId, 118, "Shambling Goblin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Zombie"); + this.subtype.add("Goblin"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Shambling Goblin dies, target creature an opponent controls gets -1/-1 until end of turn. + Ability ability = new DiesTriggeredAbility(new BoostTargetEffect(-1,-1, Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent(filterOpponentCreature)); + this.addAbility(ability); + + } + + public ShamblingGoblin(final ShamblingGoblin card) { + super(card); + } + + @Override + public ShamblingGoblin copy() { + return new ShamblingGoblin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SibsigIcebreakers.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SibsigIcebreakers.java new file mode 100644 index 0000000000..6eb41b9ad3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SibsigIcebreakers.java @@ -0,0 +1,63 @@ +/* + * 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.dragonsoftarkir; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class SibsigIcebreakers extends CardImpl { + + public SibsigIcebreakers(UUID ownerId) { + super(ownerId, 119, "Sibsig Icebreakers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Sibsig Icebreakers enters the battlefield, each player discards a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(1, false), false)); + } + + public SibsigIcebreakers(final SibsigIcebreakers card) { + super(card); + } + + @Override + public SibsigIcebreakers copy() { + return new SibsigIcebreakers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarAssassin.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarAssassin.java new file mode 100644 index 0000000000..f35af37ee3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarAssassin.java @@ -0,0 +1,92 @@ +/* + * 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.dragonsoftarkir; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesWithGreaterPowerEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SilumgarAssassin extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less an opponent controls"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4)); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SilumgarAssassin(UUID ownerId) { + super(ownerId, 121, "Silumgar Assassin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Human"); + this.subtype.add("Assassin"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Creatures with power greater than Silumgar Assassin's power can't block it. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByCreaturesWithGreaterPowerEffect())); + + // Megamorph {2}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{B}"), true)); + + // When Silumgar Assassin is turned face up, destroy target creature with power 3 or less an opponent controls. + Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + } + + public SilumgarAssassin(final SilumgarAssassin card) { + super(card); + } + + @Override + public SilumgarAssassin copy() { + return new SilumgarAssassin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/UkudCobra.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/UkudCobra.java new file mode 100644 index 0000000000..f366677d6c --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/UkudCobra.java @@ -0,0 +1,62 @@ +/* + * 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.dragonsoftarkir; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class UkudCobra extends CardImpl { + + public UkudCobra(UUID ownerId) { + super(ownerId, 123, "Ukud Cobra", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Snake"); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + } + + public UkudCobra(final UkudCobra card) { + super(card); + } + + @Override + public UkudCobra copy() { + return new UkudCobra(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/VirulentPlague.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/VirulentPlague.java new file mode 100644 index 0000000000..412eaeaac0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/VirulentPlague.java @@ -0,0 +1,68 @@ +/* + * 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.dragonsoftarkir; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.TokenPredicate; + +/** + * + * @author LevelX2 + */ +public class VirulentPlague extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creature tokens"); + static { + filter.add(new TokenPredicate()); + } + + public VirulentPlague(UUID ownerId) { + super(ownerId, 125, "Virulent Plague", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "DTK"; + + // Creature tokens get -2/-2 + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(-2,-2, Duration.WhileOnBattlefield, filter, false))); + } + + public VirulentPlague(final VirulentPlague card) { + super(card); + } + + @Override + public VirulentPlague copy() { + return new VirulentPlague(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/VulturousAven.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/VulturousAven.java new file mode 100644 index 0000000000..336cafff81 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/VulturousAven.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.dragonsoftarkir; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ExploitCreatureTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ExploitAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class VulturousAven extends CardImpl { + + public VulturousAven(UUID ownerId) { + super(ownerId, 126, "Vulturous Aven", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Bird"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Exploit + this.addAbility(new ExploitAbility()); + + // When Vulturous Aven exploits a creature, you draw two cards and you lose 2 life. + Effect effect = new DrawCardSourceControllerEffect(2); + effect.setText("you draw two cards"); + Ability ability = new ExploitCreatureTriggeredAbility(effect, false); + effect = new LoseLifeSourceControllerEffect(2); + effect.setText("and you lose 2 life"); + ability.addEffect(effect); + this.addAbility(ability); + + } + + public VulturousAven(final VulturousAven card) { + super(card); + } + + @Override + public VulturousAven copy() { + return new VulturousAven(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java new file mode 100644 index 0000000000..c36bd2cf38 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesWithGreaterPowerEffect.java @@ -0,0 +1,72 @@ +/* + * 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.abilities.effects.common.combat; + +import mage.abilities.Ability; +import mage.abilities.effects.RestrictionEffect; +import mage.constants.Duration; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ + +public class CantBeBlockedByCreaturesWithGreaterPowerEffect extends RestrictionEffect { + + public CantBeBlockedByCreaturesWithGreaterPowerEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Creatures with power greater than {this}'s power can't block it"; + } + + public CantBeBlockedByCreaturesWithGreaterPowerEffect(final CantBeBlockedByCreaturesWithGreaterPowerEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (permanent.getId().equals(source.getSourceId())) { + return true; + } + return false; + } + + @Override + public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { + if (blocker.getPower().getValue() > attacker.getPower().getValue()) { + return false; + } + return true; + } + + @Override + public CantBeBlockedByCreaturesWithGreaterPowerEffect copy() { + return new CantBeBlockedByCreaturesWithGreaterPowerEffect(this); + } +} diff --git a/Mage/src/mage/util/CardUtil.java b/Mage/src/mage/util/CardUtil.java index 5bc6896658..2343f1fe1b 100644 --- a/Mage/src/mage/util/CardUtil.java +++ b/Mage/src/mage/util/CardUtil.java @@ -439,7 +439,7 @@ public class CardUtil { public static String numberToText(String number, String forOne) { if (checkNumeric(number)) { - return numberToText(Integer.parseInt(number)); + return numberToText(Integer.parseInt(number), forOne); } return number; }