[BRO] Implement Ashnod, Flesh Mechanist

This commit is contained in:
PurpleCrowbar 2022-11-02 01:48:53 +00:00
parent 0ef5f4ecbc
commit afec3086da
3 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,76 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileFromGraveCost;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.permanent.token.AshnodZombieToken;
import mage.game.permanent.token.PowerstoneToken;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author PurpleCrowbar
*/
public final class AshnodFleshMechanist extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledCreaturePermanent("another creature");
static {
filter.add(AnotherPredicate.instance);
}
public AshnodFleshMechanist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN, SubType.ARTIFICER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Whenever Ashnod, Flesh Mechanist attacks, you may sacrifice another creature. If you do, create a tapped Powerstone token.
this.addAbility(new AttacksTriggeredAbility(
new DoIfCostPaid(
new CreateTokenEffect(
new PowerstoneToken(), 1, true, false
), new SacrificeTargetCost(new TargetControlledPermanent(filter))
), false
));
// {5}, Exile a creature card from your graveyard: Create a tapped 3/3 colorless Zombie artifact creature token.
Ability ability = new SimpleActivatedAbility(
new CreateTokenEffect(new AshnodZombieToken(), 1, true, false), new GenericManaCost(5)
);
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_A)));
this.addAbility(ability);
}
private AshnodFleshMechanist(final AshnodFleshMechanist card) {
super(card);
}
@Override
public AshnodFleshMechanist copy() {
return new AshnodFleshMechanist(this);
}
}

View file

@ -29,6 +29,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Arcane Proxy", 75, Rarity.MYTHIC, mage.cards.a.ArcaneProxy.class));
cards.add(new SetCardInfo("Argoth, Sanctum of Nature", "256a", Rarity.RARE, mage.cards.a.ArgothSanctumOfNature.class));
cards.add(new SetCardInfo("Argothian Opportunist", 167, Rarity.COMMON, mage.cards.a.ArgothianOpportunist.class));
cards.add(new SetCardInfo("Ashnod, Flesh Mechanist", 84, Rarity.RARE, mage.cards.a.AshnodFleshMechanist.class));
cards.add(new SetCardInfo("Ashnod's Harvester", 117, Rarity.UNCOMMON, mage.cards.a.AshnodsHarvester.class));
cards.add(new SetCardInfo("Audacity", 169, Rarity.UNCOMMON, mage.cards.a.Audacity.class));
cards.add(new SetCardInfo("Battlefield Forge", 257, Rarity.RARE, mage.cards.b.BattlefieldForge.class));

View file

@ -0,0 +1,30 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author PurpleCrowbar
*/
public final class AshnodZombieToken extends TokenImpl {
public AshnodZombieToken() {
super("Zombie Token", "3/3 colorless Zombie artifact creature token");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add(SubType.ZOMBIE);
power = new MageInt(3);
toughness = new MageInt(3);
setOriginalExpansionSetCode("BRO");
}
public AshnodZombieToken(final AshnodZombieToken token) {
super(token);
}
public AshnodZombieToken copy() {
return new AshnodZombieToken(this);
}
}