From 4eacc3871cac183bb48f46354a5749d562677a1d Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 24 Jan 2014 22:37:45 +0100 Subject: [PATCH] [BNG] Added 5 green and 1 white card. --- .../sets/bornofthegods/AcolytesReward.java | 136 ++++++++++++++++++ .../sets/bornofthegods/AerieWorshippers.java | 1 + .../sets/bornofthegods/HuntersProwess.java | 106 ++++++++++++++ .../sets/bornofthegods/NessianDemolok.java | 84 +++++++++++ .../mage/sets/bornofthegods/NyxbornWolf.java | 70 +++++++++ .../sets/bornofthegods/RaisedByWolves.java | 108 ++++++++++++++ .../mage/sets/bornofthegods/Skyreaping.java | 74 ++++++++++ .../sets/bornofthegods/UnravelTheAEther.java | 108 ++++++++++++++ .../continious/BoostEnchantedEffect.java | 12 +- 9 files changed, 695 insertions(+), 4 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/HuntersProwess.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/NessianDemolok.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/NyxbornWolf.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/Skyreaping.java create mode 100644 Mage.Sets/src/mage/sets/bornofthegods/UnravelTheAEther.java diff --git a/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java b/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java new file mode 100644 index 0000000000..604aaeb4dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java @@ -0,0 +1,136 @@ +/* + * 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.dynamicvalue.common.DevotionCount; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AcolytesReward extends CardImpl { + + public AcolytesReward(UUID ownerId) { + super(ownerId, 1, "Acolyte's Reward", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "BNG"; + + this.color.setWhite(true); + + // Prevent the next X damage that would be dealt to target creature this turn, where X is your devotion to white. If damage is prevented this way, Acolyte's Reward deals that much damage to target creature or player. + this.getSpellAbility().addEffect(new AcolytesRewardEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(true)); + } + + public AcolytesReward(final AcolytesReward card) { + super(card); + } + + @Override + public AcolytesReward copy() { + return new AcolytesReward(this); + } +} + +class AcolytesRewardEffect extends PreventionEffectImpl { + + protected int amount = 0; + + public AcolytesRewardEffect() { + super(Duration.EndOfTurn); + staticText = "Prevent the next X damage that would be dealt to target creature this turn, where X is your devotion to white. If damage is prevented this way, {this} deals that much damage to target creature or player."; + } + + public AcolytesRewardEffect(final AcolytesRewardEffect effect) { + super(effect); + this.amount = effect.amount; + } + + @Override + public AcolytesRewardEffect copy() { + return new AcolytesRewardEffect(this); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + amount = new DevotionCount(ColoredManaSymbol.W).calculate(game, source); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getControllerId(), source.getId(), source.getControllerId(), event.getAmount(), false); + if (!game.replaceEvent(preventEvent)) { + Permanent targetCreature = game.getPermanent(source.getFirstTarget()); + if (targetCreature != null) { + int damage = event.getAmount(); + if (event.getAmount() >= this.amount) { + event.setAmount(damage - this.amount); + damage = this.amount; + this.used = true; + this.discard(); + } else { + event.setAmount(0); + this.amount -= damage; + } + + targetCreature.damage(damage, source.getSourceId(), game, true, false, event.getAppliedEffects()); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, + source.getControllerId(), source.getSourceId(), source.getControllerId(), damage)); + } + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (!this.used && super.applies(event, source, game) && event.getTargetId().equals(source.getFirstTarget())) { + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/AerieWorshippers.java b/Mage.Sets/src/mage/sets/bornofthegods/AerieWorshippers.java index ce6c7ad0ae..ed9447c04d 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/AerieWorshippers.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/AerieWorshippers.java @@ -82,5 +82,6 @@ class AerieWorshippersBirdToken extends Token { toughness = new MageInt(2); this.addAbility(FlyingAbility.getInstance()); this.setOriginalExpansionSetCode("BNG"); + this.setTokenType(2); } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/bornofthegods/HuntersProwess.java b/Mage.Sets/src/mage/sets/bornofthegods/HuntersProwess.java new file mode 100644 index 0000000000..644aa8e8dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/HuntersProwess.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.bornofthegods; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class HuntersProwess extends CardImpl { + + public HuntersProwess(UUID ownerId) { + super(ownerId, 124, "Hunter's Prowess", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{G}"); + this.expansionSetCode = "BNG"; + + this.color.setGreen(true); + + // Until end of turn, target creature gets +3/+3 and gains trample and "Whenever this creature deals combat damage to a player, draw that many cards." + Effect effect = new BoostTargetEffect(3,3, Duration.EndOfTurn); + effect.setText("Until end of turn, target creature gets +3/+3"); + this.getSpellAbility().addEffect(effect); + Ability grantedAbility = new DealsCombatDamageToAPlayerTriggeredAbility(new HuntersProwessDrawEffect(), false); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(grantedAbility, Duration.EndOfTurn, + "and gains trample and \"Whenever this creature deals combat damage to a player, draw that many cards.\"")); + } + + public HuntersProwess(final HuntersProwess card) { + super(card); + } + + @Override + public HuntersProwess copy() { + return new HuntersProwess(this); + } +} + +class HuntersProwessDrawEffect extends OneShotEffect { + + public HuntersProwessDrawEffect() { + super(Outcome.Benefit); + this.staticText = "draw that many cards"; + } + + public HuntersProwessDrawEffect(final HuntersProwessDrawEffect effect) { + super(effect); + } + + @Override + public HuntersProwessDrawEffect copy() { + return new HuntersProwessDrawEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int damage = (Integer) this.getValue("damage"); + if (damage > 0) { + controller.drawCards(damage, game); + } + return true; + } + + + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/bornofthegods/NessianDemolok.java b/Mage.Sets/src/mage/sets/bornofthegods/NessianDemolok.java new file mode 100644 index 0000000000..1bc2ca7fc3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/NessianDemolok.java @@ -0,0 +1,84 @@ +/* + * 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.DestroyTargetEffect; +import mage.abilities.keyword.TributeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class NessianDemolok extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("noncreature permanent"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public NessianDemolok(UUID ownerId) { + super(ownerId, 128, "Nessian Demolok", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Beast"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Tribute 3 + this.addAbility(new TributeAbility(3)); + // When Nessian Demolok enters the battlefield, if tribute wasn't paid, destroy target noncreature permanent. + TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(), + "When {this} enters the battlefield, if its tribute wasn't paid, destroy target noncreature permanent.")); + } + + public NessianDemolok(final NessianDemolok card) { + super(card); + } + + @Override + public NessianDemolok copy() { + return new NessianDemolok(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/NyxbornWolf.java b/Mage.Sets/src/mage/sets/bornofthegods/NyxbornWolf.java new file mode 100644 index 0000000000..ef84d676f1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/NyxbornWolf.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.sets.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.keyword.BestowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class NyxbornWolf extends CardImpl { + + public NyxbornWolf(UUID ownerId) { + super(ownerId, 131, "Nyxborn Wolf", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Wolf"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Bestow {4}{G} + this.addAbility(new BestowAbility(this, "{4}{G}")); + // Enchanted creature gets +3/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3,1, Duration.WhileOnBattlefield))); + } + + public NyxbornWolf(final NyxbornWolf card) { + super(card); + } + + @Override + public NyxbornWolf copy() { + return new NyxbornWolf(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java b/Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java new file mode 100644 index 0000000000..839b0b7ea9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/RaisedByWolves.java @@ -0,0 +1,108 @@ +/* + * 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.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.Token; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class RaisedByWolves extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Wolf you control"); + + static { + filter.add(new SubtypePredicate("Wolf")); + } + + public RaisedByWolves(UUID ownerId) { + super(ownerId, 135, "Raised by Wolves", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Aura"); + + this.color.setGreen(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Raised by Wolves enters the battlefield, put two 2/2 green Wolf creature tokens onto the battlefield. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WolfToken(), 2))); + // Enchanted creature gets +1/+1 for each Wolf you control. + DynamicValue amountOfWolves = new PermanentsOnBattlefieldCount(filter); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amountOfWolves, amountOfWolves, Duration.WhileOnBattlefield))); + } + + public RaisedByWolves(final RaisedByWolves card) { + super(card); + } + + @Override + public RaisedByWolves copy() { + return new RaisedByWolves(this); + } +} + +class WolfToken extends Token { + + public WolfToken() { + super("Wolf", "2/2 green Wolf creature token"); + this.setOriginalExpansionSetCode("BNG"); + cardType.add(CardType.CREATURE); + color = ObjectColor.GREEN; + subtype.add("Wolf"); + power = new MageInt(2); + toughness = new MageInt(2); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/Skyreaping.java b/Mage.Sets/src/mage/sets/bornofthegods/Skyreaping.java new file mode 100644 index 0000000000..ac769730ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/Skyreaping.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.dynamicvalue.common.DevotionCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LevelX2 + */ +public class Skyreaping extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public Skyreaping(UUID ownerId) { + super(ownerId, 140, "Skyreaping", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{G}"); + this.expansionSetCode = "BNG"; + + this.color.setGreen(true); + + // Skyreaping deals damage to each creature with flying equal to your devotion to green. + Effect effect = new DamageAllEffect(new DevotionCount(ColoredManaSymbol.G), filter); + effect.setText("{this} deals damage to each creature with flying equal to your devotion to green (Each {G} in the mana costs of permanents you control counts toward your devotion to green.)"); + this.getSpellAbility().addEffect(effect); + } + + public Skyreaping(final Skyreaping card) { + super(card); + } + + @Override + public Skyreaping copy() { + return new Skyreaping(this); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/UnravelTheAEther.java b/Mage.Sets/src/mage/sets/bornofthegods/UnravelTheAEther.java new file mode 100644 index 0000000000..c0cd042a97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/bornofthegods/UnravelTheAEther.java @@ -0,0 +1,108 @@ +/* + * 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.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.Target; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class UnravelTheAEther extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.ENCHANTMENT))); + } + + public UnravelTheAEther(UUID ownerId) { + super(ownerId, 143, "Unravel the AEther", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "BNG"; + + this.color.setGreen(true); + + // Choose target artifact or enchantment. Its owner shuffles it into his or her library. + this.getSpellAbility().addEffect(new UnravelTheAEtherShuffleIntoLibraryEffect()); + Target target = new TargetPermanent(1,1,filter,true); + target.setRequired(true); + this.getSpellAbility().addTarget(target); + } + + public UnravelTheAEther(final UnravelTheAEther card) { + super(card); + } + + @Override + public UnravelTheAEther copy() { + return new UnravelTheAEther(this); + } +} +class UnravelTheAEtherShuffleIntoLibraryEffect extends OneShotEffect { + + public UnravelTheAEtherShuffleIntoLibraryEffect() { + super(Outcome.Detriment); + this.staticText = "Choose target artifact or enchantment. Its owner shuffles it into his or her library"; + } + + public UnravelTheAEtherShuffleIntoLibraryEffect(final UnravelTheAEtherShuffleIntoLibraryEffect effect) { + super(effect); + } + + @Override + public UnravelTheAEtherShuffleIntoLibraryEffect copy() { + return new UnravelTheAEtherShuffleIntoLibraryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); + if (permanent != null) { + if (permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true) ) { + game.getPlayer(permanent.getOwnerId()).shuffleLibrary(game); + return true; + } + } + return false; + } +} diff --git a/Mage/src/mage/abilities/effects/common/continious/BoostEnchantedEffect.java b/Mage/src/mage/abilities/effects/common/continious/BoostEnchantedEffect.java index 94290459a2..1ed66cb219 100644 --- a/Mage/src/mage/abilities/effects/common/continious/BoostEnchantedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/BoostEnchantedEffect.java @@ -95,19 +95,23 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl 0) { sb.append(" for each ");