mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -64,7 +63,7 @@ import mage.target.common.TargetOpponent;
|
|||
public class ObzedatGhostCouncil extends CardImpl {
|
||||
|
||||
public ObzedatGhostCouncil(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}{B}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}{B}{B}");
|
||||
this.subtype.add("Spirit");
|
||||
this.subtype.add("Advisor");
|
||||
this.supertype.add("Legendary");
|
||||
|
@ -175,14 +174,15 @@ class ObzedatGhostCouncilReturnEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null) {
|
||||
ExileZone currentZone = game.getState().getExile().getExileZone(source.getSourceId());
|
||||
// return it only from the own exile zone
|
||||
if (currentZone != null && currentZone.size() > 0) {
|
||||
Zone zone = game.getState().getZone(source.getSourceId());
|
||||
// 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 (!zone.equals(Zone.BATTLEFIELD) && !zone.equals(Zone.LIBRARY) && !zone.equals(Zone.HAND)) {
|
||||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
if (owner != null && owner.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
return true;
|
||||
if (owner != null) {
|
||||
owner.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ import mage.target.targetpointer.FixedTargets;
|
|||
public class Seance extends CardImpl {
|
||||
|
||||
public Seance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
||||
|
||||
// At the beginning of each upkeep, you may exile target creature card from your graveyard. If you do, create a token that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new SeanceEffect(), TargetController.ANY, true);
|
||||
|
@ -95,16 +95,15 @@ class SeanceEffect extends OneShotEffect {
|
|||
Card card = game.getCard(source.getFirstTarget());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null && card != null) {
|
||||
if (controller.moveCards(card, Zone.EXILED, source, game)) {
|
||||
PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(source.getControllerId(), null, false);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
effect.setAdditionalSubType("Spirit");
|
||||
effect.apply(game, source);
|
||||
ExileTargetEffect exileEffect = new ExileTargetEffect();
|
||||
exileEffect.setTargetPointer(new FixedTargets(effect.getAddedPermanent(), game));
|
||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||
}
|
||||
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);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
effect.setAdditionalSubType("Spirit");
|
||||
effect.apply(game, source);
|
||||
ExileTargetEffect exileEffect = new ExileTargetEffect();
|
||||
exileEffect.setTargetPointer(new FixedTargets(effect.getAddedPermanent(), game));
|
||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect);
|
||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue