From 6c59cc496136333d7db9028cf7d0dc9f1fe6a0ea Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 20 Jul 2013 10:14:59 +0200 Subject: [PATCH] * Tenacious Dead - Fixed that it didn't came back from graveyard tapped. --- .../src/mage/sets/magic2014/TenaciousDead.java | 2 +- ...BattlefieldUnderOwnerControlSourceEffect.java | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java b/Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java index 1e9064f5531..81137016f2a 100644 --- a/Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java +++ b/Mage.Sets/src/mage/sets/magic2014/TenaciousDead.java @@ -55,7 +55,7 @@ public class TenaciousDead extends CardImpl { this.toughness = new MageInt(1); // When Tenacious Dead dies, you may pay {1}{B}. If you do, return it to the battlefield tapped under its owner's control. - Effect effect = new DoIfCostPaid(new ReturnToBattlefieldUnderOwnerControlSourceEffect(), new ManaCostsImpl("{1}{B}")); + Effect effect = new DoIfCostPaid(new ReturnToBattlefieldUnderOwnerControlSourceEffect(true), new ManaCostsImpl("{1}{B}")); this.addAbility(new DiesTriggeredAbility(effect, false)); } diff --git a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java b/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java index 8713e1f15aa..0a7816696ec 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnToBattlefieldUnderOwnerControlSourceEffect.java @@ -28,11 +28,11 @@ package mage.abilities.effects.common; -import mage.constants.Outcome; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; +import mage.constants.Outcome; +import mage.constants.Zone; import mage.game.Game; /** @@ -41,13 +41,21 @@ import mage.game.Game; */ public class ReturnToBattlefieldUnderOwnerControlSourceEffect extends OneShotEffect { + private boolean tapped; + public ReturnToBattlefieldUnderOwnerControlSourceEffect() { + this(false); + } + + public ReturnToBattlefieldUnderOwnerControlSourceEffect(boolean tapped) { super(Outcome.Benefit); - staticText = "return that card to the battlefield under it's owner's control"; + this.tapped = tapped; + staticText = new StringBuilder("return that card to the battlefield").append(tapped?" tapped":"").append(" under it's owner's control").toString(); } public ReturnToBattlefieldUnderOwnerControlSourceEffect(final ReturnToBattlefieldUnderOwnerControlSourceEffect effect) { super(effect); + this.tapped = effect.tapped; } @Override @@ -60,7 +68,7 @@ public class ReturnToBattlefieldUnderOwnerControlSourceEffect extends OneShotEff Card card = game.getCard(source.getSourceId()); if (card != null) { Zone currentZone = game.getState().getZone(card.getId()); - if (card.putOntoBattlefield(game, currentZone, source.getSourceId(), card.getOwnerId())) { + if (card.putOntoBattlefield(game, currentZone, source.getSourceId(), card.getOwnerId(),tapped)) { return true; } }