From 4f4ce32fa614081075fbe2869a6d31e354ea978f Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 24 Jan 2014 12:10:06 +0100 Subject: [PATCH] [BNG] Added 11 blue cards. --- .../sets/bornofthegods/ChorusOfTheTides.java | 68 +++++++++++ .../bornofthegods/DeepwaterHypnotist.java | 81 +++++++++++++ .../bornofthegods/EvanescentIntellect.java | 85 ++++++++++++++ .../bornofthegods/FlitterstepEidolon.java | 78 +++++++++++++ .../bornofthegods/KrakenOfTheStraits.java | 109 ++++++++++++++++++ .../bornofthegods/NessianWildsRavager.java | 2 +- .../src/mage/sets/bornofthegods/Nullify.java | 74 ++++++++++++ .../sets/bornofthegods/OraclesInsight.java | 86 ++++++++++++++ .../sets/bornofthegods/RetractionHelix.java | 74 ++++++++++++ .../bornofthegods/SirenOfTheFangedCoast.java | 80 +++++++++++++ .../sets/bornofthegods/SphinxsDisciple.java | 69 +++++++++++ .../mage/sets/bornofthegods/StratusWalk.java | 86 ++++++++++++++ .../common/PermanentsOnBattlefieldCount.java | 16 +-- .../CanBlockOnlyFlyingAttachedEffect.java | 92 +++++++++++++++ .../continious/GainControlTargetEffect.java | 2 +- 15 files changed, 992 insertions(+), 10 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/ChorusOfTheTides.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/DeepwaterHypnotist.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/EvanescentIntellect.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/FlitterstepEidolon.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/KrakenOfTheStraits.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/Nullify.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/OraclesInsight.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/RetractionHelix.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/SirenOfTheFangedCoast.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/SphinxsDisciple.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/StratusWalk.java create mode 100644 Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java diff --git a/Mage.Sets/src/mage/sets/bornofthegods/ChorusOfTheTides.java b/Mage.Sets/src/mage/sets/bornofthegods/ChorusOfTheTides.java new file mode 100644 index 00000000000..950a8dee555 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/ChorusOfTheTides.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.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class ChorusOfTheTides extends CardImpl { + + public ChorusOfTheTides(UUID ownerId) { + super(ownerId, 33, "Chorus of the Tides", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Siren"); + + this.color.setBlue(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Heroic - Whenever you cast a spell that targets Chorus of the Tides, scry 1. + this.addAbility(new HeroicAbility(new ScryEffect(1))); + } + + public ChorusOfTheTides(final ChorusOfTheTides card) { + super(card); + } + + @Override + public ChorusOfTheTides copy() { + return new ChorusOfTheTides(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/DeepwaterHypnotist.java b/Mage.Sets/src/mage/sets/bornofthegods/DeepwaterHypnotist.java new file mode 100644 index 00000000000..2660019a7b3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/DeepwaterHypnotist.java @@ -0,0 +1,81 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.keyword.InspiredAbility; +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 DeepwaterHypnotist extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + + public DeepwaterHypnotist(UUID ownerId) { + super(ownerId, 35, "Deepwater Hypnotist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Inspired - Whenever Deepwater Hypnotist becomes untapped, target creature an opponent controls gets -3/-0 until end of turn. + Ability ability = new InspiredAbility(new BoostTargetEffect(-3,0,Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent(filter, true)); + this.addAbility(ability); + } + + public DeepwaterHypnotist(final DeepwaterHypnotist card) { + super(card); + } + + @Override + public DeepwaterHypnotist copy() { + return new DeepwaterHypnotist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/EvanescentIntellect.java b/Mage.Sets/src/mage/sets/bornofthegods/EvanescentIntellect.java new file mode 100644 index 00000000000..2ee4280cc95 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/EvanescentIntellect.java @@ -0,0 +1,85 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.PutTopCardOfTargetPlayerLibraryIntoGraveEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class EvanescentIntellect extends CardImpl { + + public EvanescentIntellect(UUID ownerId) { + super(ownerId, 38, "Evanescent Intellect", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Aura"); + + this.color.setBlue(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature has "{1}{U}, {T}: Target player puts the top three cards of his or her library into his or her graveyard." + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutTopCardOfTargetPlayerLibraryIntoGraveEffect(3), new ManaCostsImpl("{1}{U}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer(true)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA, Duration.WhileOnBattlefield))); + } + + public EvanescentIntellect(final EvanescentIntellect card) { + super(card); + } + + @Override + public EvanescentIntellect copy() { + return new EvanescentIntellect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/FlitterstepEidolon.java b/Mage.Sets/src/mage/sets/bornofthegods/FlitterstepEidolon.java new file mode 100644 index 00000000000..96ef7630c8a --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/FlitterstepEidolon.java @@ -0,0 +1,78 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.UnblockableAttachedEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.keyword.BestowAbility; +import mage.abilities.keyword.UnblockableAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class FlitterstepEidolon extends CardImpl { + + public FlitterstepEidolon(UUID ownerId) { + super(ownerId, 40, "Flitterstep Eidolon", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Spirit"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Bestow {5}{U} + this.addAbility(new BestowAbility(this, "{5}{U}")); + // Flitterstep Eidolon can't be blocked. + this.addAbility(new UnblockableAbility()); + // Enchanted creature gets +1/+1 and can't be blocked. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1,1, Duration.WhileOnBattlefield)); + ability.addEffect(new UnblockableAttachedEffect(AttachmentType.AURA)); + this.addAbility(ability); + } + + public FlitterstepEidolon(final FlitterstepEidolon card) { + super(card); + } + + @Override + public FlitterstepEidolon copy() { + return new FlitterstepEidolon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/KrakenOfTheStraits.java b/Mage.Sets/src/mage/sets/bornofthegods/KrakenOfTheStraits.java new file mode 100644 index 00000000000..45f7d9134dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/KrakenOfTheStraits.java @@ -0,0 +1,109 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class KrakenOfTheStraits extends CardImpl { + + public KrakenOfTheStraits(UUID ownerId) { + super(ownerId, 42, "Kraken of the Straits", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{U}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Kraken"); + + this.color.setBlue(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Creatures with power less than the number of Islands you control can't block Kraken of the Straits. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByCreaturesWithLessPowerEffect())); + } + + public KrakenOfTheStraits(final KrakenOfTheStraits card) { + super(card); + } + + @Override + public KrakenOfTheStraits copy() { + return new KrakenOfTheStraits(this); + } +} + +class CantBeBlockedByCreaturesWithLessPowerEffect extends RestrictionEffect { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands"); + + static { + filter.add(new SubtypePredicate("Island")); + } + + private final DynamicValue dynamicValue = new PermanentsOnBattlefieldCount(filter); + + public CantBeBlockedByCreaturesWithLessPowerEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Creatures with power less than the number of Islands you control can't block {this}"; + } + + public CantBeBlockedByCreaturesWithLessPowerEffect(final CantBeBlockedByCreaturesWithLessPowerEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { + return blocker.getPower().getValue() >= dynamicValue.calculate(game, source); + } + + @Override + public CantBeBlockedByCreaturesWithLessPowerEffect copy() { + return new CantBeBlockedByCreaturesWithLessPowerEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/NessianWildsRavager.java b/Mage.Sets/src/mage/sets/bornofthegods/NessianWildsRavager.java index 3b83529752a..d58e1c16afd 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/NessianWildsRavager.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/NessianWildsRavager.java @@ -66,7 +66,7 @@ public class NessianWildsRavager extends CardImpl { this.addAbility(new TributeAbility(6)); // When Nessian Wilds Ravager enters the battlefield, if tribute wasn't paid, you may have Nessian Wilds Ravager fight another target creature. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new FightTargetsEffect(), true); - ability.addTarget(new TargetCreaturePermanent()); + ability.addTarget(new TargetCreaturePermanent(true)); this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(), "When {this} enters the battlefield, if its tribute wasn't paid, you may have {this} fight another target creature.")); } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/Nullify.java b/Mage.Sets/src/mage/sets/bornofthegods/Nullify.java new file mode 100644 index 00000000000..e2abae0b336 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/Nullify.java @@ -0,0 +1,74 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class Nullify extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("creature or Aura spell"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ENCHANTMENT), + new SubtypePredicate("Aura"))); + } + + public Nullify(UUID ownerId) { + super(ownerId, 45, "Nullify", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}{U}"); + this.expansionSetCode = "BNG"; + + this.color.setBlue(true); + + // Counter target creature or Aura spell. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + } + + public Nullify(final Nullify card) { + super(card); + } + + @Override + public Nullify copy() { + return new Nullify(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/OraclesInsight.java b/Mage.Sets/src/mage/sets/bornofthegods/OraclesInsight.java new file mode 100644 index 00000000000..5dcee45dd82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/OraclesInsight.java @@ -0,0 +1,86 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class OraclesInsight extends CardImpl { + + public OraclesInsight(UUID ownerId) { + super(ownerId, 47, "Oracle's Insight", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Aura"); + + this.color.setBlue(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature has "{T}: Scry 1, then draw a card." + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new TapSourceCost()); + Effect effect = new DrawCardControllerEffect(1); + effect.setText("then draw a card"); + ability.addEffect(effect); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA, Duration.WhileOnBattlefield))); + } + + public OraclesInsight(final OraclesInsight card) { + super(card); + } + + @Override + public OraclesInsight copy() { + return new OraclesInsight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/RetractionHelix.java b/Mage.Sets/src/mage/sets/bornofthegods/RetractionHelix.java new file mode 100644 index 00000000000..de374850114 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/RetractionHelix.java @@ -0,0 +1,74 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author LevelX2 + */ +public class RetractionHelix extends CardImpl { + + public RetractionHelix(UUID ownerId) { + super(ownerId, 49, "Retraction Helix", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "BNG"; + + this.color.setBlue(true); + + // Until end of turn, target creature gains "{T}: Return target nonland permanent to its owner's hand." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new TapSourceCost()); + Target target = new TargetNonlandPermanent(); + target.setRequired(true); + ability.addTarget(target); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(ability, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + } + + public RetractionHelix(final RetractionHelix card) { + super(card); + } + + @Override + public RetractionHelix copy() { + return new RetractionHelix(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SirenOfTheFangedCoast.java b/Mage.Sets/src/mage/sets/bornofthegods/SirenOfTheFangedCoast.java new file mode 100644 index 00000000000..cbde7777edd --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/SirenOfTheFangedCoast.java @@ -0,0 +1,80 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.TributeNotPaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.abilities.effects.common.continious.GainControlTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TributeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SirenOfTheFangedCoast extends CardImpl { + + public SirenOfTheFangedCoast(UUID ownerId) { + super(ownerId, 50, "Siren of the Fanged Coast", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Siren"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Tribute 3 + this.addAbility(new TributeAbility(3)); + // When Siren of the Fanged Coast enters the battlefield, if tribute wasn't paid, gain control of target creature. + TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfGame, true), false); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(), + "When {this} enters the battlefield, if its tribute wasn't paid, gain control of target creature.")); + } + + public SirenOfTheFangedCoast(final SirenOfTheFangedCoast card) { + super(card); + } + + @Override + public SirenOfTheFangedCoast copy() { + return new SirenOfTheFangedCoast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SphinxsDisciple.java b/Mage.Sets/src/mage/sets/bornofthegods/SphinxsDisciple.java new file mode 100644 index 00000000000..4882595cf4e --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/SphinxsDisciple.java @@ -0,0 +1,69 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.InspiredAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class SphinxsDisciple extends CardImpl { + + public SphinxsDisciple(UUID ownerId) { + super(ownerId, 51, "Sphinx's Disciple", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Inspired - Whenever Sphinx's Disciple becomes untapped, draw a card. + this.addAbility(new InspiredAbility(new DrawCardControllerEffect(1))); + } + + public SphinxsDisciple(final SphinxsDisciple card) { + super(card); + } + + @Override + public SphinxsDisciple copy() { + return new SphinxsDisciple(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/StratusWalk.java b/Mage.Sets/src/mage/sets/bornofthegods/StratusWalk.java new file mode 100644 index 00000000000..f30bbbc3202 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/StratusWalk.java @@ -0,0 +1,86 @@ +/* + * 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.bornofthegods; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.combat.CanBlockOnlyFlyingAttachedEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class StratusWalk extends CardImpl { + + public StratusWalk(UUID ownerId) { + super(ownerId, 52, "Stratus Walk", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Aura"); + + this.color.setBlue(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // When Stratus Walk enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1))); + // Enchanted creature has flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield))); + // Enchanted creature can block only creatures with flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockOnlyFlyingAttachedEffect(AttachmentType.AURA))); + + } + + public StratusWalk(final StratusWalk card) { + super(card); + } + + @Override + public StratusWalk copy() { + return new StratusWalk(this); + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java index 1144a69a304..df5e1adefbd 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java +++ b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java @@ -12,7 +12,7 @@ import mage.game.Game; public class PermanentsOnBattlefieldCount implements DynamicValue { private FilterPermanent filter; - private Integer amount; + private Integer multiplier; public PermanentsOnBattlefieldCount() { this(new FilterPermanent(), 1); @@ -22,21 +22,21 @@ public class PermanentsOnBattlefieldCount implements DynamicValue { this(filter, 1); } - public PermanentsOnBattlefieldCount(FilterPermanent filter, Integer amount) { + public PermanentsOnBattlefieldCount(FilterPermanent filter, Integer multiplier) { this.filter = filter; - this.amount = amount; + this.multiplier = multiplier; } public PermanentsOnBattlefieldCount(final PermanentsOnBattlefieldCount dynamicValue) { this.filter = dynamicValue.filter; - this.amount = dynamicValue.amount; + this.multiplier = dynamicValue.multiplier; } @Override public int calculate(Game game, Ability sourceAbility) { int value = game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game); - if (amount != null) { - value *= amount; + if (multiplier != null) { + value *= multiplier; } return value; } @@ -48,8 +48,8 @@ public class PermanentsOnBattlefieldCount implements DynamicValue { @Override public String toString() { - if (amount != null) { - return amount.toString(); + if (multiplier != null) { + return multiplier.toString(); } return "X"; } diff --git a/Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java b/Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.java new file mode 100644 index 00000000000..e38cffe9b0d --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/combat/CanBlockOnlyFlyingAttachedEffect.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.abilities.effects.common.combat; + +import mage.abilities.Ability; +import mage.abilities.MageSingleton; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.AttachmentType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class CanBlockOnlyFlyingAttachedEffect extends ReplacementEffectImpl implements MageSingleton { + + public CanBlockOnlyFlyingAttachedEffect(AttachmentType attachmentType) { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + if (attachmentType.equals(AttachmentType.AURA)) { + this.staticText = "Enchanted creature can block only creatures with flying"; + } else { + this.staticText = "Equiped creature can block only creatures with flying"; + } + } + + public CanBlockOnlyFlyingAttachedEffect(final CanBlockOnlyFlyingAttachedEffect effect) { + super(effect); + } + + @Override + public CanBlockOnlyFlyingAttachedEffect copy() { + return new CanBlockOnlyFlyingAttachedEffect(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() == EventType.DECLARE_BLOCKER) { + Permanent attachment = game.getPermanent(source.getSourceId()); + if (attachment != null && attachment.getAttachedTo() != null + && event.getSourceId().equals(attachment.getAttachedTo())) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && !permanent.getAbilities().containsKey(FlyingAbility.getInstance().getId())) { + return true; + } + } + } + return false; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/continious/GainControlTargetEffect.java b/Mage/src/mage/abilities/effects/common/continious/GainControlTargetEffect.java index 46803300413..a4db6bae604 100644 --- a/Mage/src/mage/abilities/effects/common/continious/GainControlTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/GainControlTargetEffect.java @@ -55,7 +55,7 @@ public class GainControlTargetEffect extends ContinuousEffectImpl