From e74c10289e9ea5124a6c18b0f3cd0904dea5529b Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 30 Jan 2015 20:03:22 +0100 Subject: [PATCH] * Dash - Fixed that the return effect did also return the creature it it was already recast before end of turn. --- Mage.Client/serverlist.txt | 7 ++++--- ...eBeginOfNextEndStepDelayedTriggeredAbility.java | 14 +++++++++++++- Mage/src/mage/abilities/keyword/DashAbility.java | 7 ++++++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Mage.Client/serverlist.txt b/Mage.Client/serverlist.txt index 5bda14f524..1a756c1784 100644 --- a/Mage.Client/serverlist.txt +++ b/Mage.Client/serverlist.txt @@ -1,5 +1,6 @@ woogerworks (North America):xmage.woogerworks.com:17171 -XMage.info 1 (Europe) :176.31.186.181:17171 -XMage.info 2 (Europe):176.31.186.181:17000 -Seedds Server (Asia) :115.29.203.80:17171 +XMage.info 1 (Europe) :176.31.186.181:17171 +XMage.info 2 (Europe) :176.31.186.181:17000 +Seedds Server (Asia) :115.29.203.80:17171 +Felipejoys (Brazil) :felipejoys.no-ip.org:17171 localhost -> connect to your local server (must be started):localhost:17171 diff --git a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java b/Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java index a077520d3b..333f5c1c77 100644 --- a/Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/delayed/AtTheBeginOfNextEndStepDelayedTriggeredAbility.java @@ -27,9 +27,13 @@ */ package mage.abilities.common.delayed; -import mage.constants.TargetController; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.effects.Effect; +import mage.constants.TargetController; +import static mage.constants.TargetController.ANY; +import static mage.constants.TargetController.CONTROLLER_ATTACHED_TO; +import static mage.constants.TargetController.OPPONENT; +import static mage.constants.TargetController.YOU; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -57,6 +61,14 @@ public class AtTheBeginOfNextEndStepDelayedTriggeredAbility extends DelayedTrigg this.targetController = ability.targetController; } + @Override + public void init(Game game) { + super.init(game); + for (Effect effect: this.getEffects()) { + effect.getTargetPointer().init(game, this); + } + } + @Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getType() == EventType.END_TURN_STEP_PRE) { diff --git a/Mage/src/mage/abilities/keyword/DashAbility.java b/Mage/src/mage/abilities/keyword/DashAbility.java index 9bac5970b7..678caafd4c 100644 --- a/Mage/src/mage/abilities/keyword/DashAbility.java +++ b/Mage/src/mage/abilities/keyword/DashAbility.java @@ -43,8 +43,10 @@ import mage.abilities.costs.Cost; import mage.abilities.costs.Costs; import mage.abilities.costs.CostsImpl; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect; import mage.cards.Card; import mage.constants.Duration; @@ -52,6 +54,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; +import mage.target.targetpointer.FixedTarget; /** * @@ -74,7 +77,9 @@ public class DashAbility extends StaticAbility implements AlternativeSourceCosts Ability ability = new EntersBattlefieldAbility( new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom, false), DashedCondition.getInstance(), false, "",""); - ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnToHandSourceEffect(true)), false)); + Effect effect = new ReturnToHandTargetEffect(); + effect.setTargetPointer(new FixedTarget(card.getId())); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), false)); card.addAbility(ability); }