From 40d1ea8da1c5d69ded8ec2613a064a96b4f69bc7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 27 May 2013 12:55:11 +0200 Subject: [PATCH] [minor] fixes to handling of auras going to battlefield from library or graveyard. --- .../src/mage/sets/darkascension/CurseOfMisfortunes.java | 1 + Mage.Sets/src/mage/sets/innistrad/BitterheartWitch.java | 1 + Mage.Sets/src/mage/sets/magic2012/ArachnusSpinner.java | 3 +++ Mage/src/mage/abilities/effects/AuraReplacementEffect.java | 5 +++++ 4 files changed, 10 insertions(+) diff --git a/Mage.Sets/src/mage/sets/darkascension/CurseOfMisfortunes.java b/Mage.Sets/src/mage/sets/darkascension/CurseOfMisfortunes.java index 5549efcb57..a9ec0f04c9 100644 --- a/Mage.Sets/src/mage/sets/darkascension/CurseOfMisfortunes.java +++ b/Mage.Sets/src/mage/sets/darkascension/CurseOfMisfortunes.java @@ -118,6 +118,7 @@ class CurseOfMisfortunesEffect extends OneShotEffect { Card card = game.getCard(targetCard.getFirstTarget()); if (card != null) { this.setTargetPointer(new FixedTarget(targetPlayer.getId())); + game.getState().setValue("attachTo:" + card.getId(), targetPlayer.getId()); player.shuffleLibrary(game); return card.putOntoBattlefield(game, Constants.Zone.LIBRARY, source.getId(), source.getControllerId()); } diff --git a/Mage.Sets/src/mage/sets/innistrad/BitterheartWitch.java b/Mage.Sets/src/mage/sets/innistrad/BitterheartWitch.java index fe0072d0bc..93e6aeb337 100644 --- a/Mage.Sets/src/mage/sets/innistrad/BitterheartWitch.java +++ b/Mage.Sets/src/mage/sets/innistrad/BitterheartWitch.java @@ -109,6 +109,7 @@ class BitterheartWitchEffect extends OneShotEffect { if (player.searchLibrary(targetCard, game)) { Card card = game.getCard(targetCard.getFirstTarget()); if (card != null) { + game.getState().setValue("attachTo:" + card.getId(), targetPlayer.getId()); card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId()); targetPlayer.addAttachment(card.getId(), game); } diff --git a/Mage.Sets/src/mage/sets/magic2012/ArachnusSpinner.java b/Mage.Sets/src/mage/sets/magic2012/ArachnusSpinner.java index 5cedfb214e..b8ad26dd5b 100644 --- a/Mage.Sets/src/mage/sets/magic2012/ArachnusSpinner.java +++ b/Mage.Sets/src/mage/sets/magic2012/ArachnusSpinner.java @@ -76,7 +76,9 @@ public class ArachnusSpinner extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(7); + // Reach (This creature can block creatures with flying.) this.addAbility(ReachAbility.getInstance()); + // Tap an untapped Spider you control: Search your graveyard and/or library for a card named Arachnus Web and put it onto the battlefield attached to target creature. If you search your library this way, shuffle it. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ArachnusSpinnerEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))); @@ -144,6 +146,7 @@ class ArachnusSpinnerEffect extends OneShotEffect { if (card != null) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { + game.getState().setValue("attachTo:" + card.getId(), permanent.getId()); card.putOntoBattlefield(game, zone, source.getSourceId(), source.getControllerId()); return permanent.addAttachment(card.getId(), game); } diff --git a/Mage/src/mage/abilities/effects/AuraReplacementEffect.java b/Mage/src/mage/abilities/effects/AuraReplacementEffect.java index f4613b5904..a87d6afe79 100644 --- a/Mage/src/mage/abilities/effects/AuraReplacementEffect.java +++ b/Mage/src/mage/abilities/effects/AuraReplacementEffect.java @@ -46,6 +46,11 @@ import mage.target.Target; import java.util.UUID; /** + * Cards with the Aura subtype don't change the zone they are in, if there is no + * valid target on the battlefield. Also, when entering the Battlefield and it + * was not cast, this effect gets the target to witch to attach it. + * + * This effect is automatically added to ContinuousEffects at the start of a game * * @author North */