From 590bad7e0053be38d0adc8cd5bec015efd79707a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 23 Sep 2018 22:20:02 -0400 Subject: [PATCH] fixed Invert // Invent not switch power and toughness --- Mage.Sets/src/mage/cards/i/InvertInvent.java | 2 +- .../common/continuous/SwitchPowerToughnessTargetEffect.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/i/InvertInvent.java b/Mage.Sets/src/mage/cards/i/InvertInvent.java index 9c957b4b044..fbeccdf652d 100644 --- a/Mage.Sets/src/mage/cards/i/InvertInvent.java +++ b/Mage.Sets/src/mage/cards/i/InvertInvent.java @@ -71,7 +71,7 @@ class InvertEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - for (UUID targetId : source.getTargets().get(0).getTargets()) { + for (UUID targetId : targetPointer.getTargets(game, source)) { ContinuousEffect effect = new SwitchPowerToughnessTargetEffect(Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(targetId, game)); game.addEffect(effect, source); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java index bdf7ecbee9b..3eb33e61e49 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java @@ -32,7 +32,7 @@ public class SwitchPowerToughnessTargetEffect extends ContinuousEffectImpl { @Override public boolean apply(Game game, Ability source) { - Permanent target = game.getPermanent(source.getFirstTarget()); + Permanent target = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (target != null) { int power = target.getPower().getValue(); target.getPower().setValue(target.getToughness().getValue());