From 39f60c20fdd324d98bcccaf1d07a8e12a2ebed06 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Tue, 12 May 2015 21:52:09 -0300 Subject: [PATCH 01/26] [ODY] Add Animal Boneyard --- .../src/mage/sets/odyssey/AnimalBoneyard.java | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java new file mode 100644 index 0000000000..24f5e1b0cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java @@ -0,0 +1,127 @@ +/* + * 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.odyssey; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author anonymous + */ +public class AnimalBoneyard extends CardImpl { + + public AnimalBoneyard(UUID ownerId) { + super(ownerId, 4, "Animal Boneyard", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Aura"); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted land has "{tap}, Sacrifice a creature: You gain life equal to that creature's toughness." + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, null, new TapSourceCost()); + gainedAbility.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, + "Enchanted land has \"{tap}, Sacrifice a creature: You gain life equal to that creature's toughness.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public AnimalBoneyard(final AnimalBoneyard card) { + super(card); + } + + @Override + public AnimalBoneyard copy() { + return new AnimalBoneyard(this); + } +} + +class AnimalBoneyardEffect extends OneShotEffect { + + public AnimalBoneyardEffect() { + super(Outcome.GainLife); + staticText = "You gain life equal to that creature's toughness"; + } + + public AnimalBoneyardEffect(final AnimalBoneyardEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + + int toughness = 0; + + for (Cost cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost && ((SacrificeTargetCost) cost).getPermanents().size() > 0) { + toughness = ((SacrificeTargetCost) cost).getPermanents().get(0).getToughness().getValue(); + break; + } + } + if (toughness > 0) { + controller.gainLife(toughness, game); + } + return true; + } + return false; + + } + + @Override + public AnimalBoneyardEffect copy() { + return new AnimalBoneyardEffect(this); + } +} From 19629038c2f62a51ffc563f4af9ad7bfd278205e Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:47:59 -0300 Subject: [PATCH 02/26] [FUT] Add Sliversmith --- .../mage/sets/futuresight/Sliversmith.java | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/futuresight/Sliversmith.java diff --git a/Mage.Sets/src/mage/sets/futuresight/Sliversmith.java b/Mage.Sets/src/mage/sets/futuresight/Sliversmith.java new file mode 100644 index 0000000000..3de55d8d33 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/Sliversmith.java @@ -0,0 +1,85 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author anonymous + */ +public class Sliversmith extends CardImpl { + + public Sliversmith(UUID ownerId) { + super(ownerId, 163, "Sliversmith", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Spellshaper"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}, {tap}, Discard a card: Put a 1/1 colorless Sliver artifact creature token named Metallic Sliver onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.HAND, new CreateTokenEffect(new MetallicSliverToken()), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public Sliversmith(final Sliversmith card) { + super(card); + } + + @Override + public Sliversmith copy() { + return new Sliversmith(this); + } +} + +class MetallicSliverToken extends Token { + + MetallicSliverToken() { + super("Metallic Sliver", "a 1/1 colorless Sliver creature token"); + cardType.add(CardType.CREATURE); + cardType.add(CardType.ARTIFACT); + subtype.add("Sliver"); + power = new MageInt(1); + toughness = new MageInt(1); + this.setOriginalExpansionSetCode("FUT"); + } +} From 69841ae527b75283087dbdd3ed30b4027ae9da87 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:48:41 -0300 Subject: [PATCH 03/26] [PLC] Add Spitting Sliver --- .../mage/sets/planarchaos/SpittingSliver.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planarchaos/SpittingSliver.java diff --git a/Mage.Sets/src/mage/sets/planarchaos/SpittingSliver.java b/Mage.Sets/src/mage/sets/planarchaos/SpittingSliver.java new file mode 100644 index 0000000000..627de7797e --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/SpittingSliver.java @@ -0,0 +1,76 @@ +/* + * 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.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author anonymous + */ +public class SpittingSliver extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); + + static { + filter.add(new SubtypePredicate("Sliver")); + } + + public SpittingSliver(UUID ownerId) { + super(ownerId, 80, "Spitting Sliver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Sliver"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // All Sliver creatures have first strike. + Ability gainedAbility = FirstStrikeAbility.getInstance(); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, "All Sliver creatures have first strike."))); + } + + public SpittingSliver(final SpittingSliver card) { + super(card); + } + + @Override + public SpittingSliver copy() { + return new SpittingSliver(this); + } +} From 174131ee928211c301b0a3660a6386c64b1f226b Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:49:03 -0300 Subject: [PATCH 04/26] [TMP] Add Mindwhip Sliver --- .../src/mage/sets/tempest/MindwhipSliver.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java diff --git a/Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java b/Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java new file mode 100644 index 0000000000..a2a7aad4ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java @@ -0,0 +1,82 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author anonymous + */ +public class MindwhipSliver extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("All Slivers"); + + static { + filter.add(new SubtypePredicate("Sliver")); + } + + public MindwhipSliver(UUID ownerId) { + super(ownerId, 39, "Mindwhip Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Slivers have "{2}, Sacrifice this permanent: Target player discards a card at random. Activate this ability only any time you could cast a sorcery." + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1, true), new GenericManaCost(2)); + gainedAbility.addCost(new SacrificeSourceCost()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, + "All Slivers have \"{2}, Sacrifice this permanent: Target player discards a card at random. Activate this ability only any time you could cast a sorcery.\""))); + } + + public MindwhipSliver(final MindwhipSliver card) { + super(card); + } + + @Override + public MindwhipSliver copy() { + return new MindwhipSliver(this); + } +} From 2d943d590d15ef135028306ff835e8c6e1471ba3 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:50:23 -0300 Subject: [PATCH 05/26] [TSP] Add Basal Sliver --- .../src/mage/sets/timespiral/BasalSliver.java | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/BasalSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/BasalSliver.java b/Mage.Sets/src/mage/sets/timespiral/BasalSliver.java new file mode 100644 index 0000000000..e3f495b7f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/BasalSliver.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author anonymous + */ +public class BasalSliver extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("All Slivers"); + + static { + filter.add(new SubtypePredicate("Sliver")); + } + + public BasalSliver(UUID ownerId) { + super(ownerId, 96, "Basal Sliver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Slivers have "Sacrifice this permanent: Add {B}{B} to your mana pool." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddManaToManaPoolSourceControllerEffect(Mana.BlackMana(2)), new SacrificeSourceCost()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( + ability, Duration.WhileOnBattlefield, + filter, "All Slivers have \"Sacrifice this permanent: Add {B}{B} to your mana pool.\""))); + } + + public BasalSliver(final BasalSliver card) { + super(card); + } + + @Override + public BasalSliver copy() { + return new BasalSliver(this); + } +} From e4eb07dadeb652cc725aac031e3fed6a4743b4ea Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:50:38 -0300 Subject: [PATCH 06/26] [TSP] Add Sedge Sliver --- .../src/mage/sets/timespiral/SedgeSliver.java | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/SedgeSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/SedgeSliver.java b/Mage.Sets/src/mage/sets/timespiral/SedgeSliver.java new file mode 100644 index 0000000000..a051d046bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/SedgeSliver.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author anonymous + */ +public class SedgeSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); + + private static final FilterPermanent filterSlivers = new FilterPermanent("Sliver", "All Slivers"); + + private static final FilterPermanent filterSwamp = new FilterPermanent("Swamp", "Swamp"); + + public SedgeSliver(UUID ownerId) { + super(ownerId, 177, "Sedge Sliver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Sliver creatures have "This creature gets +1/+1 as long as you control a Swamp." + Ability boost = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filterSwamp, 1, 1)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(boost, Duration.WhileOnBattlefield, + filter, "All Sliver creatures have \"This creature gets +1/+1 as long as you control a Swamp.\""))); + // All Slivers have "{B}: Regenerate this permanent." + Ability regenerate = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}")); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(regenerate, Duration.WhileOnBattlefield, + filterSlivers, "All Slivers have \"{B}: Regenerate this permanent.\""))); + } + + public SedgeSliver(final SedgeSliver card) { + super(card); + } + + @Override + public SedgeSliver copy() { + return new SedgeSliver(this); + } +} From 060441708031e49ebaef8ba1c30ab33c100cd86b Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:50:47 -0300 Subject: [PATCH 07/26] [TSP] Add Opaline Sliver --- .../mage/sets/timespiral/OpalineSliver.java | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java b/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java new file mode 100644 index 0000000000..abee2d9820 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java @@ -0,0 +1,112 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author anonymous + */ +public class OpalineSliver extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("All Slivers"); + + static { + filter.add(new SubtypePredicate("Sliver")); + } + + public OpalineSliver(UUID ownerId) { + super(ownerId, 244, "Opaline Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}{U}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Slivers have "Whenever this permanent becomes the target of a spell an opponent controls, you may draw a card." + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( + new OpalineSliverTriggeredAbility(), Duration.WhileOnBattlefield, + filter, "All Slivers have \"Whenever this permanent becomes the target of a spell an opponent controls, you may draw a card.\""))); + } + + public OpalineSliver(final OpalineSliver card) { + super(card); + } + + @Override + public OpalineSliver copy() { + return new OpalineSliver(this); + } +} + +class OpalineSliverTriggeredAbility extends TriggeredAbilityImpl { + + public OpalineSliverTriggeredAbility() { + super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); + } + + public OpalineSliverTriggeredAbility(final OpalineSliverTriggeredAbility ability) { + super(ability); + } + + @Override + public OpalineSliverTriggeredAbility copy() { + return new OpalineSliverTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.TARGETED && event.getTargetId().equals(this.getSourceId()) && game.getOpponents(this.controllerId).contains(event.getPlayerId())) { + getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever this permanent becomes the target of a spell an opponent controls, you may draw a card."; + } + +} From 1525904b6f85996aebcf36375a01fc6aa33dbae6 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:50:54 -0300 Subject: [PATCH 08/26] [TSP] Add Shadow Sliver --- .../mage/sets/timespiral/ShadowSliver.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/ShadowSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/ShadowSliver.java b/Mage.Sets/src/mage/sets/timespiral/ShadowSliver.java new file mode 100644 index 0000000000..c421939afc --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/ShadowSliver.java @@ -0,0 +1,76 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author anonymous + */ +public class ShadowSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); + + static { + filter.add(new SubtypePredicate("Sliver")); + } + + public ShadowSliver(UUID ownerId) { + super(ownerId, 76, "Shadow Sliver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // All Sliver creatures have shadow. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( + ShadowAbility.getInstance(), Duration.WhileOnBattlefield, + filter, "All Sliver creatures have shadow."))); + } + + public ShadowSliver(final ShadowSliver card) { + super(card); + } + + @Override + public ShadowSliver copy() { + return new ShadowSliver(this); + } +} From 26a5d49b4aeddbceff07a5c1cba51710daea7ff2 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:51:02 -0300 Subject: [PATCH 09/26] [TSP] Add Pulmonic Sliver --- .../mage/sets/timespiral/PulmonicSliver.java | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java b/Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java new file mode 100644 index 0000000000..1f60d3f2c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.PutIntoGraveFromAnywhereSourceAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ReturnToLibrarySpellEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +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.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author anonymous + */ +public class PulmonicSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); + + private static final FilterPermanent filterSlivers = new FilterPermanent("All Slivers"); + + static { + filter.add(new SubtypePredicate("Sliver")); + filterSlivers.add(new SubtypePredicate("Sliver")); + } + + public PulmonicSliver(UUID ownerId) { + super(ownerId, 36, "Pulmonic Sliver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // All Sliver creatures have flying. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( + FlyingAbility.getInstance(), Duration.WhileOnBattlefield, + filter, "All Sliver creatures have flying."))); + // All Slivers have "If this permanent would be put into a graveyard, you may put it on top of its owner's library instead." + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( + new PutIntoGraveFromAnywhereSourceAbility(new ReturnToLibrarySpellEffect(true)), Duration.WhileOnBattlefield, + filterSlivers, "All Slivers have \"If this permanent would be put into a graveyard, you may put it on top of its owner's library instead.\""))); + } + + public PulmonicSliver(final PulmonicSliver card) { + super(card); + } + + @Override + public PulmonicSliver copy() { + return new PulmonicSliver(this); + } +} From eeca9b3f27d0e8829bd928d4301246c7c18f07c0 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Fri, 15 May 2015 23:59:26 -0300 Subject: [PATCH 10/26] [TSP] Add Psionic Sliver --- .../mage/sets/timespiral/PsionicSliver.java | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java b/Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java new file mode 100644 index 0000000000..19442525b8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/PsionicSliver.java @@ -0,0 +1,80 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageSelfEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author anonymous + * @see mage.sets.seventhedition.RecklessEmbermage + */ +public class PsionicSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); + + public PsionicSliver(UUID ownerId) { + super(ownerId, 72, "Psionic Sliver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Sliver creatures have "{tap}: This creature deals 2 damage to target creature or player and 3 damage to itself." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); + ability.addEffect(new DamageSelfEffect(3)); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, + filter, "All Sliver creatures have \"{tap}: This creature deals 2 damage to target creature or player and 3 damage to itself.\""))); + } + + public PsionicSliver(final PsionicSliver card) { + super(card); + } + + @Override + public PsionicSliver copy() { + return new PsionicSliver(this); + } +} \ No newline at end of file From 527e05ae354e427249ecc7b4d9e130b6de064e1e Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 07:50:32 -0300 Subject: [PATCH 11/26] Mindwhip Sliver: the ability can only be casted as sorcery --- Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java b/Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java index a2a7aad4ca..56fb5c5e97 100644 --- a/Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java +++ b/Mage.Sets/src/mage/sets/tempest/MindwhipSliver.java @@ -30,7 +30,7 @@ package mage.sets.tempest; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.GenericManaCost; @@ -64,7 +64,7 @@ public class MindwhipSliver extends CardImpl { this.toughness = new MageInt(2); // All Slivers have "{2}, Sacrifice this permanent: Target player discards a card at random. Activate this ability only any time you could cast a sorcery." - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1, true), new GenericManaCost(2)); + Ability gainedAbility = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1, true), new GenericManaCost(2)); gainedAbility.addCost(new SacrificeSourceCost()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, From c6d433476b74e15c7ebbe59e14c632029a0ebce7 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 07:51:14 -0300 Subject: [PATCH 12/26] Animal Boneyard: the ability was never defined --- Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java index 24f5e1b0cb..1d5d1346d3 100644 --- a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java +++ b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java @@ -70,7 +70,7 @@ public class AnimalBoneyard extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted land has "{tap}, Sacrifice a creature: You gain life equal to that creature's toughness." - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, null, new TapSourceCost()); + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AnimalBoneyardEffect(), new TapSourceCost()); gainedAbility.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted land has \"{tap}, Sacrifice a creature: You gain life equal to that creature's toughness.\""); From 0c91d8ca72c79c3c5cefd29065a54435b163e13f Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 14:49:22 -0300 Subject: [PATCH 13/26] [TSP] Add Opaline Sliver --- .../mage/sets/timespiral/OpalineSliver.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java b/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java index abee2d9820..fe9c726c7f 100644 --- a/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java @@ -39,10 +39,12 @@ import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.FilterPermanent; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.game.stack.StackObject; import mage.target.targetpointer.FixedTarget; /** @@ -82,6 +84,8 @@ public class OpalineSliver extends CardImpl { class OpalineSliverTriggeredAbility extends TriggeredAbilityImpl { + private static final FilterSpell spellCard = new FilterSpell("a spell"); + public OpalineSliverTriggeredAbility() { super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); } @@ -95,13 +99,22 @@ class OpalineSliverTriggeredAbility extends TriggeredAbilityImpl { return new OpalineSliverTriggeredAbility(this); } + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.TARGETED; + } + @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == EventType.TARGETED && event.getTargetId().equals(this.getSourceId()) && game.getOpponents(this.controllerId).contains(event.getPlayerId())) { - getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); - return true; + StackObject spell = game.getStack().getStackObject(event.getSourceId()); + + if (spell == null) { + return false; + } else { + return event.getTargetId().equals(this.getSourceId()) + && game.getOpponents(this.controllerId).contains(event.getPlayerId()) + && spellCard.match(spell, event.getPlayerId(), game); } - return false; } @Override From c0f6eb7af355a34d0e1e2a674e97b70106230944 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 17:23:48 -0300 Subject: [PATCH 14/26] Opaline Sliver: remove unused import --- Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java b/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java index fe9c726c7f..b891c5f5c3 100644 --- a/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/OpalineSliver.java @@ -45,7 +45,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.StackObject; -import mage.target.targetpointer.FixedTarget; /** * From 8c1c073d8b0d77bb3e447ebb7d3793a04c827d47 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 17:24:08 -0300 Subject: [PATCH 15/26] [TSP] Add Watcher Sliver --- .../mage/sets/timespiral/WatcherSliver.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/WatcherSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/WatcherSliver.java b/Mage.Sets/src/mage/sets/timespiral/WatcherSliver.java new file mode 100644 index 0000000000..3fdb468b9a --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/WatcherSliver.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author anonymous + */ +public class WatcherSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); + + public WatcherSliver(UUID ownerId) { + super(ownerId, 45, "Watcher Sliver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Sliver creatures get +0/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(0, 2, Duration.WhileOnBattlefield, filter, false))); + } + + public WatcherSliver(final WatcherSliver card) { + super(card); + } + + @Override + public WatcherSliver copy() { + return new WatcherSliver(this); + } +} From f81a4534dc626e4678d3d1d14826bf796ad50039 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 19:26:24 -0300 Subject: [PATCH 16/26] [TSP] Add Ghostflame Sliver --- .../sets/timespiral/GhostflameSliver.java | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/GhostflameSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/GhostflameSliver.java b/Mage.Sets/src/mage/sets/timespiral/GhostflameSliver.java new file mode 100644 index 0000000000..7b1e4be27d --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/GhostflameSliver.java @@ -0,0 +1,104 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +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.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author anonymous + */ +public class GhostflameSliver extends CardImpl { + + public GhostflameSliver(UUID ownerId) { + super(ownerId, 239, "Ghostflame Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}{R}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Slivers are colorless. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GhostflameSliverEffect())); + } + + public GhostflameSliver(final GhostflameSliver card) { + super(card); + } + + @Override + public GhostflameSliver copy() { + return new GhostflameSliver(this); + } +} + +class GhostflameSliverEffect extends ContinuousEffectImpl { + + private static final FilterPermanent filter = new FilterPermanent("Sliver", "All Slivers"); + + private static ObjectColor colorless = new ObjectColor(); + + public GhostflameSliverEffect() { + super(Duration.WhileOnBattlefield, Layer.ColorChangingEffects_5, SubLayer.NA, Outcome.Benefit); + staticText = "All Slivers are colorless"; + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent perm : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { + if (filter.match(perm, game)) { + perm.getColor().setColor(colorless); + } + } + return true; + } + + @Override + public GhostflameSliverEffect copy() { + return new GhostflameSliverEffect(this); + } + + private GhostflameSliverEffect(final GhostflameSliverEffect effect) { + super(effect); + } +} From c467ef38421635f792d476d3ee8b6522a554d2f4 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 19:26:32 -0300 Subject: [PATCH 17/26] [TSP] Add Screeching Sliver --- .../sets/timespiral/ScreechingSliver.java | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java b/Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java new file mode 100644 index 0000000000..e38da3c8a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/ScreechingSliver.java @@ -0,0 +1,77 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.target.TargetPlayer; + +/** + * + * @author anonymous + */ +public class ScreechingSliver extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Sliver", "All Slivers"); + + public ScreechingSliver(UUID ownerId) { + super(ownerId, 75, "Screeching Sliver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // All Slivers have "{tap}: Target player puts the top card of his or her library into his or her graveyard." + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, + filter, "All Sliver creatures have \"{tap}: Target player puts the top card of his or her library into his or her graveyard.\""))); + } + + public ScreechingSliver(final ScreechingSliver card) { + super(card); + } + + @Override + public ScreechingSliver copy() { + return new ScreechingSliver(this); + } +} From 81591a03a8da439021201c14577cbc333dfe3cf5 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 19:28:24 -0300 Subject: [PATCH 18/26] Gemhide Sliver: Slivers here may not include just creatures See rules text --- Mage.Sets/src/mage/sets/timespiral/GemhideSliver.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/sets/timespiral/GemhideSliver.java b/Mage.Sets/src/mage/sets/timespiral/GemhideSliver.java index a056b3b5e3..efff47ee13 100644 --- a/Mage.Sets/src/mage/sets/timespiral/GemhideSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/GemhideSliver.java @@ -38,8 +38,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.FilterPermanent; /** * @@ -47,11 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class GemhideSliver extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); - - static { - filter.add(new SubtypePredicate("Sliver")); - } + private static final FilterPermanent filter = new FilterPermanent("Sliver", "All Slivers"); public GemhideSliver(UUID ownerId) { super(ownerId, 196, "Gemhide Sliver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); From a462e300c5eff3a6e0f934f46ed67ff35ccab690 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 19:29:04 -0300 Subject: [PATCH 19/26] Pulmonic Sliver: use constructor instead of statically adding subtype --- Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java b/Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java index 1f60d3f2c9..f68dd68f0a 100644 --- a/Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java +++ b/Mage.Sets/src/mage/sets/timespiral/PulmonicSliver.java @@ -49,14 +49,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class PulmonicSliver extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); - private static final FilterPermanent filterSlivers = new FilterPermanent("All Slivers"); - - static { - filter.add(new SubtypePredicate("Sliver")); - filterSlivers.add(new SubtypePredicate("Sliver")); - } + private static final FilterPermanent filterSlivers = new FilterPermanent("Sliver", "All Slivers"); public PulmonicSliver(UUID ownerId) { super(ownerId, 36, "Pulmonic Sliver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); From e7bc7d69f48962122f752300ea69eeb91354e18d Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 19:45:44 -0300 Subject: [PATCH 20/26] [TSP] Add Telekinetic Sliver --- .../sets/timespiral/TelekineticSliver.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java diff --git a/Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java b/Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java new file mode 100644 index 0000000000..d92e3eb48d --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/TelekineticSliver.java @@ -0,0 +1,76 @@ +/* + * 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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author anonymous + */ +public class TelekineticSliver extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Sliver", "All Slivers"); + + public TelekineticSliver(UUID ownerId) { + super(ownerId, 84, "Telekinetic Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Slivers have "{tap}: Tap target permanent." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetPermanent()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, "All Slivers have \"{tap}: Tap target permanent.\""))); + } + + public TelekineticSliver(final TelekineticSliver card) { + super(card); + } + + @Override + public TelekineticSliver copy() { + return new TelekineticSliver(this); + } +} From 43bb403c93fda1fdddc3fcfb8633f918ded844ce Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 20:22:23 -0300 Subject: [PATCH 21/26] [PLC] Add Dormant Sliver --- .../mage/sets/planarchaos/DormantSliver.java | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java diff --git a/Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java b/Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java new file mode 100644 index 0000000000..25a36803c2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java @@ -0,0 +1,80 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author anonymous + */ +public class DormantSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); + + private static final FilterPermanent filterSlivers = new FilterPermanent("Sliver", "All Slivers); + + public DormantSliver(UUID ownerId) { + super(ownerId, 156, "Dormant Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Sliver creatures have defender. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(DefenderAbility.getInstance(), Duration.WhileOnBattlefield, filter, "All Sliver creatures have defender."))); + // All Slivers have "When this permanent enters the battlefield, draw a card." + Ability ability2 = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(ability2, Duration.WhileOnBattlefield, filter, "All Slivers have \"When this permanent enters the battlefield, draw a card.\""))); + } + + public DormantSliver(final DormantSliver card) { + super(card); + } + + @Override + public DormantSliver copy() { + return new DormantSliver(this); + } +} From c2b5ab47b4f66ef204815d31c133409ece9cf28f Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 20:23:20 -0300 Subject: [PATCH 22/26] [PLC] Add Cautery Sliver --- .../mage/sets/planarchaos/CauterySliver.java | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planarchaos/CauterySliver.java diff --git a/Mage.Sets/src/mage/sets/planarchaos/CauterySliver.java b/Mage.Sets/src/mage/sets/planarchaos/CauterySliver.java new file mode 100644 index 0000000000..acd5d50ddb --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/CauterySliver.java @@ -0,0 +1,104 @@ +/* + * 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.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author anonymous + */ +public class CauterySliver extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Sliver", "All Slivers"); + + public CauterySliver(UUID ownerId) { + super(ownerId, 154, "Cautery Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}{W}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Slivers have "{1}, Sacrifice this permanent: This permanent deals 1 damage to target creature or player." + Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("1")); + ability1.addCost(new SacrificeSourceCost()); + ability1.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(ability1, Duration.WhileOnBattlefield, filter, + "All Slivers have \"{1}, Sacrifice this permanent: This permanent deals 1 damage to target creature or player.\""))); + // All Slivers have "{1}, Sacrifice this permanent: Prevent the next 1 damage that would be dealt to target Sliver creature or player this turn." + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("1")); + ability1.addCost(new SacrificeSourceCost()); + ability1.addTarget(new TargetSliverCreatureOrPlayer()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(ability2, Duration.WhileOnBattlefield, filter, + "All Slivers have \"{1}, Sacrifice this permanent: Prevent the next 1 damage that would be dealt to target Sliver creature or player this turn.\""))); + } + + public CauterySliver(final CauterySliver card) { + super(card); + } + + @Override + public CauterySliver copy() { + return new CauterySliver(this); + } +} + + +class TargetSliverCreatureOrPlayer extends TargetCreatureOrPlayer { + public TargetSliverCreatureOrPlayer(){ + super(); + filter = new FilterCreatureOrPlayerByType("Sliver", "Sliver creature or player"); + } +} + +class FilterCreatureOrPlayerByType extends FilterCreatureOrPlayer { + public FilterCreatureOrPlayerByType (String type, String name) { + super(name); + creatureFilter = new FilterCreaturePermanent(type); + } +} \ No newline at end of file From 692a743ac60864efbfea15e14dddf04fedd1b77a Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 20:25:30 -0300 Subject: [PATCH 23/26] Dormant Sliver: end quote --- Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java b/Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java index 25a36803c2..1029a0dbd1 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java +++ b/Mage.Sets/src/mage/sets/planarchaos/DormantSliver.java @@ -51,7 +51,7 @@ public class DormantSliver extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); - private static final FilterPermanent filterSlivers = new FilterPermanent("Sliver", "All Slivers); + private static final FilterPermanent filterSlivers = new FilterPermanent("Sliver", "All Slivers"); public DormantSliver(UUID ownerId) { super(ownerId, 156, "Dormant Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); From 70e866ca32909f369dea4ca494a257d45248adca Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 21:12:38 -0300 Subject: [PATCH 24/26] [PLC] Add Synchronous Sliver --- .../sets/planarchaos/SynchronousSliver.java | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planarchaos/SynchronousSliver.java diff --git a/Mage.Sets/src/mage/sets/planarchaos/SynchronousSliver.java b/Mage.Sets/src/mage/sets/planarchaos/SynchronousSliver.java new file mode 100644 index 0000000000..f9ca8de376 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/SynchronousSliver.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.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author anonymous + */ +public class SynchronousSliver extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); + + public SynchronousSliver(UUID ownerId) { + super(ownerId, 48, "Synchronous Sliver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Sliver"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // All Sliver creatures have vigilance. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter, "All Sliver creatures have vigilance."))); + } + + public SynchronousSliver(final SynchronousSliver card) { + super(card); + } + + @Override + public SynchronousSliver copy() { + return new SynchronousSliver(this); + } +} From 2facda95aaa1e95105e7c478dac16bc33be89a31 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sat, 16 May 2015 21:32:05 -0300 Subject: [PATCH 25/26] Fix typo in SourceOnBattlefieldCondition's class name --- Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java | 4 ++-- .../src/mage/sets/dissension/CytoplastManipulator.java | 4 ++-- Mage.Sets/src/mage/sets/fifthdawn/MyrServitor.java | 4 ++-- Mage.Sets/src/mage/sets/iceage/DanceOfTheDead.java | 4 ++-- Mage.Sets/src/mage/sets/limitedalpha/AnimateDead.java | 4 ++-- Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java | 6 +++--- Mage.Sets/src/mage/sets/visions/Necromancy.java | 4 ++-- ...ieldCondition.java => SourceOnBattlefieldCondition.java} | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) rename Mage/src/mage/abilities/condition/common/{SourceOnBattelfieldCondition.java => SourceOnBattlefieldCondition.java} (88%) diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java index e11c07bc38..2fb9c0dfdf 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/NekoTe.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DealsDamageToACreatureAttachedTriggeredAbility; import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; -import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect; import mage.abilities.effects.ContinuousRuleModifyingEffect; @@ -59,7 +59,7 @@ public class NekoTe extends CardImpl { // Whenever equipped creature deals damage to a creature, tap that creature. That creature doesn't untap during its controller's untap step for as long as Neko-Te remains on the battlefield. ContinuousRuleModifyingEffect skipUntapEffect = new DontUntapInControllersUntapStepTargetEffect(Duration.WhileOnBattlefield); skipUntapEffect.setText("That creature doesn't untap during its controller's untap step for as long as {this} remains on the battlefield"); - ConditionalContinuousRuleModifyingEffect effect = new ConditionalContinuousRuleModifyingEffect(skipUntapEffect, new SourceOnBattelfieldCondition()); + ConditionalContinuousRuleModifyingEffect effect = new ConditionalContinuousRuleModifyingEffect(skipUntapEffect, new SourceOnBattlefieldCondition()); Ability ability = new DealsDamageToACreatureAttachedTriggeredAbility(new TapTargetEffect("that creature"), false, "equipped creature", false, true); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/dissension/CytoplastManipulator.java b/Mage.Sets/src/mage/sets/dissension/CytoplastManipulator.java index 8020d97bc2..156ac9a514 100644 --- a/Mage.Sets/src/mage/sets/dissension/CytoplastManipulator.java +++ b/Mage.Sets/src/mage/sets/dissension/CytoplastManipulator.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalContinuousEffect; @@ -73,7 +73,7 @@ public class CytoplastManipulator extends CardImpl { // {U}, {tap}: Gain control of target creature with a +1/+1 counter on it for as long as Cytoplast Manipulator remains on the battlefield. ConditionalContinuousEffect effect = new ConditionalContinuousEffect( new GainControlTargetEffect(Duration.Custom, true), - new SourceOnBattelfieldCondition(), + new SourceOnBattlefieldCondition(), "gain control of target creature with a +1/+1 counter on it for as long as {this} remains on the battlefield"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{U}")); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/sets/fifthdawn/MyrServitor.java b/Mage.Sets/src/mage/sets/fifthdawn/MyrServitor.java index bc536e9b88..f284a356e4 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/MyrServitor.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/MyrServitor.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -63,7 +63,7 @@ public class MyrServitor extends CardImpl { // At the beginning of your upkeep, if Myr Servitor is on the battlefield, each player returns all cards named Myr Servitor from his or her graveyard to the battlefield. this.addAbility(new ConditionalTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new MyrServitorReturnEffect(), TargetController.YOU, false), - SourceOnBattelfieldCondition.getInstance(), + SourceOnBattlefieldCondition.getInstance(), "At the beginning of your upkeep, if {this} is on the battlefield, each player returns all cards named Myr Servitor from his or her graveyard to the battlefield" )); diff --git a/Mage.Sets/src/mage/sets/iceage/DanceOfTheDead.java b/Mage.Sets/src/mage/sets/iceage/DanceOfTheDead.java index f7bff5c9f8..603de287e5 100644 --- a/Mage.Sets/src/mage/sets/iceage/DanceOfTheDead.java +++ b/Mage.Sets/src/mage/sets/iceage/DanceOfTheDead.java @@ -35,7 +35,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.ContinuousEffectImpl; @@ -89,7 +89,7 @@ public class DanceOfTheDead extends CardImpl { // When Dance of the Dead enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard" and gains "enchant creature put onto the battlefield with Dance of the Dead." Put enchanted creature card to the battlefield tapped under your control and attach Dance of the Dead to it. When Dance of the Dead leaves the battlefield, that creature's controller sacrifices it. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DanceOfTheDeadReAttachEffect(), false), - SourceOnBattelfieldCondition.getInstance(), + SourceOnBattlefieldCondition.getInstance(), "When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it."); ability.addEffect(new DanceOfTheDeadChangeAbilityEffect()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/limitedalpha/AnimateDead.java b/Mage.Sets/src/mage/sets/limitedalpha/AnimateDead.java index f964e0ca38..c868a3738d 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/AnimateDead.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/AnimateDead.java @@ -33,7 +33,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; @@ -83,7 +83,7 @@ public class AnimateDead extends CardImpl { // under your control and attach Animate Dead to it. When Animate Dead leaves the battlefield, that creature's controller sacrifices it. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new AnimateDeadReAttachEffect(), false), - SourceOnBattelfieldCondition.getInstance(), + SourceOnBattlefieldCondition.getInstance(), "When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it."); ability.addEffect(new AnimateDeadChangeAbilityEffect()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java b/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java index a6f35a6c4d..b31c6761bf 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java +++ b/Mage.Sets/src/mage/sets/lorwyn/SowerOfTemptation.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; @@ -66,7 +66,7 @@ public class SowerOfTemptation extends CardImpl { // remains on the battlefield, even if a different player gains control of Sower of Temptation itself. ConditionalContinuousEffect effect = new ConditionalContinuousEffect( new GainControlTargetEffect(Duration.Custom, true), - new SourceOnBattelfieldCondition(), + new SourceOnBattlefieldCondition(), "gain control of target creature for as long as {this} remains on the battlefield"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); ability.addTarget(new TargetCreaturePermanent()); @@ -104,7 +104,7 @@ class SowerOfTemptationGainControlEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { ConditionalContinuousEffect effect = new ConditionalContinuousEffect( new GainControlTargetEffect(Duration.Custom), - new SourceOnBattelfieldCondition(), + new SourceOnBattlefieldCondition(), "gain control of target creature for as long as {this} remains on the battlefield"); game.addEffect(effect, source); return false; diff --git a/Mage.Sets/src/mage/sets/visions/Necromancy.java b/Mage.Sets/src/mage/sets/visions/Necromancy.java index 35c1c5ffc0..1bab39b2ee 100644 --- a/Mage.Sets/src/mage/sets/visions/Necromancy.java +++ b/Mage.Sets/src/mage/sets/visions/Necromancy.java @@ -35,7 +35,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.delayed.AtTheBeginOfNextCleanupDelayedTriggeredAbility; -import mage.abilities.condition.common.SourceOnBattelfieldCondition; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.ContinuousEffectImpl; @@ -87,7 +87,7 @@ public class Necromancy extends CardImpl { // When Necromancy leaves the battlefield, that creature's controller sacrifices it. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new NecromancyReAttachEffect(), false), - SourceOnBattelfieldCondition.getInstance(), + SourceOnBattlefieldCondition.getInstance(), "When {this} enters the battlefield, if it's on the battlefield, it becomes an Aura with \"enchant creature put onto the battlefield with {this}.\" Put target creature card from a graveyard onto the battlefield under your control and attach {this} to it."); ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard"))); this.addAbility(ability); diff --git a/Mage/src/mage/abilities/condition/common/SourceOnBattelfieldCondition.java b/Mage/src/mage/abilities/condition/common/SourceOnBattlefieldCondition.java similarity index 88% rename from Mage/src/mage/abilities/condition/common/SourceOnBattelfieldCondition.java rename to Mage/src/mage/abilities/condition/common/SourceOnBattlefieldCondition.java index c3fe73771b..5c7acd33f0 100644 --- a/Mage/src/mage/abilities/condition/common/SourceOnBattelfieldCondition.java +++ b/Mage/src/mage/abilities/condition/common/SourceOnBattlefieldCondition.java @@ -38,11 +38,11 @@ import mage.game.Game; * * @author LevelX2 */ -public class SourceOnBattelfieldCondition implements Condition { +public class SourceOnBattlefieldCondition implements Condition { - private static final SourceOnBattelfieldCondition fInstance = new SourceOnBattelfieldCondition(); + private static final SourceOnBattlefieldCondition fInstance = new SourceOnBattlefieldCondition(); - public static SourceOnBattelfieldCondition getInstance() { + public static SourceOnBattlefieldCondition getInstance() { return fInstance; } From 262822dfcbfc930965071dd73aeb3108c54e8b90 Mon Sep 17 00:00:00 2001 From: Luna Skyrise Date: Sun, 17 May 2015 11:49:03 -0300 Subject: [PATCH 26/26] [PLC] Add Frenetic Sliver --- .../mage/sets/planarchaos/FreneticSliver.java | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/planarchaos/FreneticSliver.java diff --git a/Mage.Sets/src/mage/sets/planarchaos/FreneticSliver.java b/Mage.Sets/src/mage/sets/planarchaos/FreneticSliver.java new file mode 100644 index 0000000000..4098b0f065 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/FreneticSliver.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.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.condition.common.SourceOnBattlefieldCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author anonymous + */ +public class FreneticSliver extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Sliver", "All Slivers"); + + public FreneticSliver(UUID ownerId) { + super(ownerId, 157, "Frenetic Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Sliver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // All Slivers have "{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it." + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new FreneticSliverEffect(), new ManaCostsImpl("{0}"), SourceOnBattlefieldCondition.getInstance(), "{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it."); + + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, "All Slivers have \"{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it.\""))); + } + + public FreneticSliver(final FreneticSliver card) { + super(card); + } + + @Override + public FreneticSliver copy() { + return new FreneticSliver(this); + } +} + +class FreneticSliverEffect extends OneShotEffect { + + public FreneticSliverEffect() { + super(Outcome.Neutral); + staticText = "Flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it"; + } + + public FreneticSliverEffect(final FreneticSliverEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + if (player.flipCoin(game)) { + Permanent perm = game.getPermanent(source.getSourceId()); + if (perm != null) { + UUID exileZoneId = UUID.randomUUID(); + perm.moveToExile(exileZoneId, perm.getName(), source.getSourceId(), game); + // and return it to the battlefield under its owner's control at the beginning of the next end step. + AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility( + new ReturnFromExileEffect(exileZoneId, Zone.BATTLEFIELD)); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + return true; + } else { + Permanent perm = game.getPermanent(source.getSourceId()); + if (perm != null) { + perm.sacrifice(source.getSourceId(), game); + } + return true; + } + } + return false; + } + + @Override + public FreneticSliverEffect copy() { + return new FreneticSliverEffect(this); + } +}