* Gwyllion Hedge-Mage - Fixed that the second triggered ability did not work.

This commit is contained in:
LevelX2 2015-09-12 00:32:35 +02:00
parent de639cc1d6
commit 05e7eedb65
2 changed files with 17 additions and 17 deletions

View file

@ -40,30 +40,28 @@ import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinToken;
import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent;
/** /**
* *
* @author jeffwadsworth * @author jeffwadsworth
*
*/ */
public class GwyllionHedgeMage extends CardImpl { public class GwyllionHedgeMage extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("Plains"); private static final FilterLandPermanent filter = new FilterLandPermanent("Plains");
private static final FilterLandPermanent filter2 = new FilterLandPermanent("Swamps"); private static final FilterLandPermanent filter2 = new FilterLandPermanent("Swamps");
private static final FilterCreaturePermanent filter3 = new FilterCreaturePermanent();
static { static {
filter.add(new SubtypePredicate("Plains")); filter.add(new SubtypePredicate("Plains"));
filter2.add(new SubtypePredicate("Swamps")); filter2.add(new SubtypePredicate("Swamp"));
} }
private String rule1 = "When {this} enters the battlefield, if you control two or more Plains, you may put a 1/1 white Kithkin Soldier creature token onto the battlefield."; private final String rule1 = "When {this} enters the battlefield, if you control two or more Plains, you may put a 1/1 white Kithkin Soldier creature token onto the battlefield.";
private String rule2 = "When {this} enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature."; private final String rule2 = "When {this} enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature.";
public GwyllionHedgeMage(UUID ownerId) { public GwyllionHedgeMage(UUID ownerId) {
super(ownerId, 202, "Gwyllion Hedge-Mage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W/B}"); super(ownerId, 202, "Gwyllion Hedge-Mage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W/B}");
@ -77,12 +75,15 @@ public class GwyllionHedgeMage extends CardImpl {
// When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Plains, you may put a 1/1 white Kithkin Soldier creature token onto the battlefield. // When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Plains, you may put a 1/1 white Kithkin Soldier creature token onto the battlefield.
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinToken()), true), new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1), rule1); Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinToken()), true), new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1), rule1);
this.addAbility(ability); this.addAbility(ability);
// When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature. // When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature.
Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), true), new PermanentsOnTheBattlefieldCondition(filter2, CountType.MORE_THAN, 1), rule2); Ability ability2 = new ConditionalTriggeredAbility(
ability2.addTarget(new TargetPermanent(filter3)); new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), true),
new PermanentsOnTheBattlefieldCondition(filter2, CountType.MORE_THAN, 1),
rule2);
ability2.addTarget(new TargetCreaturePermanent());
this.addAbility(ability2); this.addAbility(ability2);
} }
public GwyllionHedgeMage(final GwyllionHedgeMage card) { public GwyllionHedgeMage(final GwyllionHedgeMage card) {

View file

@ -28,14 +28,13 @@
package mage.sets.odyssey; package mage.sets.odyssey;
import java.util.UUID; import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.PreventAllDamageByAllEffect; import mage.abilities.effects.common.PreventAllDamageByAllEffect;
import mage.abilities.keyword.FlashbackAbility; import mage.abilities.keyword.FlashbackAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TimingRule; import mage.constants.TimingRule;
/** /**
@ -48,9 +47,9 @@ public class MomentsPeace extends CardImpl {
super(ownerId, 251, "Moment's Peace", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); super(ownerId, 251, "Moment's Peace", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
this.expansionSetCode = "ODY"; this.expansionSetCode = "ODY";
// Prevent all combat damage that would be dealt this turn. // Prevent all combat damage that would be dealt this turn.
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true)); this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
// Flashback {2}{G} // Flashback {2}{G}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}"), TimingRule.INSTANT)); this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}"), TimingRule.INSTANT));
} }