[MOM] Implement Polukranos Reborn / Polukranos, Engine of Ruin

This commit is contained in:
theelk801 2023-04-10 20:21:57 -04:00
parent e706fdda3a
commit f1fdfc2c70
5 changed files with 192 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.PhyrexianHydraWithLifelinkToken;
import mage.game.permanent.token.PhyrexianHydraWithReachToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PolukranosEngineOfRuin extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledPermanent(SubType.HYDRA, "nontoken Hydra you control");
static {
filter.add(TokenPredicate.FALSE);
}
public PolukranosEngineOfRuin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.HYDRA);
this.power = new MageInt(6);
this.toughness = new MageInt(6);
this.color.setWhite(true);
this.color.setGreen(true);
this.nightCard = true;
// Reach
this.addAbility(ReachAbility.getInstance());
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// Whenever Polukranos, Engine of Ruin or another nontoken Hydra you control dies, create a 3/3 green and white Phyrexian Hydra creature token with reach and a 3/3 green and white Phyrexian Hydra creature token with lifelink.
Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(
new CreateTokenEffect(new PhyrexianHydraWithReachToken()), false, filter
);
ability.addEffect(new CreateTokenEffect(new PhyrexianHydraWithLifelinkToken())
.setText("and a 3/3 green and white Phyrexian Hydra creature token with lifelink"));
this.addAbility(ability);
}
private PolukranosEngineOfRuin(final PolukranosEngineOfRuin card) {
super(card);
}
@Override
public PolukranosEngineOfRuin copy() {
return new PolukranosEngineOfRuin(this);
}
}

View file

@ -0,0 +1,47 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PolukranosReborn extends CardImpl {
public PolukranosReborn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{G}{G}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HYDRA);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
this.secondSideCardClazz = mage.cards.p.PolukranosEngineOfRuin.class;
// Reach
this.addAbility(ReachAbility.getInstance());
// {6}{W/P}: Transform Polukranos Reborn. Activate only as a sorcery.
this.addAbility(new TransformAbility());
this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{6}{W/P}")));
}
private PolukranosReborn(final PolukranosReborn card) {
super(card);
}
@Override
public PolukranosReborn copy() {
return new PolukranosReborn(this);
}
}

View file

@ -178,6 +178,8 @@ public final class MarchOfTheMachine extends ExpansionSet {
cards.add(new SetCardInfo("Placid Rottentail", 199, Rarity.COMMON, mage.cards.p.PlacidRottentail.class));
cards.add(new SetCardInfo("Plains", 277, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plated Kilnbeast", 178, Rarity.COMMON, mage.cards.p.PlatedKilnbeast.class));
cards.add(new SetCardInfo("Polukranos Reborn", 200, Rarity.RARE, mage.cards.p.PolukranosReborn.class));
cards.add(new SetCardInfo("Polukranos, Engine of Ruin", 200, Rarity.RARE, mage.cards.p.PolukranosEngineOfRuin.class));
cards.add(new SetCardInfo("Portent Tracker", 201, Rarity.COMMON, mage.cards.p.PortentTracker.class));
cards.add(new SetCardInfo("Preening Champion", 73, Rarity.COMMON, mage.cards.p.PreeningChampion.class));
cards.add(new SetCardInfo("Progenitor Exarch", 32, Rarity.RARE, mage.cards.p.ProgenitorExarch.class));

View file

@ -0,0 +1,37 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.LifelinkAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
public final class PhyrexianHydraWithLifelinkToken extends TokenImpl {
public PhyrexianHydraWithLifelinkToken() {
super("Phyrexian Hydra Token", "3/3 green and white Phyrexian Hydra creature token with lifelink");
cardType.add(CardType.CREATURE);
color.setGreen(true);
color.setWhite(true);
subtype.add(SubType.PHYREXIAN);
subtype.add(SubType.HYDRA);
power = new MageInt(3);
toughness = new MageInt(3);
this.addAbility(LifelinkAbility.getInstance());
availableImageSetCodes = Arrays.asList("MOM");
}
public PhyrexianHydraWithLifelinkToken(final PhyrexianHydraWithLifelinkToken token) {
super(token);
}
public PhyrexianHydraWithLifelinkToken copy() {
return new PhyrexianHydraWithLifelinkToken(this);
}
}

View file

@ -0,0 +1,37 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.ReachAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
public final class PhyrexianHydraWithReachToken extends TokenImpl {
public PhyrexianHydraWithReachToken() {
super("Phyrexian Hydra Token", "3/3 green and white Phyrexian Hydra creature token with reach");
cardType.add(CardType.CREATURE);
color.setGreen(true);
color.setWhite(true);
subtype.add(SubType.PHYREXIAN);
subtype.add(SubType.HYDRA);
power = new MageInt(3);
toughness = new MageInt(3);
this.addAbility(ReachAbility.getInstance());
availableImageSetCodes = Arrays.asList("MOM");
}
public PhyrexianHydraWithReachToken(final PhyrexianHydraWithReachToken token) {
super(token);
}
public PhyrexianHydraWithReachToken copy() {
return new PhyrexianHydraWithReachToken(this);
}
}