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 mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -47,6 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -103,8 +104,10 @@ class PacksDisdainEffect extends OneShotEffect {
|
|||
}
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
filter.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
DynamicValue negativePermanentsCount = new MultipliedValue(new PermanentsOnBattlefieldCount(filter), -1);
|
||||
return new BoostTargetEffect(negativePermanentsCount, negativePermanentsCount, Duration.EndOfTurn, true).apply(game, source);
|
||||
DynamicValue negativePermanentsCount = new PermanentsOnBattlefieldCount(filter, -1);
|
||||
ContinuousEffect effect = new BoostTargetEffect(negativePermanentsCount, negativePermanentsCount, Duration.EndOfTurn, true);
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue