diff --git a/Mage.Sets/src/mage/cards/e/EldraziMimic.java b/Mage.Sets/src/mage/cards/e/EldraziMimic.java
index 938f6f1205e..e195622869d 100644
--- a/Mage.Sets/src/mage/cards/e/EldraziMimic.java
+++ b/Mage.Sets/src/mage/cards/e/EldraziMimic.java
@@ -1,4 +1,3 @@
-
package mage.cards.e;
import java.util.UUID;
@@ -33,7 +32,7 @@ public final class EldraziMimic extends CardImpl {
}
public EldraziMimic(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}");
this.subtype.add(SubType.ELDRAZI);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
@@ -76,7 +75,7 @@ class EldraziMimicEffect extends OneShotEffect {
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (permanent != null) {
ContinuousEffect effect = new SetPowerToughnessTargetEffect(permanent.getPower().getValue(), permanent.getToughness().getValue(), Duration.EndOfTurn);
- 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/e/ElkinBottle.java b/Mage.Sets/src/mage/cards/e/ElkinBottle.java
index c9e6f32c1af..0fb1583933c 100644
--- a/Mage.Sets/src/mage/cards/e/ElkinBottle.java
+++ b/Mage.Sets/src/mage/cards/e/ElkinBottle.java
@@ -1,4 +1,3 @@
-
package mage.cards.e;
import java.util.UUID;
@@ -67,7 +66,7 @@ class ElkinBottleExileEffect extends OneShotEffect {
if (card != null) {
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), CardUtil.createObjectRealtedWindowTitle(source, game, null));
ContinuousEffect effect = new ElkinBottleCastFromExileEffect();
- 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/e/ErraticMutation.java b/Mage.Sets/src/mage/cards/e/ErraticMutation.java
index a7231d920ca..cade3c25a7e 100644
--- a/Mage.Sets/src/mage/cards/e/ErraticMutation.java
+++ b/Mage.Sets/src/mage/cards/e/ErraticMutation.java
@@ -1,4 +1,3 @@
-
package mage.cards.e;
import java.util.UUID;
@@ -82,7 +81,7 @@ class ErraticMutationEffect extends OneShotEffect {
int boostValue = nonLandCard.getManaValue();
// unboost target
ContinuousEffect effect = new BoostTargetEffect(boostValue, -boostValue, Duration.EndOfTurn);
- effect.setTargetPointer(new FixedTarget(this.getTargetPointer().getFirst(game, source)));
+ effect.setTargetPointer(new FixedTarget(this.getTargetPointer().getFirst(game, source), game));
game.addEffect(effect, source);
}
// put the cards on the bottom of the library in any order
diff --git a/Mage.Sets/src/mage/cards/e/EscapeToTheWilds.java b/Mage.Sets/src/mage/cards/e/EscapeToTheWilds.java
index 7b42487b16f..0fbc4cd237b 100644
--- a/Mage.Sets/src/mage/cards/e/EscapeToTheWilds.java
+++ b/Mage.Sets/src/mage/cards/e/EscapeToTheWilds.java
@@ -41,9 +41,9 @@ class EscapeToTheWildsEffect extends OneShotEffect {
EscapeToTheWildsEffect() {
super(Outcome.PlayForFree);
- this.staticText = "Exile the top five cards of your library. " +
- "You may play cards exiled this way until the end of your next turn.
" +
- "You may play an additional land this turn.";
+ this.staticText = "Exile the top five cards of your library. "
+ + "You may play cards exiled this way until the end of your next turn.
"
+ + "You may play an additional land this turn.";
}
private EscapeToTheWildsEffect(final EscapeToTheWildsEffect effect) {
@@ -67,7 +67,7 @@ class EscapeToTheWildsEffect extends OneShotEffect {
cards.getCards(game).stream().forEach(card -> {
ContinuousEffect effect = new EscapeToTheWildsMayPlayEffect();
- effect.setTargetPointer(new FixedTarget(card.getId()));
+ effect.setTargetPointer(new FixedTarget(card.getId(), game));
game.addEffect(effect, source);
});
game.addEffect(new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn), source);
diff --git a/Mage.Sets/src/mage/cards/f/FatalLore.java b/Mage.Sets/src/mage/cards/f/FatalLore.java
index 8d6d9dd88b2..9ea81f4c759 100644
--- a/Mage.Sets/src/mage/cards/f/FatalLore.java
+++ b/Mage.Sets/src/mage/cards/f/FatalLore.java
@@ -76,7 +76,7 @@ class FatalLoreEffect extends OneShotEffect {
&& controller.choose(Outcome.DestroyPermanent, target, source.getSourceId(), game)) {
for (UUID targetId : target.getTargets()) {
Effect destroyCreature = new DestroyTargetEffect(true);
- destroyCreature.setTargetPointer(new FixedTarget(targetId));
+ destroyCreature.setTargetPointer(new FixedTarget(targetId, game));
destroyCreature.apply(game, source);
}
Effect opponentDrawsCards = new DrawCardTargetEffect(StaticValue.get(3), false, true);
diff --git a/Mage.Sets/src/mage/cards/f/Feint.java b/Mage.Sets/src/mage/cards/f/Feint.java
index 550d9942df3..4ffa7c667d8 100644
--- a/Mage.Sets/src/mage/cards/f/Feint.java
+++ b/Mage.Sets/src/mage/cards/f/Feint.java
@@ -1,4 +1,3 @@
-
package mage.cards.f;
import java.util.UUID;
@@ -25,7 +24,7 @@ import mage.target.targetpointer.FixedTarget;
public final class Feint extends CardImpl {
public Feint(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
// Tap all creatures blocking target attacking creature. Prevent all combat damage that would be dealt this turn by that creature and each creature blocking it.
this.getSpellAbility().addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true).setText(""));
@@ -72,7 +71,7 @@ class FeintEffect extends OneShotEffect {
if (blocker != null) {
blocker.tap(source, game);
PreventionEffect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, true);
- effect.setTargetPointer(new FixedTarget(blocker.getId()));
+ effect.setTargetPointer(new FixedTarget(blocker.getId(), game));
game.addEffect(effect, source);
}
}
diff --git a/Mage.Sets/src/mage/cards/f/FickleEfreet.java b/Mage.Sets/src/mage/cards/f/FickleEfreet.java
index f345b9fb9fc..4b32a9a51a7 100644
--- a/Mage.Sets/src/mage/cards/f/FickleEfreet.java
+++ b/Mage.Sets/src/mage/cards/f/FickleEfreet.java
@@ -1,4 +1,3 @@
-
package mage.cards.f;
import java.util.UUID;
@@ -28,7 +27,7 @@ import mage.target.targetpointer.FixedTarget;
public final class FickleEfreet extends CardImpl {
public FickleEfreet(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.EFREET);
this.power = new MageInt(5);
@@ -49,7 +48,6 @@ public final class FickleEfreet extends CardImpl {
}
}
-
class FickleEfreetChangeControlEffect extends OneShotEffect {
public FickleEfreetChangeControlEffect() {
@@ -82,7 +80,7 @@ class FickleEfreetChangeControlEffect extends OneShotEffect {
Player chosenOpponent = game.getPlayer(target.getFirstTarget());
if (chosenOpponent != null) {
ContinuousEffect effect = new FickleEfreetGainControlEffect(Duration.Custom, target.getFirstTarget());
- effect.setTargetPointer(new FixedTarget(sourcePermanent.getId()));
+ effect.setTargetPointer(new FixedTarget(sourcePermanent.getId(), game));
game.addEffect(effect, source);
game.informPlayers(chosenOpponent.getLogName() + " has gained control of " + sourcePermanent.getLogName());
return true;
diff --git a/Mage.Sets/src/mage/cards/f/FightingChance.java b/Mage.Sets/src/mage/cards/f/FightingChance.java
index 8a8bc1676ed..80bd15d87cf 100644
--- a/Mage.Sets/src/mage/cards/f/FightingChance.java
+++ b/Mage.Sets/src/mage/cards/f/FightingChance.java
@@ -63,7 +63,7 @@ class FightingChanceEffect extends OneShotEffect {
for (UUID blocker : game.getCombat().getBlockers()) {
if (player.flipCoin(source, game, true)) {
PreventDamageByTargetEffect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, true);
- effect.setTargetPointer(new FixedTarget(blocker));
+ effect.setTargetPointer(new FixedTarget(blocker, game));
game.addEffect(effect, source);
}
}
diff --git a/Mage.Sets/src/mage/cards/f/FinestHour.java b/Mage.Sets/src/mage/cards/f/FinestHour.java
index a7103c56889..e53d5001372 100644
--- a/Mage.Sets/src/mage/cards/f/FinestHour.java
+++ b/Mage.Sets/src/mage/cards/f/FinestHour.java
@@ -1,5 +1,3 @@
-
-
package mage.cards.f;
import java.util.UUID;
@@ -16,7 +14,6 @@ import mage.constants.TurnPhase;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
-import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.game.turn.TurnMod;
import mage.target.targetpointer.FixedTarget;
@@ -28,10 +25,7 @@ import mage.target.targetpointer.FixedTarget;
public final class FinestHour extends CardImpl {
public FinestHour(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{W}{U}");
-
-
-
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{W}{U}");
// Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)
this.addAbility(new ExaltedAbility());
@@ -76,8 +70,8 @@ class FinestHourAbility extends TriggeredAbilityImpl {
public boolean checkTrigger(GameEvent event, Game game) {
if (game.isActivePlayer(this.controllerId)) {
if (game.getCombat().attacksAlone()) {
- for (Effect effect: this.getEffects()) {
- effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackers().get(0)));
+ for (Effect effect : this.getEffects()) {
+ effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackers().get(0), game));
}
return true;
}
diff --git a/Mage.Sets/src/mage/cards/f/FireGiantsFury.java b/Mage.Sets/src/mage/cards/f/FireGiantsFury.java
index c43508c821b..263dfa40fbb 100644
--- a/Mage.Sets/src/mage/cards/f/FireGiantsFury.java
+++ b/Mage.Sets/src/mage/cards/f/FireGiantsFury.java
@@ -100,7 +100,7 @@ class FireGiantsFuryDelayedTriggeredAbility extends DelayedTriggeredAbility {
this.mor = mor;
}
- private FireGiantsFuryDelayedTriggeredAbility (FireGiantsFuryDelayedTriggeredAbility ability) {
+ private FireGiantsFuryDelayedTriggeredAbility(FireGiantsFuryDelayedTriggeredAbility ability) {
super(ability);
this.mor = ability.mor;
}
@@ -161,7 +161,7 @@ class FireGiantsFuryDelayedEffect extends OneShotEffect {
for (Card card : cards) {
ContinuousEffect effect = new FireGiantsFuryMayPlayEffect();
- 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/f/FistfulOfForce.java b/Mage.Sets/src/mage/cards/f/FistfulOfForce.java
index c3305d057e7..9cb872cedb9 100644
--- a/Mage.Sets/src/mage/cards/f/FistfulOfForce.java
+++ b/Mage.Sets/src/mage/cards/f/FistfulOfForce.java
@@ -67,12 +67,12 @@ class FistfulOfForceEffect extends OneShotEffect {
Permanent creature = game.getPermanent(getTargetPointer().getFirst(game, source));
if (controller != null && creature != null) {
ContinuousEffect effect = new BoostTargetEffect(2,2,Duration.EndOfTurn);
- effect.setTargetPointer(new FixedTarget(creature.getId()));
+ effect.setTargetPointer(new FixedTarget(creature.getId(), game));
game.addEffect(effect, source);
if (ClashEffect.getInstance().apply(game, source)) {
game.addEffect(effect.copy(), source);
effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
- effect.setTargetPointer(new FixedTarget(creature.getId()));
+ effect.setTargetPointer(new FixedTarget(creature.getId(), game));
game.addEffect(effect.copy(), source);
}
return true;
diff --git a/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java b/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java
index 65c333ac9bd..352384a18f2 100644
--- a/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java
+++ b/Mage.Sets/src/mage/cards/f/FollowedFootsteps.java
@@ -81,7 +81,7 @@ class FollowedFootstepsEffect extends OneShotEffect {
Permanent target = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo());
if (target != null) {
Effect effect = new CreateTokenCopyTargetEffect();
- effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
+ effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo(), game));
return effect.apply(game, source);
}
}
diff --git a/Mage.Sets/src/mage/cards/f/Forcefield.java b/Mage.Sets/src/mage/cards/f/Forcefield.java
index 2fbbb99282f..95248b163ad 100644
--- a/Mage.Sets/src/mage/cards/f/Forcefield.java
+++ b/Mage.Sets/src/mage/cards/f/Forcefield.java
@@ -1,4 +1,3 @@
-
package mage.cards.f;
import java.util.UUID;
@@ -19,7 +18,6 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.UnblockedPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
-import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
@@ -33,7 +31,7 @@ import mage.target.targetpointer.FixedTarget;
public final class Forcefield extends CardImpl {
public Forcefield(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
+ super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// {1}: The next time an unblocked creature of your choice would deal combat damage to you this turn, prevent all but 1 of that damage.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ForcefieldEffect(), new GenericManaCost(1)));
@@ -50,26 +48,27 @@ public final class Forcefield extends CardImpl {
}
class ForcefieldEffect extends OneShotEffect {
-
+
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("an unblocked creature");
+
static {
filter.add(UnblockedPredicate.instance);
}
-
+
ForcefieldEffect() {
super(Outcome.PreventDamage);
this.staticText = "The next time an unblocked creature of your choice would deal combat damage to you this turn, prevent all but 1 of that damage";
}
-
+
ForcefieldEffect(final ForcefieldEffect effect) {
super(effect);
}
-
+
@Override
public ForcefieldEffect copy() {
return new ForcefieldEffect(this);
}
-
+
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
@@ -82,7 +81,7 @@ class ForcefieldEffect extends OneShotEffect {
game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen " + creature.getLogName());
}
ContinuousEffect effect = new ForcefieldPreventionEffect();
- 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/f/FracturedLoyalty.java b/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java
index ca75b74ecbf..268da9d0199 100644
--- a/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java
+++ b/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java
@@ -14,7 +14,6 @@ import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
-import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
@@ -77,7 +76,7 @@ public final class FracturedLoyalty extends CardImpl {
if (enchantment.getAttachedTo() != null) {
if (controller != null && !enchantedCreature.isControlledBy(this.getTargetPointer().getFirst(game, source))) {
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, this.getTargetPointer().getFirst(game, source));
- effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
+ effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo(), game));
game.addEffect(effect, source);
return true;
}
diff --git a/Mage.Sets/src/mage/cards/f/FuriousResistance.java b/Mage.Sets/src/mage/cards/f/FuriousResistance.java
index 7bc1dd0401e..612e5327fe8 100644
--- a/Mage.Sets/src/mage/cards/f/FuriousResistance.java
+++ b/Mage.Sets/src/mage/cards/f/FuriousResistance.java
@@ -1,4 +1,3 @@
-
package mage.cards.f;
import java.util.UUID;
@@ -25,12 +24,11 @@ import mage.target.targetpointer.FixedTarget;
* @author jeffwadsworth
*/
public final class FuriousResistance extends CardImpl {
-
+
private static final FilterCreaturePermanent filter = new FilterBlockingCreature("blocking creature");
public FuriousResistance(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}");
-
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
// Target blocking creature gets +3/+0 and gains first strike until end of turn.
this.getSpellAbility().addEffect(new FuriousResistanceEffect());
@@ -64,11 +62,11 @@ class FuriousResistanceEffect extends OneShotEffect {
if (target == null) {
return false;
}
-
+
ContinuousEffect effect = new BoostTargetEffect(3, 0, Duration.EndOfTurn);
ContinuousEffect effect2 = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
- effect.setTargetPointer(new FixedTarget(target.getId()));
- effect2.setTargetPointer(new FixedTarget(target.getId()));
+ effect.setTargetPointer(new FixedTarget(target.getId(), game));
+ effect2.setTargetPointer(new FixedTarget(target.getId(), game));
game.addEffect(effect, source);
game.addEffect(effect2, source);
return true;