mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
* Obzedat, Ghost Council & Séance - Fixed problems that the effects did nor work correctly if the move to exile was replaced (e.g. when a commander goes to command zone instead).
This commit is contained in:
parent
f276236f34
commit
c4ec832717
2 changed files with 17 additions and 18 deletions
|
@ -49,7 +49,6 @@ import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.ExileZone;
|
|
||||||
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;
|
||||||
|
@ -175,15 +174,16 @@ class ObzedatGhostCouncilReturnEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Card card = game.getCard(source.getSourceId());
|
Card card = game.getCard(source.getSourceId());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
ExileZone currentZone = game.getState().getExile().getExileZone(source.getSourceId());
|
Zone zone = game.getState().getZone(source.getSourceId());
|
||||||
// return it only from the own exile zone
|
// return it from every public zone - http://www.mtgsalvation.com/forums/magic-fundamentals/magic-rulings/magic-rulings-archives/513186-obzedat-gc-as-edh-commander
|
||||||
if (currentZone != null && currentZone.size() > 0) {
|
if (!zone.equals(Zone.BATTLEFIELD) && !zone.equals(Zone.LIBRARY) && !zone.equals(Zone.HAND)) {
|
||||||
Player owner = game.getPlayer(card.getOwnerId());
|
Player owner = game.getPlayer(card.getOwnerId());
|
||||||
if (owner != null && owner.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
if (owner != null) {
|
||||||
|
owner.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ class SeanceEffect extends OneShotEffect {
|
||||||
Card card = game.getCard(source.getFirstTarget());
|
Card card = game.getCard(source.getFirstTarget());
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null && card != null) {
|
if (controller != null && card != null) {
|
||||||
if (controller.moveCards(card, Zone.EXILED, source, game)) {
|
controller.moveCards(card, Zone.EXILED, source, game); // Also if the move to exile is replaced, the copy takes place
|
||||||
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false);
|
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false);
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||||
effect.setAdditionalSubType("Spirit");
|
effect.setAdditionalSubType("Spirit");
|
||||||
|
@ -104,7 +104,6 @@ class SeanceEffect extends OneShotEffect {
|
||||||
exileEffect.setTargetPointer(new FixedTargets(effect.getAddedPermanent(), game));
|
exileEffect.setTargetPointer(new FixedTargets(effect.getAddedPermanent(), game));
|
||||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue