fixed Krenko, Mob Boss only counting goblin creatures

This commit is contained in:
Evan Kranzler 2019-11-18 16:55:19 -05:00
parent f93b8fc1cf
commit b8cc48c2ca

View file

@ -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);
}