mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Fix continuous effect creation in Pack's Disdain
This commit is contained in:
parent
899122a170
commit
74b5e85a3e
1 changed files with 6 additions and 3 deletions
|
@ -30,8 +30,8 @@ package mage.sets.morningtide;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.MultipliedValue;
|
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -47,6 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -103,8 +104,10 @@ class PacksDisdainEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||||
filter.add(new SubtypePredicate(typeChoice.getChoice()));
|
filter.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||||
DynamicValue negativePermanentsCount = new MultipliedValue(new PermanentsOnBattlefieldCount(filter), -1);
|
DynamicValue negativePermanentsCount = new PermanentsOnBattlefieldCount(filter, -1);
|
||||||
return new BoostTargetEffect(negativePermanentsCount, negativePermanentsCount, Duration.EndOfTurn, true).apply(game, source);
|
ContinuousEffect effect = new BoostTargetEffect(negativePermanentsCount, negativePermanentsCount, Duration.EndOfTurn, true);
|
||||||
|
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||||
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue