Added various Thallid cards, added Scrabbling Claws, minor fix to Jace Beleren (MBP), fix for Soulflayer not gaining indestructible

This commit is contained in:
fireshoes 2015-01-23 03:04:27 -06:00
parent f1c78784f7
commit fd6edc8987
10 changed files with 935 additions and 200 deletions

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -1,179 +1,183 @@
/* /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, are * Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met: * permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this list of * 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer. * conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this list * 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 * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution. * provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * 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 * 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 * 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 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * 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 * 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 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* The views and conclusions contained in the software and documentation are those of the * 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 * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.sets.fatereforged; package mage.sets.fatereforged;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.continious.SourceEffect; import mage.abilities.effects.common.continious.SourceEffect;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.DelveAbility; import mage.abilities.keyword.DelveAbility;
import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.HexproofAbility; import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.ReachAbility; import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.ReachAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.Card; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.Card;
import mage.constants.CardType; import mage.cards.CardImpl;
import mage.constants.Duration; import mage.constants.CardType;
import mage.constants.Layer; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Layer;
import mage.constants.Rarity; import mage.constants.Outcome;
import mage.constants.SubLayer; import mage.constants.Rarity;
import mage.constants.Zone; import mage.constants.SubLayer;
import mage.game.Game; import mage.constants.Zone;
import mage.game.permanent.Permanent; import mage.game.Game;
import mage.game.permanent.Permanent;
/**
* /**
* @author LevelX2 *
*/ * @author LevelX2
public class Soulflayer extends CardImpl { */
public class Soulflayer extends CardImpl {
public Soulflayer(UUID ownerId) {
super(ownerId, 84, "Soulflayer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); public Soulflayer(UUID ownerId) {
this.expansionSetCode = "FRF"; super(ownerId, 84, "Soulflayer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
this.subtype.add("Demon"); this.expansionSetCode = "FRF";
this.power = new MageInt(4); this.subtype.add("Demon");
this.toughness = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Delve
this.addAbility(new DelveAbility()); // 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())); // 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); public Soulflayer(final Soulflayer card) {
} super(card);
}
@Override
public Soulflayer copy() { @Override
return new Soulflayer(this); public Soulflayer copy() {
} return new Soulflayer(this);
} }
}
class SoulflayerEffect extends ContinuousEffectImpl implements SourceEffect {
class SoulflayerEffect extends ContinuousEffectImpl implements SourceEffect {
private Set<Ability> abilitiesToAdd;
private Set<Ability> abilitiesToAdd;
public SoulflayerEffect() {
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); public SoulflayerEffect() {
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"; super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
abilitiesToAdd = null; 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); public SoulflayerEffect(final SoulflayerEffect effect) {
if (effect.abilitiesToAdd != null) { super(effect);
this.abilitiesToAdd = new HashSet<>(); if (effect.abilitiesToAdd != null) {
this.abilitiesToAdd.addAll(effect.abilitiesToAdd); this.abilitiesToAdd = new HashSet<>();
} this.abilitiesToAdd.addAll(effect.abilitiesToAdd);
} }
}
@Override
public SoulflayerEffect copy() { @Override
return new SoulflayerEffect(this); public SoulflayerEffect copy() {
} return new SoulflayerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) { @Override
Permanent permanent = game.getPermanent(source.getSourceId()); public boolean apply(Game game, Ability source) {
if (permanent != null) { Permanent permanent = game.getPermanent(source.getSourceId());
if (abilitiesToAdd == null) { if (permanent != null) {
for (Ability ability :permanent.getAbilities()) { if (abilitiesToAdd == null) {
if (ability instanceof DelveAbility) { for (Ability ability :permanent.getAbilities()) {
List<Card> delvedCards = ((DelveAbility) ability).getDelvedCards(); if (ability instanceof DelveAbility) {
abilitiesToAdd = new HashSet<>(); List<Card> delvedCards = ((DelveAbility) ability).getDelvedCards();
if (delvedCards != null) { abilitiesToAdd = new HashSet<>();
for(Card card: delvedCards) { if (delvedCards != null) {
if (!card.getCardType().contains(CardType.CREATURE)) { for(Card card: delvedCards) {
continue; if (!card.getCardType().contains(CardType.CREATURE)) {
} continue;
for (Ability cardAbility: card.getAbilities()) { }
if (cardAbility instanceof FlyingAbility) { for (Ability cardAbility: card.getAbilities()) {
abilitiesToAdd.add(FlyingAbility.getInstance()); if (cardAbility instanceof FlyingAbility) {
} abilitiesToAdd.add(FlyingAbility.getInstance());
if (cardAbility instanceof FirstStrikeAbility) { }
abilitiesToAdd.add(FirstStrikeAbility.getInstance()); if (cardAbility instanceof FirstStrikeAbility) {
} abilitiesToAdd.add(FirstStrikeAbility.getInstance());
if (cardAbility instanceof DoubleStrikeAbility) { }
abilitiesToAdd.add(DoubleStrikeAbility.getInstance()); if (cardAbility instanceof DoubleStrikeAbility) {
} abilitiesToAdd.add(DoubleStrikeAbility.getInstance());
if (cardAbility instanceof DeathtouchAbility) { }
abilitiesToAdd.add(DeathtouchAbility.getInstance()); if (cardAbility instanceof DeathtouchAbility) {
} abilitiesToAdd.add(DeathtouchAbility.getInstance());
if (cardAbility instanceof HasteAbility) { }
abilitiesToAdd.add(HasteAbility.getInstance()); if (cardAbility instanceof HasteAbility) {
} abilitiesToAdd.add(HasteAbility.getInstance());
if (cardAbility instanceof HexproofAbility) { }
abilitiesToAdd.add(HexproofAbility.getInstance()); if (cardAbility instanceof HexproofAbility) {
} abilitiesToAdd.add(HexproofAbility.getInstance());
if (cardAbility instanceof LifelinkAbility) { }
abilitiesToAdd.add(LifelinkAbility.getInstance()); if (cardAbility instanceof IndestructibleAbility) {
} abilitiesToAdd.add(IndestructibleAbility.getInstance());
if (cardAbility instanceof ReachAbility) { }
abilitiesToAdd.add(ReachAbility.getInstance()); if (cardAbility instanceof LifelinkAbility) {
} abilitiesToAdd.add(LifelinkAbility.getInstance());
if (cardAbility instanceof TrampleAbility) { }
abilitiesToAdd.add(TrampleAbility.getInstance()); if (cardAbility instanceof ReachAbility) {
} abilitiesToAdd.add(ReachAbility.getInstance());
if (cardAbility instanceof VigilanceAbility) { }
abilitiesToAdd.add(VigilanceAbility.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 { for (Ability ability: abilitiesToAdd) {
if (abilitiesToAdd != null) { permanent.addAbility(ability, source.getSourceId(), game);
abilitiesToAdd = null; }
} return true;
} } else {
return false; if (abilitiesToAdd != null) {
} abilitiesToAdd = null;
} }
}
return false;
}
}

View file

@ -1,21 +1,21 @@
package mage.sets.mediainserts; package mage.sets.mediainserts;
import java.util.UUID; import java.util.UUID;
public class JaceBeleren extends mage.sets.lorwyn.JaceBeleren { public class JaceBeleren extends mage.sets.lorwyn.JaceBeleren {
public JaceBeleren(UUID ownerId) { public JaceBeleren(UUID ownerId) {
super(ownerId); super(ownerId);
this.cardNumber = 15; this.cardNumber = 15;
this.expansionSetCode = "MPB"; this.expansionSetCode = "MBP";
} }
public JaceBeleren(final JaceBeleren card) { public JaceBeleren(final JaceBeleren card) {
super(card); super(card);
} }
@Override @Override
public JaceBeleren copy() { public JaceBeleren copy() {
return new JaceBeleren(this); return new JaceBeleren(this);
} }
} }

View file

@ -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;
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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);
}
}