From 5fca9dac068e83a2725ce0b18deaf0fc1db9634d Mon Sep 17 00:00:00 2001 From: fireshoes Date: Wed, 2 Sep 2015 23:44:23 -0500 Subject: [PATCH] [BFZ] Implemented Lantern Scout and Hero of Goma Fada. Updated a couple older Allies. Updated Avacyn, Angel of Hope to match oracle text. --- .../avacynrestored/AvacynAngelOfHope.java | 18 +- .../battleforzendikar/HeroOfGomaFada.java | 73 +++++ .../sets/battleforzendikar/LanternScout.java | 82 +++++ .../src/mage/sets/zendikar/BalaGedThief.java | 302 +++++++++--------- .../mage/sets/zendikar/HighlandBerserker.java | 161 +++++----- 5 files changed, 393 insertions(+), 243 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/HeroOfGomaFada.java create mode 100644 Mage.Sets/src/mage/sets/battleforzendikar/LanternScout.java diff --git a/Mage.Sets/src/mage/sets/avacynrestored/AvacynAngelOfHope.java b/Mage.Sets/src/mage/sets/avacynrestored/AvacynAngelOfHope.java index c826ac7ef5..8ad91046a0 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/AvacynAngelOfHope.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/AvacynAngelOfHope.java @@ -28,10 +28,6 @@ package mage.sets.avacynrestored; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; @@ -40,6 +36,10 @@ import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.VigilanceAbility; 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; @@ -57,13 +57,15 @@ public class AvacynAngelOfHope extends CardImpl { this.power = new MageInt(8); this.toughness = new MageInt(8); + // Flying, vigilance, indestructible this.addAbility(FlyingAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance()); + this.addAbility(IndestructibleAbility.getInstance()); - // Avacyn, Angel of Hope and other permanents you control are indestructible. - FilterControlledPermanent filter = new FilterControlledPermanent("Avacyn, Angel of Hope and other permanents you control"); - Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false); - effect.setText("{this} and other permanents you control are indestructible"); + // Other permanents you control are indestructible. + FilterControlledPermanent filter = new FilterControlledPermanent("Other permanents you control"); + Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, true); + effect.setText("Other permanents you control are indestructible"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/HeroOfGomaFada.java b/Mage.Sets/src/mage/sets/battleforzendikar/HeroOfGomaFada.java new file mode 100644 index 0000000000..6fa8f003b2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/HeroOfGomaFada.java @@ -0,0 +1,73 @@ +/* + * 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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class HeroOfGomaFada extends CardImpl { + + public HeroOfGomaFada(UUID ownerId) { + super(ownerId, 31, "Hero of Goma Fada", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.subtype.add("Ally"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Rally - Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn. + Ability ability = new AllyEntersBattlefieldTriggeredAbility( + new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()), false); + ability.setAbilityWord(AbilityWord.RALLY); + this.addAbility(ability); + } + + public HeroOfGomaFada(final HeroOfGomaFada card) { + super(card); + } + + @Override + public HeroOfGomaFada copy() { + return new HeroOfGomaFada(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/LanternScout.java b/Mage.Sets/src/mage/sets/battleforzendikar/LanternScout.java new file mode 100644 index 0000000000..ec5f1cccd1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/LanternScout.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.battleforzendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardIdPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class LanternScout extends CardImpl { + + public LanternScout(UUID ownerId) { + super(ownerId, 37, "Lantern Scout", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "BFZ"; + this.subtype.add("Human"); + this.subtype.add("Scout"); + this.subtype.add("Ally"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + FilterPermanent filter = new FilterPermanent("{this} or another Ally"); + filter.add(Predicates.or( + new CardIdPredicate(this.getId()), + new SubtypePredicate("Ally"))); + + // Rally - Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn. + Ability ability = new AllyEntersBattlefieldTriggeredAbility( + new GainAbilityAllEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()), false); + ability.setAbilityWord(AbilityWord.RALLY); + this.addAbility(ability); + } + + public LanternScout(final LanternScout card) { + super(card); + } + + @Override + public LanternScout copy() { + return new LanternScout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java b/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java index 36129e4800..eb1ad19cc5 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java +++ b/Mage.Sets/src/mage/sets/zendikar/BalaGedThief.java @@ -1,156 +1,146 @@ -/* - * 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.zendikar; - -import java.util.List; -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.Outcome; -import mage.constants.Zone; -import mage.filter.FilterCard; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardIdPredicate; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.players.Player; -import mage.target.TargetCard; -import mage.target.TargetPlayer; - -/** - * - * @author jeffwadsworth - */ -public class BalaGedThief extends CardImpl { - - public BalaGedThief(UUID ownerId) { - super(ownerId, 79, "Bala Ged Thief", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.expansionSetCode = "ZEN"; - this.subtype.add("Human"); - this.subtype.add("Rogue"); - this.subtype.add("Ally"); - - this.power = new MageInt(2); - this.toughness = new MageInt(2); - - FilterPermanent filter = new FilterPermanent("Bala Ged Thief or another Ally"); - filter.add(Predicates.or( - new CardIdPredicate(this.getId()), - new SubtypePredicate("Ally"))); - - // Whenever Bala Ged Thief or another Ally enters the battlefield under your control, target player reveals a number of cards from his or her hand equal to the number of Allies you control. You choose one of them. That player discards that card. - Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BalaGedThiefEffect(), filter, false); - TargetPlayer target = new TargetPlayer(); - ability.addTarget(target); - this.addAbility(ability); - } - - public BalaGedThief(final BalaGedThief card) { - super(card); - } - - @Override - public BalaGedThief copy() { - return new BalaGedThief(this); - } -} - -class BalaGedThiefEffect extends OneShotEffect { - - public BalaGedThiefEffect() { - super(Outcome.Discard); - this.staticText = "target player reveals a number of cards from his or her hand equal to the number of Allies you control. You choose one of them. That player discards that card"; - } - - public BalaGedThiefEffect(final BalaGedThiefEffect effect) { - super(effect); - } - - @Override - public BalaGedThiefEffect copy() { - return new BalaGedThiefEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(source.getFirstTarget()); - - if (targetPlayer == null) { - return false; - } - - Player you = game.getPlayer(source.getControllerId()); - - FilterControlledPermanent filter = new FilterControlledPermanent(); - filter.add(new SubtypePredicate("Ally")); - - int numberOfAllies = game.getBattlefield().countAll(filter, you.getId(), game); - - Cards cardsInHand = new CardsImpl(Zone.PICK); - cardsInHand.addAll(targetPlayer.getHand()); - - int count = Math.min(cardsInHand.size(), numberOfAllies); - - TargetCard target = new TargetCard(count, Zone.PICK, new FilterCard()); - Cards revealedCards = new CardsImpl(); - - if (targetPlayer.choose(Outcome.DrawCard, cardsInHand, target, game)) { - List targets = target.getTargets(); - for (UUID targetId : targets) { - Card card = game.getCard(targetId); - if (card != null) { - revealedCards.add(card); - } - } - } - - TargetCard targetInHand = new TargetCard(Zone.PICK, new FilterCard("card to discard")); - - if (!revealedCards.isEmpty()) { - targetPlayer.revealCards("Bala Ged Thief", revealedCards, game); - you.choose(Outcome.Neutral, revealedCards, targetInHand, game); - Card card = revealedCards.get(targetInHand.getFirstTarget(), game); - if (card != null) { - targetPlayer.discard(card, source, game); - game.informPlayers(new StringBuilder("Bala Ged Thief: ").append(targetPlayer.getLogName()).append(" discarded ").append(card.getName()).toString()); - } - } - return true; - } -} +/* + * 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.zendikar; + +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.TargetPlayer; + +/** + * + * @author jeffwadsworth + */ +public class BalaGedThief extends CardImpl { + + public BalaGedThief(UUID ownerId) { + super(ownerId, 79, "Bala Ged Thief", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.subtype.add("Ally"); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Bala Ged Thief or another Ally enters the battlefield under your control, target player reveals a number of cards from his or her hand equal to the number of Allies you control. You choose one of them. That player discards that card. + Ability ability = new AllyEntersBattlefieldTriggeredAbility(new BalaGedThiefEffect(), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public BalaGedThief(final BalaGedThief card) { + super(card); + } + + @Override + public BalaGedThief copy() { + return new BalaGedThief(this); + } +} + +class BalaGedThiefEffect extends OneShotEffect { + + public BalaGedThiefEffect() { + super(Outcome.Discard); + this.staticText = "target player reveals a number of cards from his or her hand equal to the number of Allies you control. You choose one of them. That player discards that card"; + } + + public BalaGedThiefEffect(final BalaGedThiefEffect effect) { + super(effect); + } + + @Override + public BalaGedThiefEffect copy() { + return new BalaGedThiefEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + + if (targetPlayer == null) { + return false; + } + + Player you = game.getPlayer(source.getControllerId()); + + FilterControlledPermanent filter = new FilterControlledPermanent(); + filter.add(new SubtypePredicate("Ally")); + + int numberOfAllies = game.getBattlefield().countAll(filter, you.getId(), game); + + Cards cardsInHand = new CardsImpl(Zone.PICK); + cardsInHand.addAll(targetPlayer.getHand()); + + int count = Math.min(cardsInHand.size(), numberOfAllies); + + TargetCard target = new TargetCard(count, Zone.PICK, new FilterCard()); + Cards revealedCards = new CardsImpl(); + + if (targetPlayer.choose(Outcome.DrawCard, cardsInHand, target, game)) { + List targets = target.getTargets(); + for (UUID targetId : targets) { + Card card = game.getCard(targetId); + if (card != null) { + revealedCards.add(card); + } + } + } + + TargetCard targetInHand = new TargetCard(Zone.PICK, new FilterCard("card to discard")); + + if (!revealedCards.isEmpty()) { + targetPlayer.revealCards("Bala Ged Thief", revealedCards, game); + you.choose(Outcome.Neutral, revealedCards, targetInHand, game); + Card card = revealedCards.get(targetInHand.getFirstTarget(), game); + if (card != null) { + targetPlayer.discard(card, source, game); + game.informPlayers(new StringBuilder("Bala Ged Thief: ").append(targetPlayer.getLogName()).append(" discarded ").append(card.getName()).toString()); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/HighlandBerserker.java b/Mage.Sets/src/mage/sets/zendikar/HighlandBerserker.java index 3ed316b0b6..8e911bc145 100644 --- a/Mage.Sets/src/mage/sets/zendikar/HighlandBerserker.java +++ b/Mage.Sets/src/mage/sets/zendikar/HighlandBerserker.java @@ -1,79 +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.zendikar; - -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.MageInt; -import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; -import mage.abilities.keyword.FirstStrikeAbility; -import mage.cards.CardImpl; -import mage.constants.TargetController; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; - -/** - * - * @author North - */ -public class HighlandBerserker extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Ally creatures you control"); - - static { - filter.add(new SubtypePredicate("Ally")); - filter.add(new ControllerPredicate(TargetController.YOU)); - } - - public HighlandBerserker(UUID ownerId) { - super(ownerId, 132, "Highland Berserker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.expansionSetCode = "ZEN"; - this.subtype.add("Human"); - this.subtype.add("Berserker"); - this.subtype.add("Ally"); - - this.power = new MageInt(2); - this.toughness = new MageInt(1); - - this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter), true)); - } - - public HighlandBerserker(final HighlandBerserker card) { - super(card); - } - - @Override - public HighlandBerserker copy() { - return new HighlandBerserker(this); - } -} +/* + * 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.zendikar; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +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.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author North + */ +public class HighlandBerserker extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Ally creatures you control"); + + static { + filter.add(new SubtypePredicate("Ally")); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public HighlandBerserker(UUID ownerId) { + super(ownerId, 132, "Highland Berserker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Human"); + this.subtype.add("Berserker"); + this.subtype.add("Ally"); + + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Whenever Highland Berserker or another Ally enters the battlefield under your control, you may have Ally creatures you control gain first strike until end of turn. + Effect effect = new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter); + effect.setText("you may have Ally creatures you control gain first strike until end of turn"); + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(effect, true)); + } + + public HighlandBerserker(final HighlandBerserker card) { + super(card); + } + + @Override + public HighlandBerserker copy() { + return new HighlandBerserker(this); + } +}