forked from External/mage
fixed Invert // Invent not switch power and toughness
This commit is contained in:
parent
28214209f6
commit
590bad7e00
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue