[40K] Implemented Necron Monolith

This commit is contained in:
Evan Kranzler 2022-09-17 21:21:58 -04:00
parent b14af42280
commit 06c542cda8
2 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,85 @@
package mage.cards.n;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.CrewAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.NecronWarriorToken;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NecronMonolith extends CardImpl {
public NecronMonolith(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{7}");
this.subtype.add(SubType.VEHICLE);
this.power = new MageInt(7);
this.toughness = new MageInt(7);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Indestructible
this.addAbility(IndestructibleAbility.getInstance());
// Eternity Gate -- Whenever Necron Monolith attacks, mill three cards. For each creature card milled this way, create a 2/2 black Necron Warrior artifact creature token.
this.addAbility(new AttacksTriggeredAbility(new NecronMonolithEffect()).withFlavorWord("Eternity Gate"));
// Crew 4
this.addAbility(new CrewAbility(4));
}
private NecronMonolith(final NecronMonolith card) {
super(card);
}
@Override
public NecronMonolith copy() {
return new NecronMonolith(this);
}
}
class NecronMonolithEffect extends OneShotEffect {
NecronMonolithEffect() {
super(Outcome.Benefit);
staticText = "mill three cards. For each creature card milled this way, " +
"create a 2/2 black Necron Warrior artifact creature token";
}
private NecronMonolithEffect(final NecronMonolithEffect effect) {
super(effect);
}
@Override
public NecronMonolithEffect copy() {
return new NecronMonolithEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
int count = player
.millCards(3, source, game)
.count(StaticFilters.FILTER_CARD_CREATURE, game);
return count > 0 && new NecronWarriorToken().putOntoBattlefield(count, game, source);
}
}

View file

@ -133,6 +133,7 @@ public final class Warhammer40000 extends ExpansionSet {
cards.add(new SetCardInfo("Mutilate", 203, Rarity.RARE, mage.cards.m.Mutilate.class)); cards.add(new SetCardInfo("Mutilate", 203, Rarity.RARE, mage.cards.m.Mutilate.class));
cards.add(new SetCardInfo("Myriad Landscape", 285, Rarity.UNCOMMON, mage.cards.m.MyriadLandscape.class)); cards.add(new SetCardInfo("Myriad Landscape", 285, Rarity.UNCOMMON, mage.cards.m.MyriadLandscape.class));
cards.add(new SetCardInfo("Mystic Forge", 246, Rarity.RARE, mage.cards.m.MysticForge.class)); cards.add(new SetCardInfo("Mystic Forge", 246, Rarity.RARE, mage.cards.m.MysticForge.class));
cards.add(new SetCardInfo("Necron Monolith", 161, Rarity.RARE, mage.cards.n.NecronMonolith.class));
cards.add(new SetCardInfo("New Horizons", 218, Rarity.COMMON, mage.cards.n.NewHorizons.class)); cards.add(new SetCardInfo("New Horizons", 218, Rarity.COMMON, mage.cards.n.NewHorizons.class));
cards.add(new SetCardInfo("Night Scythe", 162, Rarity.UNCOMMON, mage.cards.n.NightScythe.class)); cards.add(new SetCardInfo("Night Scythe", 162, Rarity.UNCOMMON, mage.cards.n.NightScythe.class));
cards.add(new SetCardInfo("Noise Marine", 82, Rarity.UNCOMMON, mage.cards.n.NoiseMarine.class)); cards.add(new SetCardInfo("Noise Marine", 82, Rarity.UNCOMMON, mage.cards.n.NoiseMarine.class));