diff --git a/Mage.Sets/src/mage/sets/mirrodin/Terror.java b/Mage.Sets/src/mage/sets/mirrodin/Terror.java new file mode 100644 index 00000000000..d02c94ee849 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/Terror.java @@ -0,0 +1,52 @@ +/* + * 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.mirrodin; + +import java.util.UUID; + +/** + * + * @author North + */ +public class Terror extends mage.sets.tenth.Terror { + + public Terror(UUID ownerId) { + super(ownerId); + this.cardNumber = 79; + this.expansionSetCode = "MRD"; + } + + public Terror(final Terror card) { + super(card); + } + + @Override + public Terror copy() { + return new Terror(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/Blaze.java b/Mage.Sets/src/mage/sets/planechase/Blaze.java new file mode 100644 index 00000000000..f321f0187c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/Blaze.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planechase; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author North + */ +public class Blaze extends CardImpl { + + public Blaze(UUID ownerId) { + super(ownerId, 47, "Blaze", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{R}"); + this.expansionSetCode = "HOP"; + + this.color.setRed(true); + + // Blaze deals X damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public Blaze(final Blaze card) { + super(card); + } + + @Override + public Blaze copy() { + return new Blaze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SplinterTwin.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SplinterTwin.java new file mode 100644 index 00000000000..df912b027a5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SplinterTwin.java @@ -0,0 +1,129 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.AttachmentType; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.sets.tokens.EmptyToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; + +/** + * + * @author North + */ +public class SplinterTwin extends CardImpl { + + public SplinterTwin(UUID ownerId) { + super(ownerId, 165, "Splinter Twin", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Aura"); + + this.color.setRed(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 "{tap}: Put a token that's a copy of this creature onto the battlefield. That token has haste. Exile it at the beginning of the next end step." + SimpleActivatedAbility gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SplinterTwinEffect(), new TapSourceCost()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); + } + + public SplinterTwin(final SplinterTwin card) { + super(card); + } + + @Override + public SplinterTwin copy() { + return new SplinterTwin(this); + } +} + +class SplinterTwinEffect extends OneShotEffect { + + public SplinterTwinEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Put a token that's a copy of this creature onto the battlefield. That token has haste. Exile it at the beginning of the next end step"; + } + + public SplinterTwinEffect(final SplinterTwinEffect effect) { + super(effect); + } + + @Override + public SplinterTwinEffect copy() { + return new SplinterTwinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(source.getSourceId()); + if (card != null) { + EmptyToken token = new EmptyToken(); + CardUtil.copyTo(token).from(card); + + token.addAbility(HasteAbility.getInstance()); + token.putOntoBattlefield(game, source.getSourceId(), source.getControllerId()); + + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); + DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } + + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/AgonyWarp.java b/Mage.Sets/src/mage/sets/shardsofalara/AgonyWarp.java new file mode 100644 index 00000000000..0f82d39802a --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/AgonyWarp.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class AgonyWarp extends CardImpl { + + public AgonyWarp(UUID ownerId) { + super(ownerId, 153, "Agony Warp", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}{B}"); + this.expansionSetCode = "ALA"; + + this.color.setBlue(true); + this.color.setBlack(true); + + // Target creature gets -3/-0 until end of turn. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to get -3/-0"))); + // Target creature gets -0/-3 until end of turn. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to get -0/-3"))); + this.getSpellAbility().addEffect(new AgonyWarpEffect()); + } + + public AgonyWarp(final AgonyWarp card) { + super(card); + } + + @Override + public AgonyWarp copy() { + return new AgonyWarp(this); + } +} + +class AgonyWarpEffect extends ContinuousEffectImpl { + + public AgonyWarpEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.UnboostCreature); + this.staticText = "Target creature gets -0/-3 until end of turn"; + } + + public AgonyWarpEffect(final AgonyWarpEffect effect) { + super(effect); + } + + @Override + public AgonyWarpEffect copy() { + return new AgonyWarpEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int affectedTargets = 0; + Permanent target1 = game.getPermanent(source.getFirstTarget()); + Permanent target2 = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (target1 != null) { + target1.addPower(-3); + affectedTargets++; + } + if (target2 != null) { + target2.addToughness(-3); + affectedTargets++; + } + return affectedTargets > 0; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/AngelicBenediction.java b/Mage.Sets/src/mage/sets/shardsofalara/AngelicBenediction.java new file mode 100644 index 00000000000..662f6ce9c3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/AngelicBenediction.java @@ -0,0 +1,100 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.ExaltedAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class AngelicBenediction extends CardImpl { + + public AngelicBenediction(UUID ownerId) { + super(ownerId, 3, "Angelic Benediction", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + this.expansionSetCode = "ALA"; + + this.color.setWhite(true); + + this.addAbility(new ExaltedAbility()); + // Whenever a creature you control attacks alone, you may tap target creature. + this.addAbility(new AngelicBenedictionTriggeredAbility()); + } + + public AngelicBenediction(final AngelicBenediction card) { + super(card); + } + + @Override + public AngelicBenediction copy() { + return new AngelicBenediction(this); + } +} + +class AngelicBenedictionTriggeredAbility extends TriggeredAbilityImpl { + + public AngelicBenedictionTriggeredAbility() { + super(Zone.BATTLEFIELD, new TapTargetEffect(), true); + this.addTarget(new TargetCreaturePermanent()); + } + + public AngelicBenedictionTriggeredAbility(final AngelicBenedictionTriggeredAbility ability) { + super(ability); + } + + @Override + public AngelicBenedictionTriggeredAbility copy() { + return new AngelicBenedictionTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.DECLARED_ATTACKERS && game.getActivePlayerId().equals(this.controllerId)) { + if (game.getCombat().attacksAlone()) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature you control attacks alone, you may tap target creature"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java b/Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java new file mode 100644 index 00000000000..6ec73d757d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/BoneSplinters.java @@ -0,0 +1,66 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class BoneSplinters extends CardImpl { + + public BoneSplinters(UUID ownerId) { + super(ownerId, 67, "Bone Splinters", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "ALA"; + + this.color.setBlack(true); + + // As an additional cost to cast Bone Splinters, sacrifice a creature. + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + // Destroy target creature. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public BoneSplinters(final BoneSplinters card) { + super(card); + } + + @Override + public BoneSplinters copy() { + return new BoneSplinters(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java b/Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java new file mode 100644 index 00000000000..af97cdc3471 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/ClarionUltimatum.java @@ -0,0 +1,142 @@ +/* + * 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.shardsofalara; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author North + */ +public class ClarionUltimatum extends CardImpl { + + public ClarionUltimatum(UUID ownerId) { + super(ownerId, 163, "Clarion Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{G}{G}{W}{W}{W}{U}{U}"); + this.expansionSetCode = "ALA"; + + this.color.setBlue(true); + this.color.setGreen(true); + this.color.setWhite(true); + + // Choose five permanents you control. For each of those permanents, you may search your library for a card with the same name as that permanent. Put those cards onto the battlefield tapped, then shuffle your library. + this.getSpellAbility().addEffect(new ClarionUltimatumEffect()); + } + + public ClarionUltimatum(final ClarionUltimatum card) { + super(card); + } + + @Override + public ClarionUltimatum copy() { + return new ClarionUltimatum(this); + } +} + +class ClarionUltimatumEffect extends OneShotEffect { + + public ClarionUltimatumEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Choose five permanents you control. For each of those permanents, you may search your library for a card with the same name as that permanent. Put those cards onto the battlefield tapped, then shuffle your library"; + } + + public ClarionUltimatumEffect(final ClarionUltimatumEffect effect) { + super(effect); + } + + @Override + public ClarionUltimatumEffect copy() { + return new ClarionUltimatumEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + + Player player = game.getPlayer(source.getControllerId()); + int permanentsCount = game.getBattlefield().getAllActivePermanents(source.getControllerId()).size(); + if (player == null || permanentsCount < 1) { + return false; + } + + TargetControlledPermanent permanentsTarget = new TargetControlledPermanent(Math.min(permanentsCount, 5)); + permanentsTarget.setRequired(true); + player.choose(Outcome.Benefit, permanentsTarget, game); + + List chosenCards = new ArrayList(); + List namesFiltered = new ArrayList(); + List permanents = permanentsTarget.getTargets(); + for (UUID permanentId : permanents) { + Permanent permanent = game.getPermanent(permanentId); + final String cardName = permanent.getName(); + if (!namesFiltered.contains(cardName)) { + StringBuilder sb = new StringBuilder(); + sb.append("Search for ").append(cardName).append(" in your library?"); + + if (player.chooseUse(Outcome.PutCardInPlay, sb.toString(), game)) { + FilterCard filter = new FilterCard("card named" + cardName); + filter.getName().add(cardName); + TargetCardInLibrary target = new TargetCardInLibrary(filter); + + if (player.searchLibrary(target, game)) { + Card card = player.getLibrary().remove(target.getFirstTarget(), game); + if (card != null) { + chosenCards.add(card); + } + } + } else { + namesFiltered.add(cardName); + } + } + } + + for (Card card : chosenCards) { + card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId()); + Permanent permanent = game.getPermanent(card.getId()); + if (permanent != null) { + permanent.setTapped(true); + } + } + player.shuffleLibrary(game); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/CruelUltimatum.java b/Mage.Sets/src/mage/sets/shardsofalara/CruelUltimatum.java new file mode 100644 index 00000000000..792d8d2425f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/CruelUltimatum.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DiscardTargetEffect; +import mage.abilities.effects.common.DrawCardEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.common.SacrificeEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetOpponent; + +/** + * + * @author North + */ +public class CruelUltimatum extends CardImpl { + + public CruelUltimatum(UUID ownerId) { + super(ownerId, 164, "Cruel Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{U}{U}{B}{B}{B}{R}{R}"); + this.expansionSetCode = "ALA"; + + this.color.setRed(true); + this.color.setBlue(true); + this.color.setBlack(true); + + // Target opponent sacrifices a creature, discards three cards, then loses 5 life. You return a creature card from your graveyard to your hand, draw three cards, then gain 5 life. + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new SacrificeEffect(FilterCreaturePermanent.getDefault(), 1, "a creature")); + this.getSpellAbility().addEffect(new DiscardTargetEffect(3)); + this.getSpellAbility().addEffect(new LoseLifeTargetEffect(5)); + + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); + this.getSpellAbility().addEffect(new CruelUltimatumEffect()); + this.getSpellAbility().addEffect(new DrawCardEffect(3)); + this.getSpellAbility().addEffect(new GainLifeEffect(5)); + } + + public CruelUltimatum(final CruelUltimatum card) { + super(card); + } + + @Override + public CruelUltimatum copy() { + return new CruelUltimatum(this); + } +} + +class CruelUltimatumEffect extends OneShotEffect { + + public CruelUltimatumEffect() { + super(Outcome.ReturnToHand); + } + + public CruelUltimatumEffect(final CruelUltimatumEffect effect) { + super(effect); + } + + @Override + public CruelUltimatumEffect copy() { + return new CruelUltimatumEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(source.getTargets().get(1).getFirstTarget()); + if (card != null) { + return card.moveToZone(Zone.HAND, source.getId(), game, true); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/DragonFodder.java b/Mage.Sets/src/mage/sets/shardsofalara/DragonFodder.java new file mode 100644 index 00000000000..ad18a40cfc1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/DragonFodder.java @@ -0,0 +1,61 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.game.permanent.token.GoblinToken; + +/** + * + * @author North + */ +public class DragonFodder extends CardImpl { + + public DragonFodder(UUID ownerId) { + super(ownerId, 97, "Dragon Fodder", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "ALA"; + + this.color.setRed(true); + + // Put two 1/1 red Goblin creature tokens onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinToken(), 2)); + } + + public DragonFodder(final DragonFodder card) { + super(card); + } + + @Override + public DragonFodder copy() { + return new DragonFodder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/GiftOfTheGargantuan.java b/Mage.Sets/src/mage/sets/shardsofalara/GiftOfTheGargantuan.java new file mode 100644 index 00000000000..08d3aa77397 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/GiftOfTheGargantuan.java @@ -0,0 +1,162 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterLandCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author North + */ +public class GiftOfTheGargantuan extends CardImpl { + + public GiftOfTheGargantuan(UUID ownerId) { + super(ownerId, 132, "Gift of the Gargantuan", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "ALA"; + + this.color.setGreen(true); + + // Look at the top four cards of your library. You may reveal a creature card and/or a land card from among them and put the revealed cards into your hand. Put the rest on the bottom of your library in any order. + this.getSpellAbility().addEffect(new GiftOfTheGargantuanEffect()); + } + + public GiftOfTheGargantuan(final GiftOfTheGargantuan card) { + super(card); + } + + @Override + public GiftOfTheGargantuan copy() { + return new GiftOfTheGargantuan(this); + } +} + +class GiftOfTheGargantuanEffect extends OneShotEffect { + + public GiftOfTheGargantuanEffect() { + super(Outcome.DrawCard); + this.staticText = "Look at the top four cards of your library. You may reveal a creature card and/or a land card from among them and put the revealed cards into your hand. Put the rest on the bottom of your library in any order"; + } + + public GiftOfTheGargantuanEffect(final GiftOfTheGargantuanEffect effect) { + super(effect); + } + + @Override + public GiftOfTheGargantuanEffect copy() { + return new GiftOfTheGargantuanEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + + Cards cards = new CardsImpl(Zone.PICK); + boolean creatureCardFound = false; + boolean landCardFound = false; + int count = Math.min(player.getLibrary().size(), 4); + for (int i = 0; i < count; i++) { + Card card = player.getLibrary().removeFromTop(game); + if (card != null) { + cards.add(card); + game.setZone(card.getId(), Zone.PICK); + if (card.getCardType().contains(CardType.CREATURE)) { + creatureCardFound = true; + } + if (card.getCardType().contains(CardType.LAND)) { + landCardFound = true; + } + } + } + player.lookAtCards("Gift of the Gargantuan", cards, game); + + if ((creatureCardFound || landCardFound) && player.chooseUse(Outcome.DrawCard, "Do you wish to reveal a creature card and/or a land card and put them into your hand?", game)) { + Cards revealedCards = new CardsImpl(); + + TargetCard target = new TargetCard(Zone.PICK, new FilterCreatureCard("creature card to reveal and put into your hand")); + if (creatureCardFound && player.choose(Outcome.DrawCard, cards, target, game)) { + Card card = cards.get(target.getFirstTarget(), game); + if (card != null) { + cards.remove(card); + card.moveToZone(Zone.HAND, source.getId(), game, false); + revealedCards.add(card); + } + } + + target = new TargetCard(Zone.PICK, new FilterLandCard("land card to reveal and put into your hand")); + if (landCardFound && player.choose(Outcome.DrawCard, cards, target, game)) { + Card card = cards.get(target.getFirstTarget(), game); + if (card != null) { + cards.remove(card); + card.moveToZone(Zone.HAND, source.getId(), game, false); + revealedCards.add(card); + } + } + + if (!revealedCards.isEmpty()) { + player.revealCards("Gift of the Gargantuan", revealedCards, game); + } + } + + TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library")); + target.setRequired(true); + while (cards.size() > 1) { + player.choose(Outcome.Neutral, cards, target, game); + Card card = cards.get(target.getFirstTarget(), game); + if (card != null) { + cards.remove(card); + card.moveToZone(Zone.LIBRARY, source.getId(), game, false); + } + target.clearChosen(); + } + if (cards.size() == 1) { + Card card = cards.get(cards.iterator().next(), game); + card.moveToZone(Zone.LIBRARY, source.getId(), game, false); + } + + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/KissOfTheAmesha.java b/Mage.Sets/src/mage/sets/shardsofalara/KissOfTheAmesha.java new file mode 100644 index 00000000000..0d48c8db9ce --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/KissOfTheAmesha.java @@ -0,0 +1,65 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class KissOfTheAmesha extends CardImpl { + + public KissOfTheAmesha(UUID ownerId) { + super(ownerId, 177, "Kiss of the Amesha", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{W}{U}"); + this.expansionSetCode = "ALA"; + + this.color.setBlue(true); + this.color.setWhite(true); + + // Target player gains 7 life and draws two cards. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new GainLifeTargetEffect(7)); + this.getSpellAbility().addEffect(new DrawCardTargetEffect(2)); + } + + public KissOfTheAmesha(final KissOfTheAmesha card) { + super(card); + } + + @Override + public KissOfTheAmesha copy() { + return new KissOfTheAmesha(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/TitanicUltimatum.java b/Mage.Sets/src/mage/sets/shardsofalara/TitanicUltimatum.java new file mode 100644 index 00000000000..d38d6a099c3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/TitanicUltimatum.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.abilities.effects.common.continious.GainAbilityControlledEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class TitanicUltimatum extends CardImpl { + + public TitanicUltimatum(UUID ownerId) { + super(ownerId, 204, "Titanic Ultimatum", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{R}{R}{G}{G}{G}{W}{W}"); + this.expansionSetCode = "ALA"; + + this.color.setRed(true); + this.color.setGreen(true); + this.color.setWhite(true); + + // Until end of turn, creatures you control get +5/+5 and gain first strike, lifelink, and trample. + this.getSpellAbility().addEffect(new BoostControlledEffect(5, 5, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); + } + + public TitanicUltimatum(final TitanicUltimatum card) { + super(card); + } + + @Override + public TitanicUltimatum copy() { + return new TitanicUltimatum(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/Blaze.java b/Mage.Sets/src/mage/sets/tenth/Blaze.java new file mode 100644 index 00000000000..747bc5ce31d --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Blaze.java @@ -0,0 +1,52 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author North + */ +public class Blaze extends mage.sets.planechase.Blaze { + + public Blaze(UUID ownerId) { + super(ownerId); + this.cardNumber = 190; + this.expansionSetCode = "10E"; + } + + public Blaze(final Blaze card) { + super(card); + } + + @Override + public Blaze copy() { + return new Blaze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/Terror.java b/Mage.Sets/src/mage/sets/tenth/Terror.java new file mode 100644 index 00000000000..6da513ae65c --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Terror.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class Terror extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonartifact, nonblack creature"); + + static { + filter.getNotCardType().add(CardType.ARTIFACT); + filter.setNotCardType(true); + filter.getColor().setBlack(true); + filter.setNotColor(true); + } + + public Terror(UUID ownerId) { + super(ownerId, 182, "Terror", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "10E"; + + this.color.setBlack(true); + + // Destroy target nonartifact, nonblack creature. It can't be regenerated. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + } + + public Terror(final Terror card) { + super(card); + } + + @Override + public Terror copy() { + return new Terror(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java b/Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java new file mode 100644 index 00000000000..93b7c777f10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.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.zendikar; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author North + */ +public class RuinousMinotaur extends CardImpl { + + public RuinousMinotaur(UUID ownerId) { + super(ownerId, 145, "Ruinous Minotaur", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Minotaur"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(5); + this.toughness = new MageInt(2); + + // Whenever Ruinous Minotaur deals damage to an opponent, sacrifice a land. + this.addAbility(new RuinousMinotaurTriggeredAbility()); + } + + public RuinousMinotaur(final RuinousMinotaur card) { + super(card); + } + + @Override + public RuinousMinotaur copy() { + return new RuinousMinotaur(this); + } +} + +class RuinousMinotaurTriggeredAbility extends TriggeredAbilityImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("land you control"); + + static { + filter.getCardType().add(CardType.LAND); + } + + public RuinousMinotaurTriggeredAbility() { + super(Zone.BATTLEFIELD, new SacrificeTargetEffect(), true); + this.addTarget(new TargetControlledPermanent(filter)); + } + + public RuinousMinotaurTriggeredAbility(final RuinousMinotaurTriggeredAbility ability) { + super(ability); + } + + @Override + public RuinousMinotaurTriggeredAbility copy() { + return new RuinousMinotaurTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId) + && game.getOpponents(this.getControllerId()).contains(event.getTargetId())) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} deals damage to an opponent, sacrifice a land."; + } +}