diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/GhostlyPrison.java b/Mage.Sets/src/mage/sets/championsofkamigawa/GhostlyPrison.java index 594679f9d9d..be23c5977ff 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/GhostlyPrison.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/GhostlyPrison.java @@ -50,6 +50,8 @@ public class GhostlyPrison extends CardImpl { super(ownerId, 10, "Ghostly Prison", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); this.expansionSetCode = "CHK"; this.color.setWhite(true); + + // Creatures can't attack you unless their controller pays {2} for each creature he or she controls that's attacking you this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GhostlyPrisonReplacementEffect())); } @@ -87,10 +89,10 @@ class GhostlyPrisonReplacementEffect extends ReplacementEffectImpl { if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER) { Player player = game.getPlayer(event.getPlayerId()); if ( player != null && event.getTargetId().equals(source.getControllerId())) { - ManaCostsImpl propagandaTax = new ManaCostsImpl("{2}"); - if ( propagandaTax.canPay(source.getSourceId(), event.getPlayerId(), game) && - player.chooseUse(Outcome.Benefit, "Pay {2} to declare attacker?", game) ) { - if (propagandaTax.payOrRollback(source, game, this.getId(), event.getPlayerId())) { + ManaCostsImpl attackTax = new ManaCostsImpl("{2}"); + if ( attackTax.canPay(source.getSourceId(), event.getPlayerId(), game) && + player.chooseUse(Outcome.Benefit, "Pay {2} to attack player?", game) ) { + if (attackTax.payOrRollback(source, game, this.getId(), event.getPlayerId())) { return false; } } @@ -103,7 +105,11 @@ class GhostlyPrisonReplacementEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER && event.getTargetId().equals(source.getControllerId()) ) { - return true; + Player attackedPlayer = game.getPlayer(event.getTargetId()); + if (attackedPlayer != null) { + // only if a player is attacked. Attacking a planeswalker is free + return true; + } } return false; } diff --git a/Mage.Sets/src/mage/sets/tempest/Propaganda.java b/Mage.Sets/src/mage/sets/tempest/Propaganda.java index 0fc3fef66c5..9c99525e51b 100644 --- a/Mage.Sets/src/mage/sets/tempest/Propaganda.java +++ b/Mage.Sets/src/mage/sets/tempest/Propaganda.java @@ -89,11 +89,11 @@ class PropagandaReplacementEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player player = game.getPlayer(event.getPlayerId()); if ( player != null ) { - ManaCostsImpl propagandaTax = new ManaCostsImpl("{2}"); - if ( propagandaTax.canPay(source.getSourceId(), event.getPlayerId(), game) && - player.chooseUse(Outcome.Neutral, "Pay {2} to declare attacker?", game) ) + ManaCostsImpl attackTax = new ManaCostsImpl("{2}"); + if ( attackTax.canPay(source.getSourceId(), event.getPlayerId(), game) && + player.chooseUse(Outcome.Neutral, "Pay {2} to attack player?", game) ) { - if (propagandaTax.payOrRollback(source, game, source.getSourceId(), event.getPlayerId()) ) { + if (attackTax.payOrRollback(source, game, source.getSourceId(), event.getPlayerId()) ) { return false; } } @@ -105,7 +105,11 @@ class PropagandaReplacementEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER && event.getTargetId().equals(source.getControllerId())) { - return true; + Player attackedPlayer = game.getPlayer(event.getTargetId()); + if (attackedPlayer != null) { + // only if a player is attacked. Attacking a planeswalker is free + return true; + } } return false; } diff --git a/Mage.Sets/src/mage/sets/tenth/WindbornMuse.java b/Mage.Sets/src/mage/sets/tenth/WindbornMuse.java index 61f3b59696e..83303e186d7 100644 --- a/Mage.Sets/src/mage/sets/tenth/WindbornMuse.java +++ b/Mage.Sets/src/mage/sets/tenth/WindbornMuse.java @@ -54,9 +54,12 @@ public class WindbornMuse extends CardImpl { this.color.setWhite(true); this.power = new MageInt(2); this.toughness = new MageInt(3); + + // Flying this.addAbility(FlyingAbility.getInstance()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new WindbornMuseReplacementEffect())); // Creatures can't attack you unless their controller pays {2} for each creature he or she controls that's attacking you. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new WindbornMuseReplacementEffect())); + } public WindbornMuse(final WindbornMuse card) { @@ -92,11 +95,11 @@ class WindbornMuseReplacementEffect extends ReplacementEffectImpl { if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER) { Player player = game.getPlayer(event.getPlayerId()); if ( player != null && event.getTargetId().equals(source.getControllerId())) { - ManaCostsImpl propagandaTax = new ManaCostsImpl("{2}"); - if ( propagandaTax.canPay(source.getSourceId(), event.getPlayerId(), game) && - player.chooseUse(Outcome.Benefit, "Pay {2} to declare attacker?", game) ) + ManaCostsImpl attackTax = new ManaCostsImpl("{2}"); + if ( attackTax.canPay(source.getSourceId(), event.getPlayerId(), game) && + player.chooseUse(Outcome.Benefit, "Pay {2} to attack player?", game) ) { - if (propagandaTax.payOrRollback(source, game, this.getId(), event.getPlayerId())) { + if (attackTax.payOrRollback(source, game, this.getId(), event.getPlayerId())) { return false; } } @@ -109,7 +112,11 @@ class WindbornMuseReplacementEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER && event.getTargetId().equals(source.getControllerId()) ) { - return true; + Player attackedPlayer = game.getPlayer(event.getTargetId()); + if (attackedPlayer != null) { + // only if a player is attacked. Attacking a planeswalker is free + return true; + } } return false; } diff --git a/Mage.Sets/src/mage/sets/visions/ElephantGrass.java b/Mage.Sets/src/mage/sets/visions/ElephantGrass.java index d32dbebf7d2..908b8e174cc 100644 --- a/Mage.Sets/src/mage/sets/visions/ElephantGrass.java +++ b/Mage.Sets/src/mage/sets/visions/ElephantGrass.java @@ -133,10 +133,10 @@ class ElephantGrassReplacementEffect2 extends ReplacementEffectImpl { if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER) { Player player = game.getPlayer(event.getPlayerId()); if ( player != null && event.getTargetId().equals(source.getControllerId())) { - ManaCostsImpl cost = new ManaCostsImpl("{2}"); - if ( cost.canPay(source.getSourceId(), event.getPlayerId(), game) && - player.chooseUse(Outcome.Benefit, "Pay {2} to declare attacker?", game) ) { - if (cost.payOrRollback(source, game, this.getId(), event.getPlayerId())) { + ManaCostsImpl attackCost = new ManaCostsImpl("{2}"); + if ( attackCost.canPay(source.getSourceId(), event.getPlayerId(), game) && + player.chooseUse(Outcome.Benefit, "Pay {2} to attack player?", game) ) { + if (attackCost.payOrRollback(source, game, this.getId(), event.getPlayerId())) { return false; } } @@ -150,8 +150,12 @@ class ElephantGrassReplacementEffect2 extends ReplacementEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER && event.getTargetId().equals(source.getControllerId()) ) { Permanent creature = game.getPermanent(event.getSourceId()); - if(creature != null && !creature.getColor().isBlack()){ - return true; + if (creature != null && !creature.getColor().isBlack()) { + Player attackedPlayer = game.getPlayer(event.getTargetId()); + if (attackedPlayer != null) { + // only if a player is attacked. Attacking a planeswalker is free + return true; + } } } return false; @@ -162,4 +166,4 @@ class ElephantGrassReplacementEffect2 extends ReplacementEffectImpl { return new ElephantGrassReplacementEffect2(this); } -} \ No newline at end of file +}