fixed Krenko, Mob Boss only counting goblin creatures
-
package mage.cards.k;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
@@ -12,22 +11,19 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
-import mage.constants.Zone;
-import mage.filter.common.FilterControlledCreaturePermanent;
-import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.GoblinToken;
+import java.util.UUID;
+
/**
- *
* @author North
*/
public final class KrenkoMobBoss extends CardImpl {
- private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("the number of Goblins you control");
-
- static {
- filter.add(new SubtypePredicate(SubType.GOBLIN));
- }
+ private static final FilterControlledPermanent filter
+ = new FilterControlledPermanent(SubType.GOBLIN, "the number of Goblins you control");
+ private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
public KrenkoMobBoss(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
@@ -39,12 +35,12 @@ public final class KrenkoMobBoss extends CardImpl {
this.toughness = new MageInt(3);
// {tap}: create X 1/1 red Goblin creature tokens, where X is the number of Goblins you control.
- this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
- new CreateTokenEffect(new GoblinToken(), new PermanentsOnBattlefieldCount(filter)),
- new TapSourceCost()));
+ this.addAbility(new SimpleActivatedAbility(
+ new CreateTokenEffect(new GoblinToken(), xValue), new TapSourceCost()
+ ));
}
- public KrenkoMobBoss(final KrenkoMobBoss card) {
+ private KrenkoMobBoss(final KrenkoMobBoss card) {
super(card);
}
