Merge pull request #1437 from LoneFox78/master

Cards from Judgment + fixes
This commit is contained in:
LevelX2 2016-01-02 10:00:01 +01:00
commit 75305a133e
67 changed files with 1480 additions and 382 deletions

View file

@ -35,10 +35,10 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -58,12 +58,10 @@ public class NantukoMonastery extends CardImpl {
// {tap}: Add {C} to your mana pool.
this.addAbility(new ColorlessManaAbility());
// Threshold - {G}{W}: Nantuko Monastery becomes a 4/4 green and white Insect Monk creature with first strike until end of turn. It's still a land. Activate this ability only if seven or more cards are in your graveyard.
Effect effect = new BecomesCreatureSourceEffect(new NantukoMonasteryToken(), "land", Duration.Custom);
effect.setText("{this} becomes a 4/4 green and white Insect Monk creature");
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{G}{W}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {G}{W}: Nantuko Monastery becomes a 4/4 green and white Insect Monk creature with first strike until end of turn. It's still a land. Activate this ability only if seven or more cards are in your graveyard.");
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
new NantukoMonasteryToken(), "land", Duration.EndOfTurn), new ManaCostsImpl<>("{G}{W}"),
new CardsInControllerGraveCondition(7));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
@ -80,7 +78,7 @@ public class NantukoMonastery extends CardImpl {
class NantukoMonasteryToken extends Token {
public NantukoMonasteryToken() {
super("", "4/4 green and white Insect Monk creature");
super("", "4/4 green and white Insect Monk creature with first strike");
cardType.add(CardType.CREATURE);
subtype.add("Insect");
subtype.add("Monk");
@ -88,5 +86,6 @@ class NantukoMonasteryToken extends Token {
color.setWhite(true);
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(FirstStrikeAbility.getInstance());
}
}

View file

@ -65,7 +65,9 @@ public class GruesomeSlaughter extends CardImpl {
effect.setText("{this} deals damage equal to its power to target creature.");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn, filter));
effect = new GainAbilityControlledEffect(ability, Duration.EndOfTurn, filter);
effect.setText("Until end of turn, colorless creatures you control gain \"{T}: This creature deals damage equal to its power to target creature.\"");
this.getSpellAbility().addEffect(effect);
}
public GruesomeSlaughter(final GruesomeSlaughter card) {

View file

@ -28,10 +28,11 @@
package mage.sets.conflux;
import java.util.UUID;
import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility;
import mage.abilities.mana.AnyColorLandsProduceManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
/**
*
@ -44,7 +45,7 @@ public class ExoticOrchard extends CardImpl {
this.expansionSetCode = "CON";
// {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
this.addAbility(new AnyColorOpponentLandsProduceManaAbility());
this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT));
}
public ExoticOrchard(final ExoticOrchard card) {

View file

@ -29,10 +29,11 @@ package mage.sets.fifthdawn;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility;
import mage.abilities.mana.AnyColorLandsProduceManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
/**
*
@ -50,7 +51,7 @@ public class SylvokExplorer extends CardImpl {
this.toughness = new MageInt(1);
// {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
this.addAbility(new AnyColorOpponentLandsProduceManaAbility());
this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT));
}
public SylvokExplorer(final SylvokExplorer card) {

View file

@ -0,0 +1,70 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.judgment;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LoneFox
*/
public class AnuridSwarmsnapper extends CardImpl {
public AnuridSwarmsnapper(UUID ownerId) {
super(ownerId, 105, "Anurid Swarmsnapper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.expansionSetCode = "JUD";
this.subtype.add("Frog");
this.subtype.add("Beast");
this.power = new MageInt(1);
this.toughness = new MageInt(4);
// Reach
this.addAbility(ReachAbility.getInstance());
// {1}{G}: Anurid Swarmsnapper can block an additional creature this turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("{1}{G}")));
}
public AnuridSwarmsnapper(final AnuridSwarmsnapper card) {
super(card);
}
@Override
public AnuridSwarmsnapper copy() {
return new AnuridSwarmsnapper(this);
}
}

View file

@ -0,0 +1,68 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.judgment;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect;
import mage.abilities.keyword.FlashbackAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TimingRule;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LoneFox
*/
public class CanopyClaws extends CardImpl {
public CanopyClaws(UUID ownerId) {
super(ownerId, 108, "Canopy Claws", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
this.expansionSetCode = "JUD";
// Target creature loses flying until end of turn.
this.getSpellAbility().addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Flashback {G}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
}
public CanopyClaws(final CanopyClaws card) {
super(card);
}
@Override
public CanopyClaws copy() {
return new CanopyClaws(this);
}
}

View file

@ -0,0 +1,67 @@
/*
* 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.judgment;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FlashbackAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TimingRule;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LoneFox
*/
public class DefyGravity extends CardImpl {
public DefyGravity(UUID ownerId) {
super(ownerId, 38, "Defy Gravity", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}");
this.expansionSetCode = "JUD";
// Target creature gains flying until end of turn.
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Flashback {U}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{U}"), TimingRule.INSTANT));
}
public DefyGravity(final DefyGravity card) {
super(card);
}
@Override
public DefyGravity copy() {
return new DefyGravity(this);
}
}

View file

@ -0,0 +1,80 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.judgment;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LoneFox
*/
public class ExoskeletalArmor extends CardImpl {
public ExoskeletalArmor(UUID ownerId) {
super(ownerId, 114, "Exoskeletal Armor", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
this.expansionSetCode = "JUD";
this.subtype.add("Aura");
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards.
CardsInAllGraveyardsCount count = new CardsInAllGraveyardsCount(new FilterCreatureCard());
Effect effect = new BoostEnchantedEffect(count, count, Duration.WhileOnBattlefield);
effect.setText("Enchanted creature gets +X/+X, where X is the number of creature cards in all graveyards");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}
public ExoskeletalArmor(final ExoskeletalArmor card) {
super(card);
}
@Override
public ExoskeletalArmor copy() {
return new ExoskeletalArmor(this);
}
}

View file

@ -0,0 +1,54 @@
/*
* 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.judgment;
import java.util.UUID;
import mage.constants.Rarity;
/**
*
* @author LoneFox
*/
public class Glory extends mage.sets.prereleaseevents.Glory {
public Glory(UUID ownerId) {
super(ownerId);
this.cardNumber = 11;
this.expansionSetCode = "JUD";
this.rarity = Rarity.RARE;
}
public Glory(final Glory card) {
super(card);
}
@Override
public Glory copy() {
return new Glory(this);
}
}

View file

@ -0,0 +1,64 @@
/*
* 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.judgment;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.mana.AnyColorLandsProduceManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
/**
*
* @author LoneFox
*/
public class HarvesterDruid extends CardImpl {
public HarvesterDruid(UUID ownerId) {
super(ownerId, 120, "Harvester Druid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.expansionSetCode = "JUD";
this.subtype.add("Human");
this.subtype.add("Druid");
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {tap}: Add to your mana pool one mana of any color that a land you control could produce.
this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.YOU));
}
public HarvesterDruid(final HarvesterDruid card) {
super(card);
}
@Override
public HarvesterDruid copy() {
return new HarvesterDruid(this);
}
}

View file

@ -0,0 +1,74 @@
/*
* 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.judgment;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
/**
*
* @author LoneFox
*/
public class HuntingGrounds extends CardImpl {
public HuntingGrounds(UUID ownerId) {
super(ownerId, 138, "Hunting Grounds", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}{W}");
this.expansionSetCode = "JUD";
// Threshold - As long as seven or more cards are in your graveyard, Hunting Grounds has "Whenever an opponent casts a spell, you may put a creature card from your hand onto the battlefield."
Ability gainedAbility = new SpellCastOpponentTriggeredAbility(new PutPermanentOnBattlefieldEffect(
new FilterCreatureCard("a creature card")), true);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"As long as seven or more cards are in your graveyard, {this} has \"Whenever an opponent casts a spell, you may put a creature card from your hand onto the battlefield.\""));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public HuntingGrounds(final HuntingGrounds card) {
super(card);
}
@Override
public HuntingGrounds copy() {
return new HuntingGrounds(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.judgment;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
/**
*
* @author LoneFox
*/
public class MaskedGorgon extends CardImpl {
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("green creatures and white creatures");
private static final FilterCard filter2 = new FilterCard("Gorgons");
private static final FilterCard filter3 = new FilterCard("green and from white");
static {
filter1.add(Predicates.or(new ColorPredicate(ObjectColor.GREEN), new ColorPredicate(ObjectColor.WHITE)));
filter2.add(new SubtypePredicate("Gorgon"));
filter3.add(Predicates.or(new ColorPredicate(ObjectColor.GREEN), new ColorPredicate(ObjectColor.WHITE)));
}
public MaskedGorgon(UUID ownerId) {
super(ownerId, 69, "Masked Gorgon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.expansionSetCode = "JUD";
this.subtype.add("Gorgon");
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Green creatures and white creatures have protection from Gorgons.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
new ProtectionAbility(filter2), Duration.WhileOnBattlefield, filter1)));
// Threshold - Masked Gorgon has protection from green and from white as long as seven or more cards are in your graveyard.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilitySourceEffect(new ProtectionAbility(filter3), Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"{this} has protection from green and from white as long as seven or more cards are in your graveyard"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public MaskedGorgon(final MaskedGorgon card) {
super(card);
}
@Override
public MaskedGorgon copy() {
return new MaskedGorgon(this);
}
}

View file

@ -0,0 +1,76 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.judgment;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LoneFox
*/
public class SilverSeraph extends CardImpl {
public SilverSeraph(UUID ownerId) {
super(ownerId, 23, "Silver Seraph", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{W}{W}{W}");
this.expansionSetCode = "JUD";
this.subtype.add("Angel");
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Threshold - Other creatures you control get +2/+2 as long as seven or more cards are in your graveyard.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, true), new CardsInControllerGraveCondition(7),
"other creatures you control +2/+2 as long as seven or more cards are in your graveyard"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public SilverSeraph(final SilverSeraph card) {
super(card);
}
@Override
public SilverSeraph copy() {
return new SilverSeraph(this);
}
}

View file

@ -0,0 +1,69 @@
/*
* 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.judgment;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.discard.DiscardControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LoneFox
*/
public class SpellgorgerBarbarian extends CardImpl {
public SpellgorgerBarbarian(UUID ownerId) {
super(ownerId, 100, "Spellgorger Barbarian", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.expansionSetCode = "JUD";
this.subtype.add("Human");
this.subtype.add("Nightmare");
this.subtype.add("Barbarian");
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// When Spellgorger Barbarian enters the battlefield, discard a card at random.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardControllerEffect(1, true)));
// When Spellgorger Barbarian leaves the battlefield, draw a card.
this.addAbility(new LeavesBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
}
public SpellgorgerBarbarian(final SpellgorgerBarbarian card) {
super(card);
}
@Override
public SpellgorgerBarbarian copy() {
return new SpellgorgerBarbarian(this);
}
}

View file

@ -0,0 +1,60 @@
/*
* 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.judgment;
import java.util.UUID;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LoneFox
*/
public class Swelter extends CardImpl {
public Swelter(UUID ownerId) {
super(ownerId, 101, "Swelter", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}");
this.expansionSetCode = "JUD";
// Swelter deals 2 damage to each of two target creatures.
this.getSpellAbility().addEffect(new DamageTargetEffect(2, true, "each of two target creatures"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2));
}
public Swelter(final Swelter card) {
super(card);
}
@Override
public Swelter copy() {
return new Swelter(this);
}
}

View file

@ -0,0 +1,65 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.judgment;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LoneFox
*/
public class TunnelerWurm extends CardImpl {
public TunnelerWurm(UUID ownerId) {
super(ownerId, 135, "Tunneler Wurm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{G}{G}");
this.expansionSetCode = "JUD";
this.subtype.add("Wurm");
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// Discard a card: Regenerate Tunneler Wurm.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new DiscardCardCost()));
}
public TunnelerWurm(final TunnelerWurm card) {
super(card);
}
@Override
public TunnelerWurm copy() {
return new TunnelerWurm(this);
}
}

View file

@ -0,0 +1,68 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.judgment;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.FilterPermanent;
import mage.filter.predicate.permanent.EnchantedPredicate;
import mage.target.TargetPermanent;
/**
*
* @author LoneFox
*/
public class VenomousVines extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("enchanted permanent");
static {
filter.add(new EnchantedPredicate());
}
public VenomousVines(UUID ownerId) {
super(ownerId, 136, "Venomous Vines", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
this.expansionSetCode = "JUD";
// Destroy target enchanted permanent.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(filter));
}
public VenomousVines(final VenomousVines card) {
super(card);
}
@Override
public VenomousVines copy() {
return new VenomousVines(this);
}
}

View file

@ -0,0 +1,83 @@
/*
* 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.judgment;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetAttackingOrBlockingCreature;
/**
*
* @author LoneFox
*/
public class VigilantSentry extends CardImpl {
public VigilantSentry(UUID ownerId) {
super(ownerId, 33, "Vigilant Sentry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
this.expansionSetCode = "JUD";
this.subtype.add("Human");
this.subtype.add("Nomad");
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Threshold - As long as seven or more cards are in your graveyard, Vigilant Sentry gets +1/+1 and has "{tap}: Target attacking or blocking creature gets +3/+3 until end of turn."
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(3, 3, Duration.EndOfTurn), new TapSourceCost());
gainedAbility.addTarget(new TargetAttackingOrBlockingCreature());
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(gainedAbility),
new CardsInControllerGraveCondition(7), "and has \"{T}: Target attacking or blocking creature gets +3/+3 until end of turn.\""));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public VigilantSentry(final VigilantSentry card) {
super(card);
}
@Override
public VigilantSentry copy() {
return new VigilantSentry(this);
}
}

View file

@ -28,10 +28,11 @@
package mage.sets.ninthedition;
import java.util.UUID;
import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility;
import mage.abilities.mana.AnyColorLandsProduceManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
/**
*
@ -44,7 +45,7 @@ public class FellwarStone extends CardImpl {
this.expansionSetCode = "9ED";
// {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
this.addAbility(new AnyColorOpponentLandsProduceManaAbility());
this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT));
}
public FellwarStone(final FellwarStone card) {

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
@ -66,11 +67,12 @@ public class AboshansDesire extends CardImpl {
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature has flying.
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield)));
// Threshold - Enchanted creature has shroud as long as seven or more cards are in your graveyard.
ability.addEffect(new ConditionalContinuousEffect(new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - Enchanted creature gets shroud as long as seven or more cards are in your graveyard"));
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7), "enchanted creature has shroud as long as seven or more cards are in your graveyard"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -33,11 +33,12 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -59,14 +60,14 @@ public class BarbarianRing extends CardImpl {
this.addAbility(redManaAbility);
// Threshold - {R}, {T}, Sacrifice Barbarian Ring: Barbarian Ring deals 2 damage to target creature or player. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new DamageTargetEffect(2),
new ManaCostsImpl("{R}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {R}, {T}, Sacrifice {this}: {this} deals 2 damage to target creature or player. Activate this ability only if seven or more cards are in your graveyard.");
new CardsInControllerGraveCondition(7));
thresholdAbility.addCost(new TapSourceCost());
thresholdAbility.addCost(new SacrificeSourceCost());
thresholdAbility.addTarget(new TargetCreatureOrPlayer());
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -43,6 +43,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -73,10 +74,11 @@ public class Bloodcurdler extends CardImpl {
// Threshold - As long as seven or more cards are in your graveyard, Bloodcurdler gets +1/+1 and has "At the beginning of your end step, exile two cards from your graveyard."
Ability thresholdAbility = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), thresholdCondition,
"<i>Threshold</i> - If seven or more cards are in your graveyard, {this} gets +1/+1"));
"If seven or more cards are in your graveyard, {this} gets +1/+1"));
ContinuousEffect effect = new GainAbilitySourceEffect(new BeginningOfEndStepTriggeredAbility(new ExileCardFromOwnGraveyardControllerEffect(2), TargetController.YOU, false));
thresholdAbility.addEffect(new ConditionalContinuousEffect(effect, thresholdCondition,
"and has \"At the beginning of your end step, exile two cards from your graveyard.\""));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -41,6 +41,7 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.Effects;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.EffectType;
import mage.constants.Rarity;
@ -68,10 +69,11 @@ public class CabalInquisitor extends CardImpl {
this.toughness = new MageInt(1);
// Threshold - {1}{B}, {T}, Exile two cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard.
Ability ability = new ActivateAsSorceryConditionalActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{1}{B}"), new CardsInControllerGraveCondition(7), "<br/><br/><i>Threshold</i> - {1}{B}, {T}, Exile two cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard.");
Ability ability = new ActivateAsSorceryConditionalActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{1}{B}"), new CardsInControllerGraveCondition(7));
ability.addTarget(new TargetPlayer());
ability.addCost(new TapSourceCost());
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2, new FilterCard("cards from your graveyard"))));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
@ -89,14 +91,12 @@ public class CabalInquisitor extends CardImpl {
class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl {
private Condition condition;
private String ruleText = "<i>Threshold</i> - {1}{B}, {t}, Exile two cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard.";
private static final Effects emptyEffects = new Effects();
public ActivateAsSorceryConditionalActivatedAbility(Zone zone, Effect effect, ManaCosts cost, Condition condition, String rule) {
public ActivateAsSorceryConditionalActivatedAbility(Zone zone, Effect effect, ManaCosts cost, Condition condition) {
super(zone, effect, cost);
this.condition = condition;
this.ruleText = rule;
timing = TimingRule.SORCERY;
}
@ -104,7 +104,6 @@ class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl
public ActivateAsSorceryConditionalActivatedAbility(final ActivateAsSorceryConditionalActivatedAbility ability) {
super(ability);
this.condition = ability.condition;
this.ruleText = ability.ruleText;
}
@Override
@ -130,6 +129,6 @@ class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl
@Override
public String getRule() {
return ruleText;
return super.getRule() + " Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard.";
}
}

View file

@ -33,11 +33,12 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -60,14 +61,14 @@ public class CabalPit extends CardImpl {
this.addAbility(manaAbility);
// Threshold - {B}, {T}, Sacrifice Cabal Pit: Target creature gets -2/-2 until end of turn. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new BoostTargetEffect(-2,-2, Duration.EndOfTurn),
new ManaCostsImpl("{B}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {B}, {T}, Sacrifice {this}: Target creature gets -2/-2 until end of turn. Activate this ability only if seven or more cards are in your graveyard.");
new CardsInControllerGraveCondition(7));
thresholdAbility.addCost(new TapSourceCost());
thresholdAbility.addCost(new SacrificeSourceCost());
thresholdAbility.addTarget(new TargetCreaturePermanent());
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -33,11 +33,12 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -60,14 +61,14 @@ public class CentaurGarden extends CardImpl {
this.addAbility(manaAbility);
// Threshold - {G}, {tap}, Sacrifice Centaur Garden: Target creature gets +3/+3 until end of turn. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new BoostTargetEffect(+3,+3, Duration.EndOfTurn),
new ManaCostsImpl("{G}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {G}, {T}, Sacrifice {this}: Target creature gets +3/+3 until end of turn. Activate this ability only if seven or more cards are in your graveyard.");
new CardsInControllerGraveCondition(7));
thresholdAbility.addCost(new TapSourceCost());
thresholdAbility.addCost(new SacrificeSourceCost());
thresholdAbility.addTarget(new TargetCreaturePermanent());
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -33,12 +33,12 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.effects.common.DrawCardTargetEffect;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.abilities.effects.common.DrawDiscardTargetEffect;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -60,15 +60,14 @@ public class CephalidColiseum extends CardImpl {
this.addAbility(manaAbility);
// Threshold - {U}, {tap}, Sacrifice Cephalid Coliseum: Target player draws three cards, then discards three cards. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
new DrawCardTargetEffect(3),
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new DrawDiscardTargetEffect(3, 3),
new ManaCostsImpl("{U}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {U}, {T}, Sacrifice {this}: Target player draws three cards, then discards three cards. Activate this ability only if seven or more cards are in your graveyard.");
thresholdAbility.addEffect(new DiscardTargetEffect(3));
new CardsInControllerGraveCondition(7));
thresholdAbility.addCost(new TapSourceCost());
thresholdAbility.addCost(new SacrificeSourceCost());
thresholdAbility.addTarget(new TargetPlayer());
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -34,9 +34,10 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -62,13 +63,13 @@ public class Chainflinger extends CardImpl {
ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability);
// Threshold - {2}{R}, {tap}: Chainflinger deals 2 damage to target creature or player. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new DamageTargetEffect(2),
new ManaCostsImpl("2}{R}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {2}{R}, {t}: {this} deals 2 damage to target creature or player. Activate this ability only if seven or more cards are in your graveyard.");
new ManaCostsImpl("{2}{R}"),
new CardsInControllerGraveCondition(7));
thresholdAbility.addCost(new TapSourceCost());
thresholdAbility.addTarget(new TargetCreatureOrPlayer());
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -39,6 +39,7 @@ import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -66,7 +67,7 @@ public class ChildhoodHorror extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - If seven or more cards are in your graveyard, Childhood Horror gets +2/+2"
"If seven or more cards are in your graveyard, Childhood Horror gets +2/+2"
));
Effect effect = new ConditionalRestrictionEffect(
@ -74,6 +75,7 @@ public class ChildhoodHorror extends CardImpl {
new CardsInControllerGraveCondition(7));
effect.setText("and can't block");
thresholdAbility.addEffect(effect);
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -29,14 +29,22 @@ package mage.sets.odyssey;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
/**
@ -56,9 +64,14 @@ public class Chlorophant extends CardImpl {
// At the beginning of your upkeep, you may put a +1/+1 counter on Chlorophant.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, true));
// Threshold - As long as seven or more cards are in your graveyard, Chlorophant has "At the beginning of your upkeep, you may put another +1/+1 counter on Chlorophant."
this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, true),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> As long as seven or more cards are in your graveyard, {this} has \"At the beginning of your upkeep, you may put another +1/+1 counter on {this}\""));
Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance());
effect.setText("At the beginning of your upkeep, you may put another +1/+1 counter on {this}.");
Ability gainedAbility = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, true);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"As long as seven or more cards are in your graveyard, {this} has \"At the beginning of your upkeep, you may put another +1/+1 counter on {this}.\""));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public Chlorophant(final Chlorophant card) {

View file

@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.ShroudAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -72,13 +73,13 @@ public class CrashingCentaur extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - If seven or more cards are in your graveyard, {this} gets +2/+2"));
"If seven or more cards are in your graveyard, {this} gets +2/+2"));
Effect effect = new ConditionalContinuousEffect(
new GainAbilitySourceEffect(ShroudAbility.getInstance()),
new CardsInControllerGraveCondition(7), "and has shroud");
thresholdAbility.addEffect(effect);
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}
public CrashingCentaur(final CrashingCentaur card) {

View file

@ -42,6 +42,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
@ -52,8 +53,8 @@ import mage.filter.predicate.Predicates;
import mage.filter.predicate.other.OwnerPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -84,10 +85,12 @@ public class DecayingSoil extends CardImpl {
this.addAbility(ability);
// Threshold - As long as seven or more cards are in your graveyard, Decaying Soil has "Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand."
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(new DecayingSoilTriggeredAbility(new DecayingSoilEffect(), filter)),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} has \"Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand")));
"As long as seven or more cards are in your graveyard, {this} has \"Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand.\""));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public DecayingSoil(final DecayingSoil card) {

View file

@ -42,6 +42,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -73,13 +74,14 @@ public class DirtyWererat extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - If seven or more cards are in your graveyard, Dirty Wererat gets +2/+2 and can't block"
"If seven or more cards are in your graveyard, {this} gets +2/+2"
));
Effect effect = new ConditionalRestrictionEffect(
new CantBlockSourceEffect(Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7));
effect.setText("and can't block");
thresholdAbility.addEffect(effect);
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -35,6 +35,7 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -65,8 +66,9 @@ public class DivineSacrament extends CardImpl {
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - If seven or more cards are in your graveyard, white creatures get an additional +1/+1."
"If seven or more cards are in your graveyard, white creatures get an additional +1/+1."
));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -64,12 +65,13 @@ public class Frightcrawler extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - If seven or more cards are in your graveyard, {this} gets +2/+2 "
"If seven or more cards are in your graveyard, {this} gets +2/+2 "
));
thresholdAbility.addEffect(new ConditionalContinuousEffect(
new CantBlockSourceEffect(Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"and can't block."));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -33,9 +33,10 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.PreventDamageToTargetEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -63,12 +64,12 @@ public class HallowedHealer extends CardImpl {
ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability);
// Threshold - {tap}: Prevent the next 4 damage that would be dealt to target creature or player this turn. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
new PreventDamageToTargetEffect(Duration.EndOfTurn,4),
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new PreventDamageToTargetEffect(Duration.EndOfTurn, 4),
new TapSourceCost(),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {T}: Prevent the next 4 damage that would be dealt to target creature or player this turn. Activate this ability only if seven or more cards are in your graveyard.");
new CardsInControllerGraveCondition(7));
thresholdAbility.addTarget(new TargetCreatureOrPlayer());
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -29,12 +29,14 @@ package mage.sets.odyssey;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageEverythingEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -56,11 +58,12 @@ public class InfectedVermin extends CardImpl {
// {2}{B}: Infected Vermin deals 1 damage to each creature and each player.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(1), new ManaCostsImpl("{2}{B}")));
// Threshold - {3}{B}: Infected Vermin deals 3 damage to each creature and each player. Activate this ability only if seven or more cards are in your graveyard.
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new DamageEverythingEffect(3),
new ManaCostsImpl("{3}{B}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {3}{B}: Infected Vermin deals 3 damage to each creature and each player. Activate this ability only if seven or more cards are in your graveyard."));
new CardsInControllerGraveCondition(7));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public InfectedVermin(final InfectedVermin card) {

View file

@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
@ -67,11 +68,13 @@ public class KamahlsDesire extends CardImpl {
this.addAbility(ability);
// Enchanted creature has first strike.
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield)));
// Threshold - Enchanted creature gets +3/+0 as long as seven or more cards are in your graveyard.
ability.addEffect(new ConditionalContinuousEffect(new BoostEnchantedEffect(3, 0, Duration.WhileOnBattlefield),
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostEnchantedEffect(3, 0, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - Enchanted creature gets +3/+0 as long as seven or more cards are in your graveyard"));
"Enchanted creature gets +3/+0 as long as seven or more cards are in your graveyard"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -32,10 +32,11 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -58,13 +59,12 @@ public class KrosanAvenger extends CardImpl {
// Trample
this.addAbility(TrampleAbility.getInstance());
// Threshold - {1}{G}: Regenerate Krosan Avenger. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new RegenerateSourceEffect(),
new ManaCostsImpl("{1}{G}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {1}{G}: Regenerate {this}. Activate this ability only if seven or more cards are in your graveyard.");
new CardsInControllerGraveCondition(7));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}
public KrosanAvenger(final KrosanAvenger card) {

View file

@ -35,6 +35,7 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -61,8 +62,9 @@ public class KrosanBeast extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(7, 7, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {this} gets +7/+7 as long as seven or more cards are in your graveyard"
"{this} gets +7/+7 as long as seven or more cards are in your graveyard"
));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -35,6 +35,7 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -61,8 +62,9 @@ public class MetamorphicWurm extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(4, 4, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {this} gets +4/+4 as long as seven or more cards are in your graveyard"
"{this} gets +4/+4 as long as seven or more cards are in your graveyard"
));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -39,6 +39,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -73,8 +74,11 @@ public class MysticCrusader extends CardImpl {
this.addAbility(new ProtectionAbility(filter));
// Threshold - As long as seven or more cards are in your graveyard, Mystic Crusader gets +1/+1 and has flying.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), new CardsInControllerGraveCondition(7), "and has flying"));
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()),
new CardsInControllerGraveCondition(7), "and has flying"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -63,8 +64,11 @@ public class MysticPenitent extends CardImpl {
this.addAbility(VigilanceAbility.getInstance());
// Threshold - As long as seven or more cards are in your graveyard, Mystic Penitent gets +1/+1 and has flying.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), new CardsInControllerGraveCondition(7), "and has flying"));
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()),
new CardsInControllerGraveCondition(7), "and has flying"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -36,6 +36,7 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -58,7 +59,9 @@ public class MysticVisionary extends CardImpl {
// Threshold - Mystic Visionary has flying as long as seven or more cards are in your graveyard.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilitySourceEffect(FlyingAbility.getInstance()), new CardsInControllerGraveCondition(7), "<i>Threshold</i> - {this} has flying as long as seven or more cards are in your graveyard."));
new GainAbilitySourceEffect(FlyingAbility.getInstance()), new CardsInControllerGraveCondition(7),
"{this} has flying as long as seven or more cards are in your graveyard."));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -60,8 +61,11 @@ public class MysticZealot extends CardImpl {
// Threshold - As long as seven or more cards are in your graveyard, Mystic Zealot gets +1/+1 and has flying.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), new CardsInControllerGraveCondition(7), "and has flying"));
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()),
new CardsInControllerGraveCondition(7), "and has flying"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -32,12 +32,14 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.Duration;
import mage.constants.Zone;
@ -58,7 +60,12 @@ public class NimbleMongoose extends CardImpl {
// Shroud
this.addAbility(ShroudAbility.getInstance());
// Threshold - Nimble Mongoose gets +2/+2 as long as seven or more cards are in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "<i> Threshold</i> - {this} gets +2/+2 as long as seven or more cards are in your graveyard")));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"{this} gets +2/+2 as long as seven or more cards are in your graveyard"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public NimbleMongoose(final NimbleMongoose card) {

View file

@ -31,20 +31,20 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author cbt33
*/
@ -66,12 +66,14 @@ public class NomadDecoy extends CardImpl {
this.addAbility(ability);
// Threshold - {W}{W}, {T}: Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{W}{W}"));
thresholdAbility.addTarget(new TargetCreaturePermanent(2));
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new TapTargetEffect(),
new ManaCostsImpl("{W}{W}"),
new CardsInControllerGraveCondition(7));
thresholdAbility.addCost(new TapSourceCost());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(thresholdAbility),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {W}{W}, {T}: Tap two target creatures. Activate this ability only if seven or more cards are in your graveyard.")));
thresholdAbility.addTarget(new TargetCreaturePermanent(2));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}
public NomadDecoy(final NomadDecoy card) {

View file

@ -33,11 +33,12 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalGainActivatedAbility;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.DamageControllerEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -58,13 +59,13 @@ public class NomadStadium extends CardImpl {
this.addAbility(manaAbility);
// Threshold - {W}, {tap}, Sacrifice Nomad Stadium: You gain 4 life. Activate this ability only if seven or more cards are in your graveyard.
Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new GainLifeEffect(4),
new ManaCostsImpl("{W}"),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {W}, {T}, Sacrifice {this}: You gain 4 life. Activate this ability only if seven or more cards are in your graveyard.");
new CardsInControllerGraveCondition(7));
thresholdAbility.addCost(new TapSourceCost());
thresholdAbility.addCost(new SacrificeSourceCost());
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -29,6 +29,7 @@ package mage.sets.odyssey;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
@ -36,6 +37,7 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -69,10 +71,11 @@ public class NutCollector extends CardImpl {
// At the beginning of your upkeep, you may put a 1/1 green Squirrel creature token onto the battlefield.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SquirrelToken()), TargetController.YOU, true));
// Threshold - Squirrel creatures get +2/+2 as long as seven or more cards are in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new BoostAllEffect(2, 2, Duration.WhileOnBattlefield, filter, false),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - Squirrel creatures get +2/+2 as long as seven or more cards are in your graveyard")));
new CardsInControllerGraveCondition(7), "Squirrel creatures get +2/+2 as long as seven or more cards are in your graveyard"));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public NutCollector(final NutCollector card) {

View file

@ -29,16 +29,19 @@ package mage.sets.odyssey;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -62,13 +65,14 @@ public class PatriarchsDesire extends CardImpl {
this.addAbility(ability);
// Enchanted creature gets +2/-2.
ability.addEffect(new BoostEnchantedEffect(2, -2, Duration.WhileOnBattlefield));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, -2, Duration.WhileOnBattlefield)));
// Threshold - Enchanted creature gets an additional +2/-2 as long as seven or more cards are in your graveyard.
ability.addEffect(new ConditionalContinuousEffect(new BoostEnchantedEffect(2, -2,
Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<br/><br/><i>Threshold</i> - Enchanted creature gets an additional +2/-2 as long as seven or more cards are in your graveyard." ));
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostEnchantedEffect(2, -2, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
"Enchanted creature gets an additional +2/-2 as long as seven or more cards are in your graveyard."));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public PatriarchsDesire(final PatriarchsDesire card) {

View file

@ -43,6 +43,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -79,13 +80,14 @@ public class RepentantVampire extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BecomesColorSourceEffect(ObjectColor.WHITE, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} is white"));
"As long as seven or more cards are in your graveyard, {this} is white"));
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost());
gainedAbility.addTarget(new TargetCreaturePermanent(filter));
ability.addEffect(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"and has \"{t}: Destroy target black creature.\""));
"and has \"{T}: Destroy target black creature.\""));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -35,6 +35,7 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -60,8 +61,9 @@ public class SpringingTiger extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {this} gets +2/+2 as long as seven or more cards are in your graveyard"
"{this} gets +2/+2 as long as seven or more cards are in your graveyard"
));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -43,6 +43,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -73,23 +74,24 @@ public class WaywardAngel extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} gets +3/+3,"));
"As long as seven or more cards are in your graveyard, {this} gets +3/+3"));
ability.addEffect(new ConditionalContinuousEffect(
new BecomesColorSourceEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
" is black,"));
", is black"));
ability.addEffect(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(TrampleAbility.getInstance()),
new CardsInControllerGraveCondition(7),
" has trample,"));
", has trample"));
Ability gainedAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(new FilterControlledCreaturePermanent(), 1, ""), TargetController.YOU, false);
ability.addEffect(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(gainedAbility),
new CardsInControllerGraveCondition(7),
" and has \"At the beginning of your upkeep, sacrifice a creature.\" "));
"and has \"At the beginning of your upkeep, sacrifice a creature.\""));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -36,6 +36,7 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -65,10 +66,10 @@ public class Werebear extends CardImpl {
new ConditionalContinuousEffect(
new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {this} gets +3/+3 as long as seven or more cards are in your graveyard"
"{this} gets +3/+3 as long as seven or more cards are in your graveyard"
));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}
public Werebear(final Werebear card) {

View file

@ -29,24 +29,15 @@ package mage.sets.onslaught;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.effects.common.continuous.GainProtectionFromColorAllEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
/**
*
@ -60,7 +51,7 @@ public class AkromasBlessing extends CardImpl {
// Choose a color. Creatures you control gain protection from the chosen color until end of turn.
this.getSpellAbility().addEffect(new AkromasBlessingChooseColorEffect());
this.getSpellAbility().addEffect(new GainProtectionFromColorAllEffect(Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you control")));
// Cycling {W}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{W}")));
}
@ -74,46 +65,3 @@ public class AkromasBlessing extends CardImpl {
return new AkromasBlessing(this);
}
}
class AkromasBlessingChooseColorEffect extends OneShotEffect {
public AkromasBlessingChooseColorEffect() {
super(Outcome.Benefit);
this.staticText = "Choose a color. Creatures you control gain protection from the chosen color until end of turn";
}
public AkromasBlessingChooseColorEffect(final AkromasBlessingChooseColorEffect effect) {
super(effect);
}
@Override
public AkromasBlessingChooseColorEffect copy() {
return new AkromasBlessingChooseColorEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (sourceObject != null && controller != null) {
ChoiceColor choice = new ChoiceColor();
while (!choice.isChosen()) {
controller.choose(outcome, choice, game);
if (!controller.canRespond()) {
return false;
}
}
if (choice.getColor() == null) {
return false;
}
game.informPlayers(sourceObject.getName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice());
FilterCard filterColor = new FilterCard();
filterColor.add(new ColorPredicate(choice.getColor()));
filterColor.setMessage(choice.getChoice());
ContinuousEffect effect = new GainAbilityAllEffect(new ProtectionAbility(new FilterCard(filterColor)), Duration.EndOfTurn, new FilterControlledCreaturePermanent());
game.addEffect(effect, source);
return true;
}
return false;
}
}

View file

@ -29,10 +29,11 @@ package mage.sets.planeshift;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.mana.AnyColorOpponentLandsProduceManaAbility;
import mage.abilities.mana.AnyColorLandsProduceManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
/**
*
@ -50,7 +51,7 @@ public class QuirionExplorer extends CardImpl {
this.toughness = new MageInt(1);
// {T}: Add to your mana pool one mana of any color that a land an opponent controls could produce.
this.addAbility(new AnyColorOpponentLandsProduceManaAbility());
this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.OPPONENT));
}
public QuirionExplorer(final QuirionExplorer card) {

View file

@ -0,0 +1,73 @@
/*
* 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.prereleaseevents;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.GainProtectionFromColorAllEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
/**
*
* @author LoneFox
*/
public class Glory extends CardImpl {
public Glory(UUID ownerId) {
super(ownerId, 17, "Glory", Rarity.SPECIAL, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
this.expansionSetCode = "PTC";
this.subtype.add("Incarnation");
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// {2}{W}: Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate this ability only if Glory is in your graveyard.
Effect effect = new GainProtectionFromColorAllEffect(Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you control"));
effect.setText("Choose a color. Creatures you control gain protection from the chosen color until end of turn. Activate this ability only if {this} is in your graveyard.");
this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, effect, new ManaCostsImpl("{2}{W}")));
}
public Glory(final Glory card) {
super(card);
}
@Override
public Glory copy() {
return new Glory(this);
}
}

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -72,16 +73,12 @@ public class MysticEnforcer extends CardImpl {
// Protection from black
this.addAbility(new ProtectionAbility(filter));
// Threshold - As long as seven or more cards are in your graveyard, Mystic Enforcer gets +3/+3 and has flying.
Ability thresholdAbility = new SimpleStaticAbility(
Zone.BATTLEFIELD,
new ConditionalContinuousEffect(
new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {this} gets +3/+3 as long as seven or more cards are in your graveyard"
));
Effect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
effect.setText("and has flying");
thresholdAbility.addEffect(effect);
Ability thresholdAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7),
" as long as seven or more cards are in your graveyard, {this} gets +3/+3"));
thresholdAbility.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()),
new CardsInControllerGraveCondition(7), "and has flying"));
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}

View file

@ -83,7 +83,7 @@ public class ForiysianTotem extends CardImpl {
class ForiysianTotemToken extends Token {
public ForiysianTotemToken() {
super("", "4/4 red Giant artifact creature");
super("", "4/4 red Giant artifact creature with trample");
cardType.add(CardType.CREATURE);
cardType.add(CardType.ARTIFACT);
subtype.add("Giant");

View file

@ -36,6 +36,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -65,9 +66,9 @@ public class KrosanRestorer extends CardImpl {
ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new UntapTargetEffect(),
new TapSourceCost(),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {T}: Untap up to three target lands. Activate this ability only if seven or more cards are in your graveyard.");
new CardsInControllerGraveCondition(7));
ability.addTarget(new TargetLandPermanent(0, 3, new FilterLandPermanent(), false));
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}

View file

@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@ -68,12 +69,12 @@ public class PutridImp extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
"As long as seven or more cards are in your graveyard, {this} gets +1/+1"));
Effect effect = new ConditionalRestrictionEffect(new CantBlockSourceEffect(Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7));
effect.setText("and can't block");
ability.addEffect(effect);
ability.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(ability);
}
public PutridImp(final PutridImp card) {

View file

@ -31,23 +31,13 @@ package mage.sets.zendikar;
import java.util.UUID;
import mage.MageObject;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.effects.common.continuous.GainProtectionFromColorAllEffect;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
/**
*
@ -55,13 +45,19 @@ import mage.players.Player;
*/
public class BraveTheElements extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("White creatures you control");
static {
filter.add(new ColorPredicate(ObjectColor.WHITE));
}
public BraveTheElements(UUID ownerId) {
super(ownerId, 4, "Brave the Elements", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{W}");
this.expansionSetCode = "ZEN";
// Choose a color. White creatures you control gain protection from the chosen color until end of turn.
this.getSpellAbility().addEffect(new BraveTheElementsChooseColorEffect());
this.getSpellAbility().addEffect(new GainProtectionFromColorAllEffect(Duration.EndOfTurn, filter));
}
public BraveTheElements(final BraveTheElements card) {
@ -74,53 +70,3 @@ public class BraveTheElements extends CardImpl {
}
}
class BraveTheElementsChooseColorEffect extends OneShotEffect {
private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent();
static {
filter1.add(new ColorPredicate(ObjectColor.WHITE));
}
public BraveTheElementsChooseColorEffect() {
super(Outcome.Benefit);
this.staticText = "Choose a color. White creatures you control gain protection from the chosen color until end of turn";
}
public BraveTheElementsChooseColorEffect(final BraveTheElementsChooseColorEffect effect) {
super(effect);
}
@Override
public BraveTheElementsChooseColorEffect copy() {
return new BraveTheElementsChooseColorEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (sourceObject != null && controller != null) {
ChoiceColor choice = new ChoiceColor();
while (!choice.isChosen()) {
controller.choose(outcome, choice, game);
if (!controller.canRespond()) {
return false;
}
}
if (choice.getColor() == null) {
return false;
}
game.informPlayers(sourceObject.getName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice());
FilterCard filterColor = new FilterCard();
filterColor.add(new ColorPredicate(choice.getColor()));
filterColor.setMessage(choice.getChoice());
ContinuousEffect effect = new GainAbilityAllEffect(new ProtectionAbility(new FilterCard(filterColor)), Duration.EndOfTurn, filter1);
game.addEffect(effect, source);
return true;
}
return false;
}
}

View file

@ -29,31 +29,19 @@ package mage.sets.zendikar;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.GainProtectionFromColorAllEffect;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardIdPredicate;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
@ -61,6 +49,12 @@ import mage.players.Player;
*/
public class KabiraEvangel extends CardImpl {
private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent();
static {
filter1.add(new SubtypePredicate("Ally"));
}
public KabiraEvangel(UUID ownerId) {
super(ownerId, 15, "Kabira Evangel", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.expansionSetCode = "ZEN";
@ -71,13 +65,13 @@ public class KabiraEvangel extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(3);
FilterPermanent filter = new FilterPermanent(getName() + " or another Ally");
filter.add(Predicates.or(
new CardIdPredicate(this.getId()),
new SubtypePredicate("Ally")));
FilterPermanent filter2 = new FilterPermanent(getName() + " or another Ally");
filter2.add(Predicates.or(new CardIdPredicate(this.getId()), new SubtypePredicate("Ally")));
// Whenever Kabira Evangel or another Ally enters the battlefield under your control, you may choose a color. If you do, Allies you control gain protection from the chosen color until end of turn.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new KabiraEvangelChooseColorEffect(), filter, true));
Effect effect = new GainProtectionFromColorAllEffect(Duration.EndOfTurn, filter1);
effect.setText("choose a color. If you do, Allies you control gain protection from the chosen color until end of turn.");
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter2, true));
}
public KabiraEvangel(final KabiraEvangel card) {
@ -89,55 +83,3 @@ public class KabiraEvangel extends CardImpl {
return new KabiraEvangel(this);
}
}
class KabiraEvangelChooseColorEffect extends OneShotEffect {
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent();
static {
filter1.add(new ControllerPredicate(TargetController.YOU));
filter1.add(new SubtypePredicate("Ally"));
}
public KabiraEvangelChooseColorEffect() {
super(Outcome.Benefit);
staticText = "choose a color. All Allies you control gain protection from the chosen color until end of turn";
}
public KabiraEvangelChooseColorEffect(final KabiraEvangelChooseColorEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent sourceObject = game.getPermanent(source.getSourceId());
if (sourceObject != null && controller != null) {
ChoiceColor choice = new ChoiceColor();
while (!choice.isChosen()) {
controller.choose(outcome, choice, game);
if (!controller.canRespond()) {
return false;
}
}
if (choice.getColor() == null) {
return false;
}
game.informPlayers(sourceObject.getName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice());
FilterCard filterColor = new FilterCard();
filterColor.add(new ColorPredicate(choice.getColor()));
filterColor.setMessage(choice.getChoice());
ContinuousEffect effect = new GainAbilityAllEffect(new ProtectionAbility(new FilterCard(filterColor)), Duration.EndOfTurn, filter1);
game.addEffect(effect, source);
return true;
}
return false;
}
@Override
public KabiraEvangelChooseColorEffect copy() {
return new KabiraEvangelChooseColorEffect(this);
}
}

View file

@ -55,7 +55,7 @@ public class DrawDiscardTargetEffect extends OneShotEffect {
staticText = new StringBuilder("Target player draws ")
.append(cardsToDraw == 1?"a": CardUtil.numberToText(cardsToDraw))
.append(" card").append(cardsToDraw == 1?" ": "s")
.append(", then discard ")
.append(", then discards ")
.append(cardsToDiscard == 1?"a": CardUtil.numberToText(cardsToDiscard))
.append(" card").append(cardsToDiscard == 1?" ": "s").toString();
}

View file

@ -96,15 +96,18 @@ public class CanBlockAdditionalCreatureEffect extends ContinuousEffectImpl {
}
private String setText() {
StringBuilder sb = new StringBuilder("{this} can block ");
String text = "{this} can block ";
switch(amount) {
case 0:
sb.append("any number of creatures");
text += "any number of creatures";
break;
default:
sb.append(CardUtil.numberToText(amount, "an")).append(" additional creature").append(amount > 1 ? "s":"");
text += CardUtil.numberToText(amount, "an") + " additional creature" + (amount > 1 ? "s" : "");
}
return sb.toString();
if(duration == Duration.EndOfTurn) {
text += " this turn";
}
return text;
}
@Override

View file

@ -33,6 +33,7 @@ import java.util.UUID;
import mage.MageObject;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.effects.ContinuousEffectImpl;
@ -77,7 +78,6 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
this.ability = ability;
this.filter = filter;
this.excludeSource = excludeSource;
setText();
}
public GainAbilityAllEffect(final GainAbilityAllEffect effect) {
@ -141,8 +141,13 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
return true;
}
private void setText() {
public String getText(Mode mode) {
if(staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
boolean quotes = (ability instanceof SimpleActivatedAbility) || (ability instanceof TriggeredAbility);
if (excludeSource) {
sb.append("Other ");
@ -171,6 +176,6 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
if (duration.toString().length() > 0) {
sb.append(" ").append(duration.toString());
}
staticText = sb.toString();
return sb.toString();
}
}

View file

@ -0,0 +1,103 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.effects.common.continuous;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.keyword.ProtectionAbility;
import mage.choices.ChoiceColor;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author LoneFox
*/
public class GainProtectionFromColorAllEffect extends GainAbilityAllEffect {
protected ChoiceColor choice;
public GainProtectionFromColorAllEffect(Duration duration, FilterPermanent filter) {
super(new ProtectionAbility(new FilterCard()), duration, filter);
choice = new ChoiceColor(true);
}
public GainProtectionFromColorAllEffect(final GainProtectionFromColorAllEffect effect) {
super(effect);
choice = effect.choice;
}
@Override
public GainProtectionFromColorAllEffect copy() {
return new GainProtectionFromColorAllEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
FilterCard protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter();
protectionFilter.add(new ColorPredicate(choice.getColor()));
protectionFilter.setMessage(choice.getChoice());
((ProtectionAbility)ability).setFilter(protectionFilter);
return super.apply(game, source);
}
@Override
public void init(Ability source, Game game) {
super.init(source, game);
MageObject sourceObject = game.getObject(source.getSourceId());
Player controller = game.getPlayer(source.getControllerId());
if(sourceObject != null && controller != null) {
choice.clearChoice();
while(!choice.isChosen()) {
controller.choose(Outcome.Protect, choice, game);
if(!controller.canRespond()) {
return;
}
}
if(choice.isChosen() && !game.isSimulation()) {
game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen protection from " + choice.getChoice()); }
}
}
@Override
public String getText(Mode mode) {
if(staticText != null && !staticText.isEmpty()) {
return staticText;
}
String text = "Choose a color. " + filter.getMessage() + " gain protection from the chosen color " + duration.toString();
return text;
}
}

View file

@ -51,41 +51,42 @@ import mage.players.Player;
* @author LevelX2
*/
public class AnyColorOpponentLandsProduceManaAbility extends ManaAbility {
public class AnyColorLandsProduceManaAbility extends ManaAbility {
public AnyColorOpponentLandsProduceManaAbility() {
super(Zone.BATTLEFIELD, new AnyColorOpponentLandsProduceManaEffect(),new TapSourceCost());
public AnyColorLandsProduceManaAbility(TargetController targetController) {
super(Zone.BATTLEFIELD, new AnyColorLandsProduceManaEffect(targetController), new TapSourceCost());
}
public AnyColorOpponentLandsProduceManaAbility(final AnyColorOpponentLandsProduceManaAbility ability) {
public AnyColorLandsProduceManaAbility(final AnyColorLandsProduceManaAbility ability) {
super(ability);
}
@Override
public AnyColorOpponentLandsProduceManaAbility copy() {
return new AnyColorOpponentLandsProduceManaAbility(this);
public AnyColorLandsProduceManaAbility copy() {
return new AnyColorLandsProduceManaAbility(this);
}
@Override
public List<Mana> getNetMana(Game game) {
return ((AnyColorOpponentLandsProduceManaEffect)getEffects().get(0)).getNetMana(game, this);
return ((AnyColorLandsProduceManaEffect)getEffects().get(0)).getNetMana(game, this);
}
}
class AnyColorOpponentLandsProduceManaEffect extends ManaEffect {
class AnyColorLandsProduceManaEffect extends ManaEffect {
private static final FilterPermanent filter = new FilterLandPermanent();
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));
}
private final FilterPermanent filter;
public AnyColorOpponentLandsProduceManaEffect() {
public AnyColorLandsProduceManaEffect(TargetController targetController) {
super();
staticText = "Add to your mana pool one mana of any color that a land an opponent controls could produce";
filter = new FilterLandPermanent();
filter.add(new ControllerPredicate(targetController));
String text = targetController == TargetController.OPPONENT ? "an opponent controls" : "you control";
staticText = "Add to your mana pool one mana of any color that a land " + text + " could produce";
}
public AnyColorOpponentLandsProduceManaEffect(final AnyColorOpponentLandsProduceManaEffect effect) {
public AnyColorLandsProduceManaEffect(final AnyColorLandsProduceManaEffect effect) {
super(effect);
this.filter = effect.filter.copy();
}
@Override
@ -194,7 +195,7 @@ class AnyColorOpponentLandsProduceManaEffect extends ManaEffect {
}
@Override
public AnyColorOpponentLandsProduceManaEffect copy() {
return new AnyColorOpponentLandsProduceManaEffect(this);
public AnyColorLandsProduceManaEffect copy() {
return new AnyColorLandsProduceManaEffect(this);
}
}