diff --git a/Mage.Sets/src/mage/sets/magic2015/AEtherspouts.java b/Mage.Sets/src/mage/sets/magic2015/AEtherspouts.java new file mode 100644 index 00000000000..c373e5a7afb --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/AEtherspouts.java @@ -0,0 +1,103 @@ +/* + * 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.magic2015; + +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.common.FilterAttackingCreature; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class AEtherspouts extends CardImpl { + + public AEtherspouts(UUID ownerId) { + super(ownerId, 44, "AEtherspouts", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); + this.expansionSetCode = "M15"; + + this.color.setBlue(true); + + // For each attacking creature, its owner puts it on the top or bottom of his or her library. + this.getSpellAbility().addEffect(new AEtherspoutsEffect()); + } + + public AEtherspouts(final AEtherspouts card) { + super(card); + } + + @Override + public AEtherspouts copy() { + return new AEtherspouts(this); + } +} + +class AEtherspoutsEffect extends OneShotEffect { + + public AEtherspoutsEffect() { + super(Outcome.Benefit); + this.staticText = "For each attacking creature, its owner puts it on the top or bottom of his or her library"; + } + + public AEtherspoutsEffect(final AEtherspoutsEffect effect) { + super(effect); + } + + @Override + public AEtherspoutsEffect copy() { + return new AEtherspoutsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + boolean result = true; + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (Permanent permanent:game.getState().getBattlefield().getActivePermanents(new FilterAttackingCreature(), source.getControllerId(), source.getSourceId(), game)) { + Player owner = game.getPlayer(permanent.getOwnerId()); + if (owner != null) { + owner.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD, + owner.chooseUse(Outcome.ReturnToHand, "Put " + permanent.getLogName() + " to the top? (else it goes to bottom)", game), true); + } else { + result = false; + } + } + return result; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2015/AeronautTinkerer.java b/Mage.Sets/src/mage/sets/magic2015/AeronautTinkerer.java new file mode 100644 index 00000000000..5123f88353f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/AeronautTinkerer.java @@ -0,0 +1,75 @@ +/* + * 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.magic2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.ControlsPermanentCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledArtifactPermanent; + +/** + * + * @author LevelX2 + */ +public class AeronautTinkerer extends CardImpl { + + final static private String rule = "{this} has flying as long as you control an artifact"; + + public AeronautTinkerer(UUID ownerId) { + super(ownerId, 43, "Aeronaut Tinkerer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "M15"; + this.subtype.add("Human"); + this.subtype.add("Artificer"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Aeronaut Tinkerer has flying as long as you control an artifact. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), new ControlsPermanentCondition(new FilterControlledArtifactPermanent()), rule))); + + } + + public AeronautTinkerer(final AeronautTinkerer card) { + super(card); + } + + @Override + public AeronautTinkerer copy() { + return new AeronautTinkerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2015/SoulOfTheros.java b/Mage.Sets/src/mage/sets/magic2015/SoulOfTheros.java new file mode 100644 index 00000000000..4e720eb8f3b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/SoulOfTheros.java @@ -0,0 +1,94 @@ +/* + * 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.magic2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +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.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SoulOfTheros extends CardImpl { + + public SoulOfTheros(UUID ownerId) { + super(ownerId, 34, "Soul of Theros", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "M15"; + this.subtype.add("Avatar"); + + this.color.setWhite(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // {4}{W}{W}: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn. + Effect effect1 = new BoostControlledEffect(2, 2, Duration.EndOfTurn); + effect1.setText("Creatures you control get +2/+2"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect1, new ManaCostsImpl("{4}{W}{W}")); + Effect effect2 = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); + effect2.setText("and gain first strike"); + ability.addEffect(effect2); + Effect effect3 = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn); + effect3.setText("and lifelink until end of turn"); + ability.addEffect(effect3); + this.addAbility(ability); + + // {4}{W}{W}, Exile Soul of Theros from your graveyard: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn. + ability = new SimpleActivatedAbility(Zone.GRAVEYARD, effect1, new ManaCostsImpl("{4}{W}{W}")); + ability.addCost(new ExileSourceCost()); + ability.addEffect(effect2); + ability.addEffect(effect3); + this.addAbility(ability); + } + + public SoulOfTheros(final SoulOfTheros card) { + super(card); + } + + @Override + public SoulOfTheros copy() { + return new SoulOfTheros(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2015/SpectraWard.java b/Mage.Sets/src/mage/sets/magic2015/SpectraWard.java new file mode 100644 index 00000000000..7ac19e57e64 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/SpectraWard.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.magic2015; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SpectraWard extends CardImpl { + + private static final FilterCard filter = new FilterCard("all colors"); + + static { + filter.add(Predicates.or( + new ColorPredicate(ObjectColor.BLACK), + new ColorPredicate(ObjectColor.BLUE), + new ColorPredicate(ObjectColor.GREEN), + new ColorPredicate(ObjectColor.RED), + new ColorPredicate(ObjectColor.WHITE))); + } + + public SpectraWard(UUID ownerId) { + super(ownerId, 36, "Spectra Ward", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}"); + this.expansionSetCode = "M15"; + this.subtype.add("Aura"); + + this.color.setWhite(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); + + // Enchanted creature gets +2/+2 and has protection from all colors. This effect doesn't remove auras. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2,2, Duration.WhileOnBattlefield)); + ProtectionAbility protectionAbility = new ProtectionAbility(filter); + protectionAbility.setRemovesAuras(false); + ability.addEffect(new GainAbilityAttachedEffect(protectionAbility, AttachmentType.AURA, Duration.WhileOnBattlefield)); + this.addAbility(ability); + + } + + public SpectraWard(final SpectraWard card) { + super(card); + } + + @Override + public SpectraWard copy() { + return new SpectraWard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2015/SpiritBonds.java b/Mage.Sets/src/mage/sets/magic2015/SpiritBonds.java new file mode 100644 index 00000000000..aa5d6c702dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/SpiritBonds.java @@ -0,0 +1,95 @@ +/* + * 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.magic2015; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.SpiritWhiteToken; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class SpiritBonds extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Spirit creature you control"); + private static final FilterControlledPermanent filterSpirit = new FilterControlledPermanent("Spirit"); + private static final FilterControlledCreaturePermanent filterNontoken = new FilterControlledCreaturePermanent("nontoken creature"); + + static { + filter.add(Predicates.not(new SubtypePredicate("Spirit"))); + filterSpirit.add(new SubtypePredicate("Spirit")); + filterNontoken.add(Predicates.not(new TokenPredicate())); + } + + public SpiritBonds(UUID ownerId) { + super(ownerId, 37, "Spirit Bonds", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "M15"; + + this.color.setWhite(true); + + // Whenever a nontoken creature enters the battlefield under your control, you may pay {W}. If you do, but a 1/1 white Spirit creature token with flying into play. + this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(new CreateTokenEffect(new SpiritWhiteToken("M15")), new ManaCostsImpl("{W}")), filterNontoken, false)); + + // {1}{W}, Sacrifice a Spirit: Target non-Spirit creature you control gains indestructible until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1,1,filterSpirit, true))); + ability.addTarget(new TargetControlledCreaturePermanent(filter)); + this.addAbility(ability); + } + + public SpiritBonds(final SpiritBonds card) { + super(card); + } + + @Override + public SpiritBonds copy() { + return new SpiritBonds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2015/TriplicateSpirits.java b/Mage.Sets/src/mage/sets/magic2015/TriplicateSpirits.java new file mode 100644 index 00000000000..66d739df592 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/TriplicateSpirits.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.magic2015; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.ConvokeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.SpiritWhiteToken; + +/** + * + * @author LevelX2 + */ +public class TriplicateSpirits extends CardImpl { + + public TriplicateSpirits(UUID ownerId) { + super(ownerId, 40, "Triplicate Spirits", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{W}{W}"); + this.expansionSetCode = "M15"; + + this.color.setWhite(true); + + // Convoke + this.addAbility(new ConvokeAbility()); + // Put three 1/1 white Spirit creature tokens with flying onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritWhiteToken("M15"), 3)); + + } + + public TriplicateSpirits(final TriplicateSpirits card) { + super(card); + } + + @Override + public TriplicateSpirits copy() { + return new TriplicateSpirits(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2015/WallOfEssence.java b/Mage.Sets/src/mage/sets/magic2015/WallOfEssence.java new file mode 100644 index 00000000000..1c2b89c138c --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/WallOfEssence.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.magic2015; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class WallOfEssence extends mage.sets.stronghold.WallOfEssence { + + public WallOfEssence(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "M15"; + } + + public WallOfEssence(final WallOfEssence card) { + super(card); + } + + @Override + public WallOfEssence copy() { + return new WallOfEssence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2015/WardenOfTheBeyond.java b/Mage.Sets/src/mage/sets/magic2015/WardenOfTheBeyond.java new file mode 100644 index 00000000000..574d58c3f9a --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2015/WardenOfTheBeyond.java @@ -0,0 +1,101 @@ +/* + * 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.magic2015; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class WardenOfTheBeyond extends CardImpl { + + public WardenOfTheBeyond(UUID ownerId) { + super(ownerId, 42, "Warden of the Beyond", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "M15"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + // Warden of the Beyond gets +2/+2 as long as an opponent owns a card in exile. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinousEffect(new BoostSourceEffect(2,2,Duration.WhileOnBattlefield), OpponentOwnsCardInExileCondition.getInstance(), + "{this} gets +2/+2 as long as an opponent owns a card in exile"))); + } + + public WardenOfTheBeyond(final WardenOfTheBeyond card) { + super(card); + } + + @Override + public WardenOfTheBeyond copy() { + return new WardenOfTheBeyond(this); + } +} + +class OpponentOwnsCardInExileCondition implements Condition { + + private static final OpponentOwnsCardInExileCondition fInstance = new OpponentOwnsCardInExileCondition(); + + public static Condition getInstance() { + return fInstance; + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (Card card :game.getExile().getAllCards(game)) { + if (controller.hasOpponent(card.getOwnerId(), game)) { + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/WallOfEssence.java b/Mage.Sets/src/mage/sets/stronghold/WallOfEssence.java new file mode 100644 index 00000000000..59154239038 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/WallOfEssence.java @@ -0,0 +1,134 @@ +/* + * 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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamagedCreatureEvent; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class WallOfEssence extends CardImpl { + + public WallOfEssence(UUID ownerId) { + super(ownerId, 122, "Wall of Essence", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "STH"; + this.subtype.add("Wall"); + + this.color.setWhite(true); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Whenever Wall of Essence is dealt combat damage, you gain that much life. + this.addAbility(new WallOfEssenceTriggeredAbility()); + } + + public WallOfEssence(final WallOfEssence card) { + super(card); + } + + @Override + public WallOfEssence copy() { + return new WallOfEssence(this); + } +} + +class WallOfEssenceTriggeredAbility extends TriggeredAbilityImpl { + + public WallOfEssenceTriggeredAbility() { + super(Zone.BATTLEFIELD, new PiousWarriorGainLifeEffect()); + } + + public WallOfEssenceTriggeredAbility(final WallOfEssenceTriggeredAbility effect) { + super(effect); + } + + @Override + public WallOfEssenceTriggeredAbility copy() { + return new WallOfEssenceTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE && event.getTargetId().equals(this.sourceId) + && ((DamagedCreatureEvent)event).isCombatDamage() ) { + this.getEffects().get(0).setValue("damageAmount", event.getAmount()); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} is dealt combat damage, " + super.getRule(); + } +} + + +class PiousWarriorGainLifeEffect extends OneShotEffect { + + public PiousWarriorGainLifeEffect() { + super(Outcome.GainLife); + staticText = "you gain that much life"; + } + + public PiousWarriorGainLifeEffect(final PiousWarriorGainLifeEffect effect) { + super(effect); + } + + @Override + public PiousWarriorGainLifeEffect copy() { + return new PiousWarriorGainLifeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.gainLife((Integer) this.getValue("damageAmount"), game); + } + return true; + } + +}