mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[MOM] Implement Etali, Primal Conqueror / Etali, Primal Sickness
This commit is contained in:
parent
de6a09789e
commit
e706fdda3a
3 changed files with 182 additions and 0 deletions
97
Mage.Sets/src/mage/cards/e/EtaliPrimalConqueror.java
Normal file
97
Mage.Sets/src/mage/cards/e/EtaliPrimalConqueror.java
Normal file
|
@ -0,0 +1,97 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EtaliPrimalConqueror extends CardImpl {
|
||||
|
||||
public EtaliPrimalConqueror(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ELDER);
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
this.secondSideCardClazz = mage.cards.e.EtaliPrimalSickness.class;
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// When Etali, Primal Conqueror enters the battlefield, each player exiles cards from the top of their library until they exile a nonland card. You may cast any number of spells from among the nonland cards exiled this way without paying their mana costs.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new EtaliPrimalConquerorEffect()));
|
||||
|
||||
// {9}{G/P}: Transform Etali. Activate only as a sorcery.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{9}{G/P}")));
|
||||
}
|
||||
|
||||
private EtaliPrimalConqueror(final EtaliPrimalConqueror card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EtaliPrimalConqueror copy() {
|
||||
return new EtaliPrimalConqueror(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EtaliPrimalConquerorEffect extends OneShotEffect {
|
||||
|
||||
EtaliPrimalConquerorEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each player exiles cards from the top of their library until they exile a nonland card. " +
|
||||
"You may cast any number of spells from among the nonland cards exiled this way without paying their mana costs";
|
||||
}
|
||||
|
||||
private EtaliPrimalConquerorEffect(final EtaliPrimalConquerorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EtaliPrimalConquerorEffect copy() {
|
||||
return new EtaliPrimalConquerorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
for (Card card : player.getLibrary().getCards(game)) {
|
||||
player.moveCards(card, Zone.EXILED, source, game);
|
||||
if (!card.isLand(game)) {
|
||||
cards.add(card);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
CardUtil.castMultipleWithAttributeForFree(controller, source, game, cards, StaticFilters.FILTER_CARD);
|
||||
return true;
|
||||
}
|
||||
}
|
83
Mage.Sets/src/mage/cards/e/EtaliPrimalSickness.java
Normal file
83
Mage.Sets/src/mage/cards/e/EtaliPrimalSickness.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EtaliPrimalSickness extends CardImpl {
|
||||
|
||||
public EtaliPrimalSickness(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.PHYREXIAN);
|
||||
this.subtype.add(SubType.ELDER);
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(11);
|
||||
this.toughness = new MageInt(11);
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
this.nightCard = true;
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Indestructible
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// Whenever Etali, Primal Sickness deals combat damage to a player, they get that many poison counters.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new EtaliPrimalConquerorEffect(), false, true
|
||||
));
|
||||
}
|
||||
|
||||
private EtaliPrimalSickness(final EtaliPrimalSickness card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EtaliPrimalSickness copy() {
|
||||
return new EtaliPrimalSickness(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EtaliPrimalSicknessEffect extends OneShotEffect {
|
||||
|
||||
EtaliPrimalSicknessEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "they get that many poison counters";
|
||||
}
|
||||
|
||||
private EtaliPrimalSicknessEffect(final EtaliPrimalSicknessEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EtaliPrimalSicknessEffect copy() {
|
||||
return new EtaliPrimalSicknessEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
int damage = (Integer) getValue("damage");
|
||||
return player.addCounters(CounterType.POISON.createInstance(damage), source.getControllerId(), source, game);
|
||||
}
|
||||
}
|
|
@ -85,6 +85,8 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ephara's Dispersal", 55, Rarity.COMMON, mage.cards.e.EpharasDispersal.class));
|
||||
cards.add(new SetCardInfo("Errant and Giada", 224, Rarity.RARE, mage.cards.e.ErrantAndGiada.class));
|
||||
cards.add(new SetCardInfo("Essence of Orthodoxy", 323, Rarity.RARE, mage.cards.e.EssenceOfOrthodoxy.class));
|
||||
cards.add(new SetCardInfo("Etali, Primal Conqueror", 137, Rarity.RARE, mage.cards.e.EtaliPrimalConqueror.class));
|
||||
cards.add(new SetCardInfo("Etali, Primal Sickness", 137, Rarity.RARE, mage.cards.e.EtaliPrimalSickness.class));
|
||||
cards.add(new SetCardInfo("Etched Familiar", 101, Rarity.COMMON, mage.cards.e.EtchedFamiliar.class));
|
||||
cards.add(new SetCardInfo("Etched Host Doombringer", 102, Rarity.COMMON, mage.cards.e.EtchedHostDoombringer.class));
|
||||
cards.add(new SetCardInfo("Expedition Lookout", 56, Rarity.COMMON, mage.cards.e.ExpeditionLookout.class));
|
||||
|
|
Loading…
Reference in a new issue