diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MarkOfTheOni.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MarkOfTheOni.java index 1b19df093a8..2107b744598 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MarkOfTheOni.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MarkOfTheOni.java @@ -36,7 +36,9 @@ import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.ControlsPermanentCondition; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.continious.ControlEnchantedEffect; @@ -54,6 +56,10 @@ import mage.target.common.TargetCreaturePermanent; * @author LevelX2 */ public class MarkOfTheOni extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("if you control no Demons"); + static { + filter.add(new SubtypePredicate("Demon")); + } public MarkOfTheOni(UUID ownerId) { super(ownerId, 73, "Mark of the Oni", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); @@ -72,8 +78,11 @@ public class MarkOfTheOni extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); // At the beginning of the end step, if you control no Demons, sacrifice Mark of the Oni. - this.addAbility(new MarkOfTheOniTriggeredAbility()); - + this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, + new SacrificeSourceEffect(), + Constants.TargetController.ANY, + new ControlsPermanentCondition(filter, ControlsPermanentCondition.CountType.FEWER_THAN, 1), + false)); } public MarkOfTheOni(final MarkOfTheOni card) { @@ -84,37 +93,4 @@ public class MarkOfTheOni extends CardImpl { public MarkOfTheOni copy() { return new MarkOfTheOni(this); } - - private class MarkOfTheOniTriggeredAbility extends TriggeredAbilityImpl { - MarkOfTheOniTriggeredAbility() { - super(Constants.Zone.BATTLEFIELD, new SacrificeSourceEffect()); - } - - MarkOfTheOniTriggeredAbility(final MarkOfTheOniTriggeredAbility ability) { - super(ability); - } - - @Override - public MarkOfTheOniTriggeredAbility copy() { - return new MarkOfTheOniTriggeredAbility(this); - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.END_TURN_STEP_PRE) { - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new SubtypePredicate("Demon")); - if (!game.getBattlefield().contains(filter, controllerId, 1, game)) { - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "At the beginning of the end step, if you control no Demons, sacrifice {this}."; - } - } } - diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SamuraiOfThePaleCurtain.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SamuraiOfThePaleCurtain.java index 74814bc73a9..005353f2a16 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SamuraiOfThePaleCurtain.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SamuraiOfThePaleCurtain.java @@ -57,9 +57,10 @@ public class SamuraiOfThePaleCurtain extends CardImpl { this.expansionSetCode = "CHK"; this.subtype.add("Fox"); this.subtype.add("Samurai"); - this.color.setWhite(true); + this.color.setWhite(true); this.power = new MageInt(2); this.toughness = new MageInt(2); + // Bushido 1 (When this blocks or becomes blocked, it gets +1/+1 until end of turn.) this.addAbility(new BushidoAbility(1)); // If a permanent would be put into a graveyard, exile it instead. @@ -82,7 +83,7 @@ public class SamuraiOfThePaleCurtain extends CardImpl { class SamuraiOfThePaleCurtainEffect extends ReplacementEffectImpl { public SamuraiOfThePaleCurtainEffect() { - super(Duration.EndOfTurn, Outcome.Exile); + super(Duration.WhileOnBattlefield, Outcome.Exile); staticText = "If a permanent would be put into a graveyard, exile it instead"; } @@ -102,16 +103,16 @@ class SamuraiOfThePaleCurtainEffect extends ReplacementEffectImpl