Add value hint to Elven Ambush and Elvish Promenade

This commit is contained in:
Daniel Bomar 2020-12-18 20:11:10 -06:00
parent 992a67611f
commit e9f2aa9cc0
2 changed files with 16 additions and 4 deletions

View file

@ -2,8 +2,10 @@ package mage.cards.e;
import java.util.UUID; import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -17,17 +19,21 @@ import mage.game.permanent.token.ElfToken;
*/ */
public final class ElvenAmbush extends CardImpl { public final class ElvenAmbush extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elf you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elves you control");
static { static {
filter.add(SubType.ELF.getPredicate()); filter.add(SubType.ELF.getPredicate());
} }
private static final DynamicValue elfCount = new PermanentsOnBattlefieldCount(filter);
public ElvenAmbush(UUID ownerId, CardSetInfo setInfo) { public ElvenAmbush(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}");
this.getSpellAbility().addHint(new ValueHint("Elves you control", elfCount));
// Create a 1/1 green Elf Warrior creature token for each Elf you control. // Create a 1/1 green Elf Warrior creature token for each Elf you control.
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), elfCount));
} }
private ElvenAmbush(final ElvenAmbush card) { private ElvenAmbush(final ElvenAmbush card) {

View file

@ -2,8 +2,11 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID; import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -17,17 +20,20 @@ import mage.game.permanent.token.ElfToken;
*/ */
public final class ElvishPromenade extends CardImpl { public final class ElvishPromenade extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elf you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elves you control");
static { static {
filter.add(SubType.ELF.getPredicate()); filter.add(SubType.ELF.getPredicate());
} }
private static final DynamicValue elfCount = new PermanentsOnBattlefieldCount(filter);
public ElvishPromenade(UUID ownerId, CardSetInfo setInfo) { public ElvishPromenade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{G}"); super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{G}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.getSpellAbility().addHint(new ValueHint("Elves you control", elfCount));
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), elfCount));
} }
public ElvishPromenade(final ElvishPromenade card) { public ElvishPromenade(final ElvishPromenade card) {