From 2e625cc5a56abf43a97cf689e59ed54290afe78d Mon Sep 17 00:00:00 2001 From: Jeff Wadsworth Date: Tue, 19 Oct 2021 15:33:37 -0500 Subject: [PATCH] - refactoring related to #8375 "C" cards --- Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java | 2 +- Mage.Sets/src/mage/cards/c/CaptivatingGlance.java | 4 ++-- Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java | 2 +- Mage.Sets/src/mage/cards/c/CemeteryPuca.java | 2 +- Mage.Sets/src/mage/cards/c/ChainOfAcid.java | 2 +- Mage.Sets/src/mage/cards/c/ChainOfSmog.java | 2 +- Mage.Sets/src/mage/cards/c/ChainStasis.java | 2 +- Mage.Sets/src/mage/cards/c/ChandraPyromaster.java | 2 +- Mage.Sets/src/mage/cards/c/ChemistersTrick.java | 2 +- Mage.Sets/src/mage/cards/c/CircleOfFlame.java | 2 +- Mage.Sets/src/mage/cards/c/Clockspinning.java | 8 ++++---- Mage.Sets/src/mage/cards/c/CodieVociferousCodex.java | 2 +- Mage.Sets/src/mage/cards/c/CommuneWithLava.java | 2 +- Mage.Sets/src/mage/cards/c/Contempt.java | 2 +- Mage.Sets/src/mage/cards/c/Cowardice.java | 2 +- Mage.Sets/src/mage/cards/c/CragSaurian.java | 2 +- Mage.Sets/src/mage/cards/c/CrashingBoars.java | 2 +- Mage.Sets/src/mage/cards/c/CrownOfDoom.java | 2 +- Mage.Sets/src/mage/cards/c/CrownOfEmpires.java | 2 +- Mage.Sets/src/mage/cards/c/Crystallization.java | 2 +- Mage.Sets/src/mage/cards/c/CunningAbduction.java | 2 +- Mage.Sets/src/mage/cards/c/CurseOfPredation.java | 2 +- Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java | 2 +- Mage.Sets/src/mage/cards/c/CurseOfVengeance.java | 2 +- Mage.Sets/src/mage/cards/c/CustodyBattle.java | 2 +- 25 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java b/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java index 6a10b85f2b..e934e95d45 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java @@ -119,7 +119,7 @@ enum CallerOfTheHuntAdjuster implements CostAdjuster { effectPowerToughness.setText(""); SimpleStaticAbility setPT = new SimpleStaticAbility(Zone.ALL, effectPowerToughness); GainAbilityTargetEffect gainAbility = new GainAbilityTargetEffect(setPT, Duration.EndOfGame); - gainAbility.setTargetPointer(new FixedTarget(ability.getSourceId())); + gainAbility.setTargetPointer(new FixedTarget(ability.getSourceId(), game)); game.getState().addEffect(gainAbility, ability); } } diff --git a/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java b/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java index 47f67f6288..ee5e78824e 100644 --- a/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java +++ b/Mage.Sets/src/mage/cards/c/CaptivatingGlance.java @@ -84,13 +84,13 @@ class CaptivatingGlanceEffect extends OneShotEffect { if (enchantedCreature != null) { if (clashResult) { ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, false, controller.getId()); - effect.setTargetPointer(new FixedTarget(enchantedCreature.getId())); + effect.setTargetPointer(new FixedTarget(enchantedCreature.getId(), game)); game.addEffect(effect, source); } else { Player opponentWhomControllerClashedWith = game.getPlayer(targetPointer.getFirst(game, source)); if (opponentWhomControllerClashedWith != null) { ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, false, opponentWhomControllerClashedWith.getId()); - effect.setTargetPointer(new FixedTarget(enchantedCreature.getId())); + effect.setTargetPointer(new FixedTarget(enchantedCreature.getId(), game)); game.addEffect(effect, source); } } diff --git a/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java b/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java index 74459fda0d..eb2acc631d 100644 --- a/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java +++ b/Mage.Sets/src/mage/cards/c/CapturedByTheConsulate.java @@ -113,7 +113,7 @@ class CapturedByTheConsulateTriggeredAbility extends TriggeredAbilityImpl { @Override public String getTriggerPhrase() { - return "Whenever an opponent casts a spell, if it has a single target, " ; + return "Whenever an opponent casts a spell, if it has a single target, "; } @Override diff --git a/Mage.Sets/src/mage/cards/c/CemeteryPuca.java b/Mage.Sets/src/mage/cards/c/CemeteryPuca.java index ebd596616a..9dfe871c04 100644 --- a/Mage.Sets/src/mage/cards/c/CemeteryPuca.java +++ b/Mage.Sets/src/mage/cards/c/CemeteryPuca.java @@ -73,7 +73,7 @@ class CemeteryPucaEffect extends OneShotEffect { if (copyFromCreature != null) { game.copyPermanent(Duration.WhileOnBattlefield, copyFromCreature, copyToCreature.getId(), source, new EmptyCopyApplier()); ContinuousEffect effect = new GainAbilityTargetEffect(new DiesCreatureTriggeredAbility(new DoIfCostPaid(new CemeteryPucaEffect(), new ManaCostsImpl("{1}")), false, new FilterCreaturePermanent("a creature"), true), Duration.WhileOnBattlefield); - effect.setTargetPointer(new FixedTarget(copyToCreature.getId())); + effect.setTargetPointer(new FixedTarget(copyToCreature.getId(), game)); game.addEffect(effect, source); return true; } diff --git a/Mage.Sets/src/mage/cards/c/ChainOfAcid.java b/Mage.Sets/src/mage/cards/c/ChainOfAcid.java index 30383dc46d..d71b8c3b7c 100644 --- a/Mage.Sets/src/mage/cards/c/ChainOfAcid.java +++ b/Mage.Sets/src/mage/cards/c/ChainOfAcid.java @@ -75,7 +75,7 @@ class ChainOfAcidEffect extends OneShotEffect { Player affectedPlayer = game.getPlayer(permanent.getControllerId()); if (affectedPlayer != null) { Effect effect = new DestroyTargetEffect(); - effect.setTargetPointer(new FixedTarget(targetId)); + effect.setTargetPointer(new FixedTarget(targetId, game)); effect.apply(game, source); if (affectedPlayer.chooseUse(Outcome.Copy, "Copy the spell?", source, game)) { Spell spell = game.getStack().getSpell(source.getSourceId()); diff --git a/Mage.Sets/src/mage/cards/c/ChainOfSmog.java b/Mage.Sets/src/mage/cards/c/ChainOfSmog.java index f30f27f454..afc499a90a 100644 --- a/Mage.Sets/src/mage/cards/c/ChainOfSmog.java +++ b/Mage.Sets/src/mage/cards/c/ChainOfSmog.java @@ -64,7 +64,7 @@ class ChainOfSmogEffect extends OneShotEffect { Player affectedPlayer = game.getPlayer(targetId); if (affectedPlayer != null) { Effect effect = new DiscardTargetEffect(2); - effect.setTargetPointer(new FixedTarget(targetId)); + effect.setTargetPointer(new FixedTarget(targetId, game)); effect.apply(game, source); if (affectedPlayer.chooseUse(Outcome.Copy, "Copy the spell?", source, game)) { Spell spell = game.getStack().getSpell(source.getSourceId()); diff --git a/Mage.Sets/src/mage/cards/c/ChainStasis.java b/Mage.Sets/src/mage/cards/c/ChainStasis.java index a16edebb9a..baeceb3c13 100644 --- a/Mage.Sets/src/mage/cards/c/ChainStasis.java +++ b/Mage.Sets/src/mage/cards/c/ChainStasis.java @@ -70,7 +70,7 @@ class ChainStasisEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { Effect effect = new MayTapOrUntapTargetEffect(); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); effect.apply(game, source); Player player = game.getPlayer(permanent.getControllerId()); if (player == null) { diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java index 48f06046a4..7ab9781e7c 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java @@ -94,7 +94,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect { if (creature != null) { creature.damage(1, source.getSourceId(), source, game, false, true); ContinuousEffect effect = new CantBlockTargetEffect(Duration.EndOfTurn); - effect.setTargetPointer(new FixedTarget(creature.getId())); + effect.setTargetPointer(new FixedTarget(creature.getId(), game)); game.addEffect(effect, source); } return true; diff --git a/Mage.Sets/src/mage/cards/c/ChemistersTrick.java b/Mage.Sets/src/mage/cards/c/ChemistersTrick.java index fcbaac6c6c..812b25bfda 100644 --- a/Mage.Sets/src/mage/cards/c/ChemistersTrick.java +++ b/Mage.Sets/src/mage/cards/c/ChemistersTrick.java @@ -66,7 +66,7 @@ class ChemistersTrickEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, source.getControllerId(), source.getSourceId(), game)) { AttacksIfAbleTargetEffect effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn); - effect.setTargetPointer(new FixedTarget(creature.getId())); + effect.setTargetPointer(new FixedTarget(creature.getId(), game)); game.addEffect(effect, source); } return true; diff --git a/Mage.Sets/src/mage/cards/c/CircleOfFlame.java b/Mage.Sets/src/mage/cards/c/CircleOfFlame.java index fa9e9fa090..28ff68ac00 100644 --- a/Mage.Sets/src/mage/cards/c/CircleOfFlame.java +++ b/Mage.Sets/src/mage/cards/c/CircleOfFlame.java @@ -80,7 +80,7 @@ class CircleOfFlameTriggeredAbility extends TriggeredAbilityImpl { } if (youOrYourPlaneswalker) { for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(attacker.getId())); + effect.setTargetPointer(new FixedTarget(attacker.getId(), game)); } return true; } diff --git a/Mage.Sets/src/mage/cards/c/Clockspinning.java b/Mage.Sets/src/mage/cards/c/Clockspinning.java index 5dcbb3b8ad..cd1771f9f8 100644 --- a/Mage.Sets/src/mage/cards/c/Clockspinning.java +++ b/Mage.Sets/src/mage/cards/c/Clockspinning.java @@ -136,14 +136,14 @@ class ClockspinningAddOrRemoveCounterEffect extends OneShotEffect { if (player != null && permanent != null) { if (player.chooseUse(Outcome.Neutral, "Remove a counter?", source, game)) { RemoveCounterTargetEffect effect = new RemoveCounterTargetEffect(); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); effect.apply(game, source); } else { Counter counter = selectCounterType(game, source, permanent); if (counter != null) { AddCountersTargetEffect effect = new AddCountersTargetEffect(counter); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); effect.apply(game, source); } } @@ -155,13 +155,13 @@ class ClockspinningAddOrRemoveCounterEffect extends OneShotEffect { if (player.chooseUse(Outcome.Neutral, "Remove a counter?", source, game)) { Counter counter = selectCounterType(game, source, card); RemoveCounterTargetEffect effect = new RemoveCounterTargetEffect(counter); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); effect.apply(game, source); } else { Counter counter = selectCounterType(game, source, card); if (counter != null) { AddCountersTargetEffect effect = new AddCountersTargetEffect(counter); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); effect.apply(game, source); } } diff --git a/Mage.Sets/src/mage/cards/c/CodieVociferousCodex.java b/Mage.Sets/src/mage/cards/c/CodieVociferousCodex.java index 533d8dec1a..42362e8433 100644 --- a/Mage.Sets/src/mage/cards/c/CodieVociferousCodex.java +++ b/Mage.Sets/src/mage/cards/c/CodieVociferousCodex.java @@ -170,7 +170,7 @@ class CodieVociferousCodexEffect extends OneShotEffect { } controller.moveCards(toCast, Zone.EXILED, source, game); PlayFromNotOwnHandZoneTargetEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, TargetController.YOU, Duration.EndOfTurn, true); - effect.setTargetPointer(new FixedTarget(toCast.getId())); + effect.setTargetPointer(new FixedTarget(toCast.getId(), game)); game.addEffect(effect, source); toExile.remove(toCast); controller.putCardsOnBottomOfLibrary(toExile, game, source, false); diff --git a/Mage.Sets/src/mage/cards/c/CommuneWithLava.java b/Mage.Sets/src/mage/cards/c/CommuneWithLava.java index 0e4a40dd95..7288a33b36 100644 --- a/Mage.Sets/src/mage/cards/c/CommuneWithLava.java +++ b/Mage.Sets/src/mage/cards/c/CommuneWithLava.java @@ -66,7 +66,7 @@ class CommuneWithLavaEffect extends OneShotEffect { for (Card card : cards) { ContinuousEffect effect = new CommuneWithLavaMayPlayEffect(); - effect.setTargetPointer(new FixedTarget(card.getId())); + effect.setTargetPointer(new FixedTarget(card.getId(), game)); game.addEffect(effect, source); } diff --git a/Mage.Sets/src/mage/cards/c/Contempt.java b/Mage.Sets/src/mage/cards/c/Contempt.java index 5a804ec28a..b6894e7330 100644 --- a/Mage.Sets/src/mage/cards/c/Contempt.java +++ b/Mage.Sets/src/mage/cards/c/Contempt.java @@ -78,7 +78,7 @@ class ContemptEffect extends OneShotEffect { if (attachedToPermanent != null) { Effect effect = new ReturnToHandTargetEffect(); effect.setTargetPointer(new FixedTarget( - attachedToPermanent.getId())).setText("return " + attachedToPermanent.getId(), game)).setText("return " + attachedToPermanent.getName() + " to owner's hand."); AtTheEndOfCombatDelayedTriggeredAbility ability = new AtTheEndOfCombatDelayedTriggeredAbility(effect); game.addDelayedTriggeredAbility(ability, source); diff --git a/Mage.Sets/src/mage/cards/c/Cowardice.java b/Mage.Sets/src/mage/cards/c/Cowardice.java index f31103ddf8..aa7a552438 100644 --- a/Mage.Sets/src/mage/cards/c/Cowardice.java +++ b/Mage.Sets/src/mage/cards/c/Cowardice.java @@ -55,7 +55,7 @@ class CowardiceTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); if (permanent != null && permanent.isCreature(game)) { - getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId())); + getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId(), game)); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/c/CragSaurian.java b/Mage.Sets/src/mage/cards/c/CragSaurian.java index a996468a6f..25f98583b8 100644 --- a/Mage.Sets/src/mage/cards/c/CragSaurian.java +++ b/Mage.Sets/src/mage/cards/c/CragSaurian.java @@ -64,7 +64,7 @@ public final class CragSaurian extends CardImpl { Player newController = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (newController != null && controller != null && !controller.equals(newController)) { ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, newController.getId()); - effect.setTargetPointer(new FixedTarget(source.getSourceId())); + effect.setTargetPointer(new FixedTarget(source.getSourceId(), game)); game.addEffect(effect, source); return true; } diff --git a/Mage.Sets/src/mage/cards/c/CrashingBoars.java b/Mage.Sets/src/mage/cards/c/CrashingBoars.java index 1c3597ed16..b9e66a2c13 100644 --- a/Mage.Sets/src/mage/cards/c/CrashingBoars.java +++ b/Mage.Sets/src/mage/cards/c/CrashingBoars.java @@ -76,7 +76,7 @@ class CrashingBoarsEffect extends OneShotEffect { Target target = new TargetControlledCreaturePermanent(1, 1, filter, true); if (target.choose(Outcome.Neutral, defendingPlayer.getId(), source.getSourceId(), game)) { RequirementEffect effect = new MustBeBlockedByTargetSourceEffect(); - effect.setTargetPointer(new FixedTarget(target.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(target.getFirstTarget(), game)); game.addEffect(effect, source); } return true; diff --git a/Mage.Sets/src/mage/cards/c/CrownOfDoom.java b/Mage.Sets/src/mage/cards/c/CrownOfDoom.java index 6d6b266934..5fcb5a82d9 100644 --- a/Mage.Sets/src/mage/cards/c/CrownOfDoom.java +++ b/Mage.Sets/src/mage/cards/c/CrownOfDoom.java @@ -115,7 +115,7 @@ class CrownOfDoomEffect extends OneShotEffect { && newController != null && !Objects.equals(controller.getId(), newController.getId())) { ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, newController.getId()); - effect.setTargetPointer(new FixedTarget(source.getSourceId())); + effect.setTargetPointer(new FixedTarget(source.getSourceId(), game)); game.addEffect(effect, source); return true; } diff --git a/Mage.Sets/src/mage/cards/c/CrownOfEmpires.java b/Mage.Sets/src/mage/cards/c/CrownOfEmpires.java index 98ab9f546f..2c4352820e 100644 --- a/Mage.Sets/src/mage/cards/c/CrownOfEmpires.java +++ b/Mage.Sets/src/mage/cards/c/CrownOfEmpires.java @@ -70,7 +70,7 @@ class CrownOfEmpiresEffect extends OneShotEffect { } if (scepter && throne) { ContinuousEffect effect = new CrownOfEmpiresControlEffect(); - effect.setTargetPointer(new FixedTarget(target.getId())); + effect.setTargetPointer(new FixedTarget(target.getId(), game)); game.getState().setValue(source.getSourceId().toString(), source.getControllerId()); game.addEffect(effect, source); } else { diff --git a/Mage.Sets/src/mage/cards/c/Crystallization.java b/Mage.Sets/src/mage/cards/c/Crystallization.java index 2456d9f5f0..648365f60d 100644 --- a/Mage.Sets/src/mage/cards/c/Crystallization.java +++ b/Mage.Sets/src/mage/cards/c/Crystallization.java @@ -84,7 +84,7 @@ class CrystallizationTriggeredAbility extends TriggeredAbilityImpl { if (enchantment != null && enchantment.getAttachedTo() != null) { UUID enchanted = enchantment.getAttachedTo(); if (event.getTargetId().equals(enchanted)) { - getEffects().get(0).setTargetPointer(new FixedTarget(enchanted)); + getEffects().get(0).setTargetPointer(new FixedTarget(enchanted, game)); return true; } } diff --git a/Mage.Sets/src/mage/cards/c/CunningAbduction.java b/Mage.Sets/src/mage/cards/c/CunningAbduction.java index 9257bf91b9..b3f5c7f8da 100644 --- a/Mage.Sets/src/mage/cards/c/CunningAbduction.java +++ b/Mage.Sets/src/mage/cards/c/CunningAbduction.java @@ -89,7 +89,7 @@ class CunningAbductionExileEffect extends OneShotEffect { game.addEffect(effect, source); // and you may spend mana as though it were mana of any color to cast it effect = new CunningAbductionSpendAnyManaEffect(); - effect.setTargetPointer(new FixedTarget(card.getId())); + effect.setTargetPointer(new FixedTarget(card.getId(), game)); game.addEffect(effect, source); } return true; diff --git a/Mage.Sets/src/mage/cards/c/CurseOfPredation.java b/Mage.Sets/src/mage/cards/c/CurseOfPredation.java index 2eb6d9d5ba..13f4a32cbc 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfPredation.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfPredation.java @@ -78,7 +78,7 @@ class CurseOfPredationTriggeredAbility extends TriggeredAbilityImpl { if (enchantment != null && enchantment.isAttachedTo(defender.getId())) { for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); + effect.setTargetPointer(new FixedTarget(event.getSourceId(), game)); } return true; } diff --git a/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java b/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java index 114115877c..3481dd69bb 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java @@ -83,7 +83,7 @@ class CurseOfStalkedPreyTriggeredAbility extends TriggeredAbilityImpl { if (enchantment != null && enchantment.getAttachedTo() != null) { Player player = game.getPlayer(enchantment.getAttachedTo()); if (player != null && event.getTargetId().equals(player.getId())) { - getEffects().get(0).setTargetPointer(new FixedTarget(event.getSourceId())); + getEffects().get(0).setTargetPointer(new FixedTarget(event.getSourceId(), game)); return true; } } diff --git a/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java b/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java index de374dcce5..e6ed7c158a 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java @@ -84,7 +84,7 @@ class CurseOfVengeanceTriggeredAbility extends TriggeredAbilityImpl { if (enchantment != null && spell != null && enchantment.isAttachedTo(spell.getControllerId())) { - this.getEffects().get(0).setTargetPointer(new FixedTarget(getSourceId())); + this.getEffects().get(0).setTargetPointer(new FixedTarget(getSourceId(), game)); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/c/CustodyBattle.java b/Mage.Sets/src/mage/cards/c/CustodyBattle.java index 3ca287ddcd..e8b23ef25a 100644 --- a/Mage.Sets/src/mage/cards/c/CustodyBattle.java +++ b/Mage.Sets/src/mage/cards/c/CustodyBattle.java @@ -135,7 +135,7 @@ class CustodyBattleUnlessPaysEffect extends OneShotEffect { if (source.getSourceObjectZoneChangeCounter() == game.getState().getZoneChangeCounter(source.getSourceId()) && game.getState().getZone(source.getSourceId()) == Zone.BATTLEFIELD) { ContinuousEffect effect = new GiveControlEffect(); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); game.addEffect(effect, source); game.informPlayers(game.getPlayer(source.getFirstTarget()).getLogName() + " gains control of " + sourcePermanent.getIdName()); }