From 1d7ffa16d4803e5fc9bab4d12c09138f2205c15f Mon Sep 17 00:00:00 2001 From: spjspj Date: Sun, 20 Aug 2017 17:18:17 +1000 Subject: [PATCH] Slight fix for Karador and Gisa and Geralf --- Mage.Sets/src/mage/cards/g/GisaAndGeralf.java | 11 +++++++---- .../src/mage/cards/k/KaradorGhostChieftain.java | 13 ++++++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java index a4a95ffd253..1aec0799de4 100644 --- a/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java +++ b/Mage.Sets/src/mage/cards/g/GisaAndGeralf.java @@ -57,7 +57,7 @@ import java.util.UUID; public class GisaAndGeralf extends CardImpl { public GisaAndGeralf(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); addSuperType(SuperType.LEGENDARY); this.subtype.add("Human"); this.subtype.add("Wizard"); @@ -107,6 +107,9 @@ class GisaAndGeralfContinuousEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { + if (!game.getActivePlayerId().equals(player.getId())) { + return false; + } for (Card card : player.getGraveyard().getCards(filter, game)) { ContinuousEffect effect = new GisaAndGeralfCastFromGraveyardEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); @@ -166,10 +169,10 @@ class GisaAndGeralfWatcher extends Watcher { @Override public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { + if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { Spell spell = (Spell) game.getObject(event.getTargetId()); if (spell.isCreature() && spell.hasSubtype(SubType.ZOMBIE, game)) { - abilityUsed = true; + abilityUsed = true; } } } @@ -188,4 +191,4 @@ class GisaAndGeralfWatcher extends Watcher { public boolean isAbilityUsed() { return abilityUsed; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java index 8e4f81cd3b3..7a6debe6f3e 100644 --- a/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java +++ b/Mage.Sets/src/mage/cards/k/KaradorGhostChieftain.java @@ -56,7 +56,7 @@ import mage.watchers.Watcher; public class KaradorGhostChieftain extends CardImpl { public KaradorGhostChieftain(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{G}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add("Centaur"); this.subtype.add("Spirit"); @@ -66,7 +66,7 @@ public class KaradorGhostChieftain extends CardImpl { // Karador, Ghost Chieftain costs {1} less to cast for each creature card in your graveyard. this.addAbility(new SimpleStaticAbility(Zone.STACK, new KaradorGhostChieftainCostReductionEffect())); - + // During each of your turns, you may cast one creature card from your graveyard. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KaradorGhostChieftainContinuousEffect()), new KaradorGhostChieftainWatcher()); } @@ -137,6 +137,9 @@ class KaradorGhostChieftainContinuousEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { + if (!game.getActivePlayerId().equals(player.getId())) { + return false; + } for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) { ContinuousEffect effect = new KaradorGhostChieftainCastFromGraveyardEffect(); effect.setTargetPointer(new FixedTarget(card.getId())); @@ -196,10 +199,10 @@ class KaradorGhostChieftainWatcher extends Watcher { @Override public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { + if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone() == Zone.GRAVEYARD) { Spell spell = (Spell) game.getObject(event.getTargetId()); if (spell.isCreature()) { - abilityUsed = true; + abilityUsed = true; } } } @@ -218,4 +221,4 @@ class KaradorGhostChieftainWatcher extends Watcher { public boolean isAbilityUsed() { return abilityUsed; } -} \ No newline at end of file +}