mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Dash - Fixed that the return effect did also return the creature it it was already recast before end of turn.
This commit is contained in:
parent
861a1614c4
commit
e74c10289e
3 changed files with 23 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
||||||
woogerworks (North America):xmage.woogerworks.com:17171
|
woogerworks (North America):xmage.woogerworks.com:17171
|
||||||
XMage.info 1 (Europe) :176.31.186.181:17171
|
XMage.info 1 (Europe) :176.31.186.181:17171
|
||||||
XMage.info 2 (Europe):176.31.186.181:17000
|
XMage.info 2 (Europe) :176.31.186.181:17000
|
||||||
Seedds Server (Asia) :115.29.203.80:17171
|
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
|
localhost -> connect to your local server (must be started):localhost:17171
|
||||||
|
|
|
@ -27,9 +27,13 @@
|
||||||
*/
|
*/
|
||||||
package mage.abilities.common.delayed;
|
package mage.abilities.common.delayed;
|
||||||
|
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.abilities.DelayedTriggeredAbility;
|
import mage.abilities.DelayedTriggeredAbility;
|
||||||
import mage.abilities.effects.Effect;
|
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.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -57,6 +61,14 @@ public class AtTheBeginOfNextEndStepDelayedTriggeredAbility extends DelayedTrigg
|
||||||
this.targetController = ability.targetController;
|
this.targetController = ability.targetController;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(Game game) {
|
||||||
|
super.init(game);
|
||||||
|
for (Effect effect: this.getEffects()) {
|
||||||
|
effect.getTargetPointer().init(game, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == EventType.END_TURN_STEP_PRE) {
|
if (event.getType() == EventType.END_TURN_STEP_PRE) {
|
||||||
|
|
|
@ -43,8 +43,10 @@ import mage.abilities.costs.Cost;
|
||||||
import mage.abilities.costs.Costs;
|
import mage.abilities.costs.Costs;
|
||||||
import mage.abilities.costs.CostsImpl;
|
import mage.abilities.costs.CostsImpl;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
@ -52,6 +54,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -74,7 +77,9 @@ public class DashAbility extends StaticAbility implements AlternativeSourceCosts
|
||||||
Ability ability = new EntersBattlefieldAbility(
|
Ability ability = new EntersBattlefieldAbility(
|
||||||
new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom, false),
|
new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom, false),
|
||||||
DashedCondition.getInstance(), 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);
|
card.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue