Clean up cards with threshold abilities: use setAbilityWord() where appropriate and fix any incorrectly implemented abilities found in the process.

This commit is contained in:
LoneFox 2015-12-31 20:43:18 +02:00
parent 85d02a77e6
commit b18f40a778
38 changed files with 234 additions and 155 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

@ -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;
@ -65,18 +66,19 @@ public class Bloodcurdler extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// At the beginning of your upkeep, put the top card of your library into your graveyard.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveControllerEffect(1), TargetController.YOU, false));
Condition thresholdCondition = new CardsInControllerGraveCondition(7);
// 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"));
Ability thresholdAbility = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), thresholdCondition,
"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.\""));
"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);
}
@ -87,24 +89,21 @@ 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;
timing = TimingRule.SORCERY;
}
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,7 +75,8 @@ public class ChildhoodHorror extends CardImpl {
new CardsInControllerGraveCondition(7));
effect.setText("and can't block");
thresholdAbility.addEffect(effect);
this.addAbility(thresholdAbility);
thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD);
this.addAbility(thresholdAbility);
}
public ChildhoodHorror(final ChildhoodHorror card) {

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;
@ -65,20 +66,20 @@ public class CrashingCentaur extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn), new ManaCostsImpl("{G}"));
ability.addCost(new DiscardCardCost());
this.addAbility(ability);
// Threshold - As long as seven or more cards are in your graveyard, Crashing Centaur gets +2/+2 and has shroud.
Ability thresholdAbility = new SimpleStaticAbility(
Zone.BATTLEFIELD,
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;
@ -82,12 +83,14 @@ public class DecayingSoil extends CardImpl {
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard();
ability.addTarget(target);
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,
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")));
ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(new DecayingSoilTriggeredAbility(new DecayingSoilEffect(), filter)),
new CardsInControllerGraveCondition(7),
"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) {
@ -174,7 +177,7 @@ class DecayingSoilEffect extends OneShotEffect {
cost.clearPaid();
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
UUID target = this.getTargetPointer().getFirst(game, source);
if (target != null) {
if (target != null) {
Card card = game.getCard(target);
// check if it's still in graveyard
if (card != null && game.getState().getZone(card.getId()).equals(Zone.GRAVEYARD)) {

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;
@ -47,7 +48,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
* @author Beta_Steward (Honor of the Pure), LevelX2 (Demoralize), cbt
*/
public class DivineSacrament extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures");
static {
filter.add(new ColorPredicate(ObjectColor.WHITE));
@ -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;
@ -46,7 +47,7 @@ import mage.target.common.TargetCreatureOrPlayer;
*
* @author cbt33
*/
public class HallowedHealer extends CardImpl {
public HallowedHealer(UUID ownerId) {
@ -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),
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.");
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new PreventDamageToTargetEffect(Duration.EndOfTurn, 4),
new TapSourceCost(),
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;
@ -65,13 +66,15 @@ public class KamahlsDesire extends CardImpl {
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
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),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - Enchanted creature gets +3/+0 as long as seven or more cards are in your graveyard"));
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new BoostEnchantedEffect(3, 0, Duration.WhileOnBattlefield),
new CardsInControllerGraveCondition(7),
"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,
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.");
Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new RegenerateSourceEffect(),
new ManaCostsImpl("{1}{G}"),
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;
@ -52,7 +53,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
* @author cbt33
*/
public class MysticCrusader extends CardImpl {
static final FilterCard filter = new FilterCard("black and from red");
static {
@ -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
*/
@ -64,14 +64,16 @@ public class NomadDecoy extends CardImpl {
ability.addTarget(new TargetCreaturePermanent());
ability.addCost(new TapSourceCost());
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;
@ -50,9 +52,9 @@ import mage.game.permanent.token.SquirrelToken;
* @author cbt33
*/
public class NutCollector extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("squirrel");
static {
filter.add(new SubtypePredicate("Squirrel"));
}
@ -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,
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")));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new BoostAllEffect(2, 2, Duration.WhileOnBattlefield, filter, false),
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;
@ -60,15 +63,16 @@ public class PatriarchsDesire extends CardImpl {
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
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

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

@ -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;
@ -60,14 +61,14 @@ public class KrosanRestorer extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
// Threshold - {tap}: Untap up to three target lands. Activate this ability only if seven or more cards are in your graveyard.
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.");
ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new UntapTargetEffect(),
new TapSourceCost(),
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) {