[BLB] Implement Honored Dreyleader

This commit is contained in:
theelk801 2024-07-17 17:01:42 -04:00
parent 51f2f051bb
commit 2f91839d76
2 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,74 @@
package mage.cards.h;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AnotherPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HonoredDreyleader extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledPermanent("another Squirrel or Food");
static {
filter.add(AnotherPredicate.instance);
filter.add(Predicates.or(
SubType.SQUIRREL.getPredicate(),
SubType.FOOD.getPredicate()
));
}
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
private static final Hint hint = new ValueHint("Other Squirrels and Food you control", xValue);
public HonoredDreyleader(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.SQUIRREL);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Trample
this.addAbility(TrampleAbility.getInstance());
// When Honored Dreyleader enters, put a +1/+1 counter on it for each other Squirrel and/or Food you control.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), xValue)
.setText("put a +1/+1 counter on it for each other Squirrel and/or Food you control")
).addHint(hint));
// Whenever another Squirrel or Food you control enters, put a +1/+1 counter on Honored Dreyleader.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter
));
}
private HonoredDreyleader(final HonoredDreyleader card) {
super(card);
}
@Override
public HonoredDreyleader copy() {
return new HonoredDreyleader(this);
}
}

View file

@ -87,6 +87,7 @@ public final class Bloomburrow extends ExpansionSet {
cards.add(new SetCardInfo("Hidden Grotto", 254, Rarity.COMMON, mage.cards.h.HiddenGrotto.class));
cards.add(new SetCardInfo("Hired Claw", 140, Rarity.RARE, mage.cards.h.HiredClaw.class));
cards.add(new SetCardInfo("Hivespine Wolverine", 177, Rarity.UNCOMMON, mage.cards.h.HivespineWolverine.class));
cards.add(new SetCardInfo("Honored Dreyleader", 178, Rarity.UNCOMMON, mage.cards.h.HonoredDreyleader.class));
cards.add(new SetCardInfo("Hop to It", 16, Rarity.UNCOMMON, mage.cards.h.HopToIt.class));
cards.add(new SetCardInfo("Hugs, Grisly Guardian", 218, Rarity.MYTHIC, mage.cards.h.HugsGrislyGuardian.class));
cards.add(new SetCardInfo("Hunter's Talent", 179, Rarity.UNCOMMON, mage.cards.h.HuntersTalent.class));