diff --git a/Mage.Sets/src/mage/sets/fallenempires/FeralThallid.java b/Mage.Sets/src/mage/sets/fallenempires/FeralThallid.java new file mode 100644 index 0000000000..10030eec87 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/FeralThallid.java @@ -0,0 +1,71 @@ +/* + * 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.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author fireshoes + */ +public class FeralThallid extends CardImpl { + + public FeralThallid(UUID ownerId) { + super(ownerId, 78, "Feral Thallid", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}{G}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Fungus"); + this.power = new MageInt(6); + this.toughness = new MageInt(3); + + // At the beginning of your upkeep, put a spore counter on Feral Thallid. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Feral Thallid: Regenerate Feral Thallid. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + } + + public FeralThallid(final FeralThallid card) { + super(card); + } + + @Override + public FeralThallid copy() { + return new FeralThallid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ThallidDevourer.java b/Mage.Sets/src/mage/sets/fallenempires/ThallidDevourer.java new file mode 100644 index 0000000000..7530f3f252 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ThallidDevourer.java @@ -0,0 +1,89 @@ +/* + * 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.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ThallidDevourer extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling"); + static { + filter.add(new SubtypePredicate("Saproling")); + } + + public ThallidDevourer(UUID ownerId) { + super(ownerId, 91, "Thallid Devourer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Fungus"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // At the beginning of your upkeep, put a spore counter on Thallid Devourer. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Thallid Devourer: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new CreateTokenEffect(new SaprolingToken()), + new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + // Sacrifice a Saproling: Thallid Devourer gets +1/+2 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostSourceEffect(1, 2, Duration.EndOfTurn), + new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false)))); + } + + public ThallidDevourer(final ThallidDevourer card) { + super(card); + } + + @Override + public ThallidDevourer copy() { + return new ThallidDevourer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ThornThallid.java b/Mage.Sets/src/mage/sets/fallenempires/ThornThallid.java new file mode 100644 index 0000000000..61a0094efe --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ThornThallid.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.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author fireshoes + */ +public class ThornThallid extends CardImpl { + + public ThornThallid(UUID ownerId) { + super(ownerId, 96, "Thorn Thallid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Fungus"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // At the beginning of your upkeep, put a spore counter on Thorn Thallid. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Thorn Thallid: Thorn Thallid deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(1), + new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3))); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public ThornThallid(final ThornThallid card) { + super(card); + } + + @Override + public ThornThallid copy() { + return new ThornThallid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/Soulflayer.java b/Mage.Sets/src/mage/sets/fatereforged/Soulflayer.java index aede5ed825..670450071a 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/Soulflayer.java +++ b/Mage.Sets/src/mage/sets/fatereforged/Soulflayer.java @@ -1,179 +1,183 @@ -/* - * 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.fatereforged; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.common.continious.SourceEffect; -import mage.abilities.keyword.DeathtouchAbility; -import mage.abilities.keyword.DelveAbility; -import mage.abilities.keyword.DoubleStrikeAbility; -import mage.abilities.keyword.FirstStrikeAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.HexproofAbility; -import mage.abilities.keyword.LifelinkAbility; -import mage.abilities.keyword.ReachAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.abilities.keyword.VigilanceAbility; -import mage.cards.Card; -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.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author LevelX2 - */ -public class Soulflayer extends CardImpl { - - public Soulflayer(UUID ownerId) { - super(ownerId, 84, "Soulflayer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); - this.expansionSetCode = "FRF"; - this.subtype.add("Demon"); - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // Delve - this.addAbility(new DelveAbility()); - - // If a creature card with flying was exiled with Soulflayer's delve ability, Soulflayer has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, reach, trample, and vigilance. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SoulflayerEffect())); - - } - - public Soulflayer(final Soulflayer card) { - super(card); - } - - @Override - public Soulflayer copy() { - return new Soulflayer(this); - } -} - - -class SoulflayerEffect extends ContinuousEffectImpl implements SourceEffect { - - private Set abilitiesToAdd; - - public SoulflayerEffect() { - super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); - staticText = "If a creature card with flying was exiled with Soulflayer's delve ability, Soulflayer has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, reach, trample, and vigilance"; - abilitiesToAdd = null; - } - - public SoulflayerEffect(final SoulflayerEffect effect) { - super(effect); - if (effect.abilitiesToAdd != null) { - this.abilitiesToAdd = new HashSet<>(); - this.abilitiesToAdd.addAll(effect.abilitiesToAdd); - } - } - - @Override - public SoulflayerEffect copy() { - return new SoulflayerEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - if (abilitiesToAdd == null) { - for (Ability ability :permanent.getAbilities()) { - if (ability instanceof DelveAbility) { - List delvedCards = ((DelveAbility) ability).getDelvedCards(); - abilitiesToAdd = new HashSet<>(); - if (delvedCards != null) { - for(Card card: delvedCards) { - if (!card.getCardType().contains(CardType.CREATURE)) { - continue; - } - for (Ability cardAbility: card.getAbilities()) { - if (cardAbility instanceof FlyingAbility) { - abilitiesToAdd.add(FlyingAbility.getInstance()); - } - if (cardAbility instanceof FirstStrikeAbility) { - abilitiesToAdd.add(FirstStrikeAbility.getInstance()); - } - if (cardAbility instanceof DoubleStrikeAbility) { - abilitiesToAdd.add(DoubleStrikeAbility.getInstance()); - } - if (cardAbility instanceof DeathtouchAbility) { - abilitiesToAdd.add(DeathtouchAbility.getInstance()); - } - if (cardAbility instanceof HasteAbility) { - abilitiesToAdd.add(HasteAbility.getInstance()); - } - if (cardAbility instanceof HexproofAbility) { - abilitiesToAdd.add(HexproofAbility.getInstance()); - } - if (cardAbility instanceof LifelinkAbility) { - abilitiesToAdd.add(LifelinkAbility.getInstance()); - } - if (cardAbility instanceof ReachAbility) { - abilitiesToAdd.add(ReachAbility.getInstance()); - } - if (cardAbility instanceof TrampleAbility) { - abilitiesToAdd.add(TrampleAbility.getInstance()); - } - if (cardAbility instanceof VigilanceAbility) { - abilitiesToAdd.add(VigilanceAbility.getInstance()); - } - } - } - } - } - } - } - for (Ability ability: abilitiesToAdd) { - permanent.addAbility(ability, source.getSourceId(), game); - } - return true; - } else { - if (abilitiesToAdd != null) { - abilitiesToAdd = null; - } - } - return false; - } -} +/* + * 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.fatereforged; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continious.SourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.DelveAbility; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.abilities.keyword.ReachAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.Card; +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.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class Soulflayer extends CardImpl { + + public Soulflayer(UUID ownerId) { + super(ownerId, 84, "Soulflayer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Demon"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Delve + this.addAbility(new DelveAbility()); + + // If a creature card with flying was exiled with Soulflayer's delve ability, Soulflayer has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, reach, trample, and vigilance. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SoulflayerEffect())); + + } + + public Soulflayer(final Soulflayer card) { + super(card); + } + + @Override + public Soulflayer copy() { + return new Soulflayer(this); + } +} + + +class SoulflayerEffect extends ContinuousEffectImpl implements SourceEffect { + + private Set abilitiesToAdd; + + public SoulflayerEffect() { + super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); + staticText = "If a creature card with flying was exiled with Soulflayer's delve ability, Soulflayer has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, reach, trample, and vigilance"; + abilitiesToAdd = null; + } + + public SoulflayerEffect(final SoulflayerEffect effect) { + super(effect); + if (effect.abilitiesToAdd != null) { + this.abilitiesToAdd = new HashSet<>(); + this.abilitiesToAdd.addAll(effect.abilitiesToAdd); + } + } + + @Override + public SoulflayerEffect copy() { + return new SoulflayerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + if (abilitiesToAdd == null) { + for (Ability ability :permanent.getAbilities()) { + if (ability instanceof DelveAbility) { + List delvedCards = ((DelveAbility) ability).getDelvedCards(); + abilitiesToAdd = new HashSet<>(); + if (delvedCards != null) { + for(Card card: delvedCards) { + if (!card.getCardType().contains(CardType.CREATURE)) { + continue; + } + for (Ability cardAbility: card.getAbilities()) { + if (cardAbility instanceof FlyingAbility) { + abilitiesToAdd.add(FlyingAbility.getInstance()); + } + if (cardAbility instanceof FirstStrikeAbility) { + abilitiesToAdd.add(FirstStrikeAbility.getInstance()); + } + if (cardAbility instanceof DoubleStrikeAbility) { + abilitiesToAdd.add(DoubleStrikeAbility.getInstance()); + } + if (cardAbility instanceof DeathtouchAbility) { + abilitiesToAdd.add(DeathtouchAbility.getInstance()); + } + if (cardAbility instanceof HasteAbility) { + abilitiesToAdd.add(HasteAbility.getInstance()); + } + if (cardAbility instanceof HexproofAbility) { + abilitiesToAdd.add(HexproofAbility.getInstance()); + } + if (cardAbility instanceof IndestructibleAbility) { + abilitiesToAdd.add(IndestructibleAbility.getInstance()); + } + if (cardAbility instanceof LifelinkAbility) { + abilitiesToAdd.add(LifelinkAbility.getInstance()); + } + if (cardAbility instanceof ReachAbility) { + abilitiesToAdd.add(ReachAbility.getInstance()); + } + if (cardAbility instanceof TrampleAbility) { + abilitiesToAdd.add(TrampleAbility.getInstance()); + } + if (cardAbility instanceof VigilanceAbility) { + abilitiesToAdd.add(VigilanceAbility.getInstance()); + } + } + } + } + } + } + } + for (Ability ability: abilitiesToAdd) { + permanent.addAbility(ability, source.getSourceId(), game); + } + return true; + } else { + if (abilitiesToAdd != null) { + abilitiesToAdd = null; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/mediainserts/JaceBeleren.java b/Mage.Sets/src/mage/sets/mediainserts/JaceBeleren.java index 537ca09ffe..26f2ae2b4b 100644 --- a/Mage.Sets/src/mage/sets/mediainserts/JaceBeleren.java +++ b/Mage.Sets/src/mage/sets/mediainserts/JaceBeleren.java @@ -1,21 +1,21 @@ -package mage.sets.mediainserts; - -import java.util.UUID; - -public class JaceBeleren extends mage.sets.lorwyn.JaceBeleren { - - public JaceBeleren(UUID ownerId) { - super(ownerId); - this.cardNumber = 15; - this.expansionSetCode = "MPB"; - } - - public JaceBeleren(final JaceBeleren card) { - super(card); - } - - @Override - public JaceBeleren copy() { - return new JaceBeleren(this); - } -} +package mage.sets.mediainserts; + +import java.util.UUID; + +public class JaceBeleren extends mage.sets.lorwyn.JaceBeleren { + + public JaceBeleren(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "MBP"; + } + + public JaceBeleren(final JaceBeleren card) { + super(card); + } + + @Override + public JaceBeleren copy() { + return new JaceBeleren(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/ScrabblingClaws.java b/Mage.Sets/src/mage/sets/mirrodin/ScrabblingClaws.java new file mode 100644 index 0000000000..06f9416b23 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/ScrabblingClaws.java @@ -0,0 +1,116 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.other.OwnerIdPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author fireshoes + */ +public class ScrabblingClaws extends CardImpl { + + public ScrabblingClaws(UUID ownerId) { + super(ownerId, 237, "Scrabbling Claws", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "MRD"; + + // {tap}: Target player exiles a card from his or her graveyard. + Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScrabblingClawsEffect(), new TapSourceCost()); + firstAbility.addTarget(new TargetPlayer()); + this.addAbility(firstAbility); + // {1}, Sacrifice Scrabbling Claws: Exile target card from a graveyard. Draw a card. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new mage.abilities.effects.common.ExileTargetEffect(), new SacrificeSourceCost()); + ability.addCost(new GenericManaCost(1)); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + ability.addEffect(new DrawCardSourceControllerEffect(1)); + } + + public ScrabblingClaws(final ScrabblingClaws card) { + super(card); + } + + @Override + public ScrabblingClaws copy() { + return new ScrabblingClaws(this); + } +} + +class ScrabblingClawsEffect extends OneShotEffect { + + public ScrabblingClawsEffect() { + super(Outcome.Exile); + this.staticText = "Target player exiles a card from his or her graveyard"; + } + + public ScrabblingClawsEffect(final ScrabblingClawsEffect effect) { + super(effect); + } + + @Override + public ScrabblingClawsEffect copy() { + return new ScrabblingClawsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + if (targetPlayer != null) { + FilterCard filter = new FilterCard("card from your graveyard"); + filter.add(new OwnerIdPredicate(targetPlayer.getId())); + TargetCardInGraveyard target = new TargetCardInGraveyard(filter); + if (targetPlayer.chooseTarget(Outcome.Exile, target, source, game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + targetPlayer.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD); + } + return true; + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/planarchaos/PsychotropeThallid.java b/Mage.Sets/src/mage/sets/planarchaos/PsychotropeThallid.java new file mode 100644 index 0000000000..19002bc550 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/PsychotropeThallid.java @@ -0,0 +1,92 @@ +/* + * 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.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class PsychotropeThallid extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling"); + static { + filter.add(new SubtypePredicate("Saproling")); + } + + public PsychotropeThallid(UUID ownerId) { + super(ownerId, 137, "Psychotrope Thallid", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Fungus"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, put a spore counter on Psychotrope Thallid. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Psychotrope Thallid: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new CreateTokenEffect(new SaprolingToken()), + new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + // {1}, Sacrifice a Saproling: Draw a card. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DrawCardSourceControllerEffect(1), + new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false))); + ability.addCost(new GenericManaCost(1)); + this.addAbility(ability); + } + + public PsychotropeThallid(final PsychotropeThallid card) { + super(card); + } + + @Override + public PsychotropeThallid copy() { + return new PsychotropeThallid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/VitasporeThallid.java b/Mage.Sets/src/mage/sets/planarchaos/VitasporeThallid.java new file mode 100644 index 0000000000..5ce33f3fc6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/VitasporeThallid.java @@ -0,0 +1,94 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class VitasporeThallid extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling"); + static { + filter.add(new SubtypePredicate("Saproling")); + } + + public VitasporeThallid(UUID ownerId) { + super(ownerId, 143, "Vitaspore Thallid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Fungus"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, put a spore counter on Vitaspore Thallid. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Vitaspore Thallid: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new CreateTokenEffect(new SaprolingToken()), + new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + // Sacrifice a Saproling: Target creature gains haste until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), + new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public VitasporeThallid(final VitasporeThallid card) { + super(card); + } + + @Override + public VitasporeThallid copy() { + return new VitasporeThallid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/DeathsporeThallid.java b/Mage.Sets/src/mage/sets/timespiral/DeathsporeThallid.java new file mode 100644 index 0000000000..06886e96ea --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/DeathsporeThallid.java @@ -0,0 +1,94 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class DeathsporeThallid extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling"); + static { + filter.add(new SubtypePredicate("Saproling")); + } + + public DeathsporeThallid(UUID ownerId) { + super(ownerId, 102, "Deathspore Thallid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Zombie"); + this.subtype.add("Fungus"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, put a spore counter on Deathspore Thallid. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Deathspore Thallid: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new CreateTokenEffect(new SaprolingToken()), + new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + // Sacrifice a Saproling: Target creature gets -1/-1 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(-1,-1, Duration.EndOfTurn), + new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public DeathsporeThallid(final DeathsporeThallid card) { + super(card); + } + + @Override + public DeathsporeThallid copy() { + return new DeathsporeThallid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/SavageThallid.java b/Mage.Sets/src/mage/sets/timespiral/SavageThallid.java new file mode 100644 index 0000000000..3c33e4408b --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/SavageThallid.java @@ -0,0 +1,98 @@ +/* + * 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.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.RegenerateTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class SavageThallid extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Fungus"); + + static { + filter.add(new SubtypePredicate("Fungus")); + } + + private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("Saproling"); + + static { + filter2.add(new SubtypePredicate("Saproling")); + } + + public SavageThallid(UUID ownerId) { + super(ownerId, 213, "Savage Thallid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Fungus"); + this.power = new MageInt(5); + this.toughness = new MageInt(2); + + // At the beginning of your upkeep, put a spore counter on Savage Thallid. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Savage Thallid: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + // Sacrifice a Saproling: Regenerate target Fungus. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new RegenerateTargetEffect(), + new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter2, false))); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public SavageThallid(final SavageThallid card) { + super(card); + } + + @Override + public SavageThallid copy() { + return new SavageThallid(this); + } +}