From b8cc48c2ca1b4b3f6ccfb8ca384c8d427ba04de9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 18 Nov 2019 16:55:19 -0500 Subject: [PATCH] fixed Krenko, Mob Boss only counting goblin creatures --- Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java b/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java index 8aca0b1634b..d9cdf289b94 100644 --- a/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java +++ b/Mage.Sets/src/mage/cards/k/KrenkoMobBoss.java @@ -1,10 +1,9 @@ - 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,25 +11,22 @@ 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}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.WARRIOR); @@ -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); }