mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Deadeye Navigator - Fixed that the return effect was always done independant from zone changes that happended.
This commit is contained in:
parent
7bb2bbe1fa
commit
a3a21fd073
3 changed files with 9 additions and 4 deletions
|
@ -64,7 +64,7 @@ public class DeadeyeNavigator extends CardImpl {
|
|||
|
||||
// As long as Deadeye Navigator is paired with another creature, each of those creatures has "{1}{U}: Exile this creature, then return it to the battlefield under your control."
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(Zone.BATTLEFIELD), new ManaCostsImpl("{1}{U}"));
|
||||
ability.addEffect(new ReturnToBattlefieldUnderYourControlSourceEffect());
|
||||
ability.addEffect(new ReturnToBattlefieldUnderYourControlSourceEffect(Zone.EXILED));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityPairedEffect(ability, ruleText)));
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ class TatsumaTheDragonsFangTriggeredAbility extends DelayedTriggeredAbility {
|
|||
protected FixedTarget fixedTarget;
|
||||
|
||||
public TatsumaTheDragonsFangTriggeredAbility(FixedTarget fixedTarget) {
|
||||
super(new ReturnToBattlefieldUnderYourControlSourceEffect(), Duration.OneUse);
|
||||
super(new ReturnToBattlefieldUnderYourControlSourceEffect(Zone.EXILED), Duration.OneUse);
|
||||
this.fixedTarget = fixedTarget;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -41,13 +42,16 @@ import mage.game.Game;
|
|||
*/
|
||||
public class ReturnToBattlefieldUnderYourControlSourceEffect extends OneShotEffect {
|
||||
|
||||
public ReturnToBattlefieldUnderYourControlSourceEffect() {
|
||||
private final Zone onlyFromZone;
|
||||
public ReturnToBattlefieldUnderYourControlSourceEffect(Zone fromZone) {
|
||||
super(Outcome.Benefit);
|
||||
this.onlyFromZone = fromZone;
|
||||
staticText = "return that card to the battlefield under your control";
|
||||
}
|
||||
|
||||
public ReturnToBattlefieldUnderYourControlSourceEffect(final ReturnToBattlefieldUnderYourControlSourceEffect effect) {
|
||||
super(effect);
|
||||
this.onlyFromZone = effect.onlyFromZone;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,8 +61,9 @@ public class ReturnToBattlefieldUnderYourControlSourceEffect extends OneShotEffe
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObjectReference mor = new MageObjectReference(source.getSourceObject(game));
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null) {
|
||||
if (card != null && game.getState().getZone(source.getSourceId()) == onlyFromZone && mor.getZoneChangeCounter() == card.getZoneChangeCounter() + 1) {
|
||||
Zone currentZone = game.getState().getZone(card.getId());
|
||||
if (card.putOntoBattlefield(game, currentZone, source.getSourceId(), source.getControllerId())) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue