fixed Invert // Invent not switch power and toughness

This commit is contained in:
Evan Kranzler 2018-09-23 22:20:02 -04:00
parent 28214209f6
commit 590bad7e00
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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());