[40K] Implemented Haruspex

This commit is contained in:
Evan Kranzler 2022-10-04 21:29:49 -04:00
parent a9565268e0
commit f2a476437e
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.h;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CountersSourceCount;
import mage.abilities.dynamicvalue.common.RemovedCountersForCostValue;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.mana.DynamicManaAbility;
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.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Haruspex extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("another creature");
static {
filter.add(AnotherPredicate.instance);
}
private static final DynamicValue xValue = new CountersSourceCount(CounterType.P1P1);
public Haruspex(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.TYRANID);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Rapacious Hunger -- Whenever another creature dies, put a +1/+1 counter on Haruspex.
this.addAbility(new DiesCreatureTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter
).withFlavorWord("Rapacious Hunger"));
// Devouring Monster -- {T}, Remove X +1/+1 counters from Haruspex: Add X mana of any one color.
Ability ability = new DynamicManaAbility(
Mana.AnyMana(1), RemovedCountersForCostValue.instance, new TapSourceCost(),
"Add X mana of any one color", true, xValue
);
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.P1P1.createInstance()));
this.addAbility(ability.withFlavorWord("Devouring Monster"));
}
private Haruspex(final Haruspex card) {
super(card);
}
@Override
public Haruspex copy() {
return new Haruspex(this);
}
}

View file

@ -119,6 +119,7 @@ public final class Warhammer40000 extends ExpansionSet {
cards.add(new SetCardInfo("Grey Knight Paragon", 13, Rarity.UNCOMMON, mage.cards.g.GreyKnightParagon.class));
cards.add(new SetCardInfo("Hardened Scales", 215, Rarity.RARE, mage.cards.h.HardenedScales.class));
cards.add(new SetCardInfo("Harrow", 216, Rarity.COMMON, mage.cards.h.Harrow.class));
cards.add(new SetCardInfo("Haruspex", 91, Rarity.RARE, mage.cards.h.Haruspex.class));
cards.add(new SetCardInfo("Hedron Archive", 240, Rarity.UNCOMMON, mage.cards.h.HedronArchive.class));
cards.add(new SetCardInfo("Herald of Slaanesh", 77, Rarity.UNCOMMON, mage.cards.h.HeraldOfSlaanesh.class));
cards.add(new SetCardInfo("Herald's Horn", 241, Rarity.UNCOMMON, mage.cards.h.HeraldsHorn.class));