mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Implemented Nethroi, Apex of Death
This commit is contained in:
parent
a19a5d7162
commit
e5e55a062a
2 changed files with 101 additions and 0 deletions
100
Mage.Sets/src/mage/cards/n/NethroiApexOfDeath.java
Normal file
100
Mage.Sets/src/mage/cards/n/NethroiApexOfDeath.java
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
package mage.cards.n;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.MutatesSourceTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||||
|
import mage.abilities.keyword.DeathtouchAbility;
|
||||||
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
|
import mage.abilities.keyword.MutateAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class NethroiApexOfDeath extends CardImpl {
|
||||||
|
|
||||||
|
public NethroiApexOfDeath(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{B}{G}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.CAT);
|
||||||
|
this.subtype.add(SubType.NIGHTMARE);
|
||||||
|
this.subtype.add(SubType.BEAST);
|
||||||
|
this.power = new MageInt(5);
|
||||||
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
// Mutate {4}{G/W}{B}{B}
|
||||||
|
this.addAbility(new MutateAbility(this, "{4}{G/W}{B}{B}"));
|
||||||
|
|
||||||
|
// Deathtouch
|
||||||
|
this.addAbility(DeathtouchAbility.getInstance());
|
||||||
|
|
||||||
|
// Lifelink
|
||||||
|
this.addAbility(LifelinkAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever this creature mutates, return any number of target creature cards with total power 10 or less from your graveyard to the battlefield.
|
||||||
|
Ability ability = new MutatesSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()
|
||||||
|
.setText("return any number of target creature cards with total power 10 or less from your graveyard to the battlefield"));
|
||||||
|
ability.addTarget(new NethroiApexOfDeathTarget());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private NethroiApexOfDeath(final NethroiApexOfDeath card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NethroiApexOfDeath copy() {
|
||||||
|
return new NethroiApexOfDeath(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class NethroiApexOfDeathTarget extends TargetCardInYourGraveyard {
|
||||||
|
|
||||||
|
private static final FilterCard filter
|
||||||
|
= new FilterCreatureCard("creature cards with total power 10 or less from your graveyard");
|
||||||
|
|
||||||
|
NethroiApexOfDeathTarget() {
|
||||||
|
super(0, Integer.MAX_VALUE, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private NethroiApexOfDeathTarget(final NethroiApexOfDeathTarget target) {
|
||||||
|
super(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NethroiApexOfDeathTarget copy() {
|
||||||
|
return new NethroiApexOfDeathTarget(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {
|
||||||
|
if (!super.canTarget(controllerId, id, source, game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Card card = game.getCard(id);
|
||||||
|
if (card == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int powerSum = this
|
||||||
|
.getTargets()
|
||||||
|
.stream()
|
||||||
|
.map(game::getCard)
|
||||||
|
.map(Card::getPower)
|
||||||
|
.mapToInt(MageInt::getValue)
|
||||||
|
.sum();
|
||||||
|
return card.getPower().getValue() + powerSum <= 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -50,6 +50,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Migration Path", 164, Rarity.UNCOMMON, mage.cards.m.MigrationPath.class));
|
cards.add(new SetCardInfo("Migration Path", 164, Rarity.UNCOMMON, mage.cards.m.MigrationPath.class));
|
||||||
cards.add(new SetCardInfo("Mosscoat Goriak", 167, Rarity.COMMON, mage.cards.m.MosscoatGoriak.class));
|
cards.add(new SetCardInfo("Mosscoat Goriak", 167, Rarity.COMMON, mage.cards.m.MosscoatGoriak.class));
|
||||||
cards.add(new SetCardInfo("Mysterious Egg", 3, Rarity.COMMON, mage.cards.m.MysteriousEgg.class));
|
cards.add(new SetCardInfo("Mysterious Egg", 3, Rarity.COMMON, mage.cards.m.MysteriousEgg.class));
|
||||||
|
cards.add(new SetCardInfo("Nethroi, Apex of Death", 197, Rarity.MYTHIC, mage.cards.n.NethroiApexOfDeath.class));
|
||||||
cards.add(new SetCardInfo("Neutralize", 59, Rarity.UNCOMMON, mage.cards.n.Neutralize.class));
|
cards.add(new SetCardInfo("Neutralize", 59, Rarity.UNCOMMON, mage.cards.n.Neutralize.class));
|
||||||
cards.add(new SetCardInfo("Pacifism", 25, Rarity.COMMON, mage.cards.p.Pacifism.class));
|
cards.add(new SetCardInfo("Pacifism", 25, Rarity.COMMON, mage.cards.p.Pacifism.class));
|
||||||
cards.add(new SetCardInfo("Phase Dolphin", 62, Rarity.COMMON, mage.cards.p.PhaseDolphin.class));
|
cards.add(new SetCardInfo("Phase Dolphin", 62, Rarity.COMMON, mage.cards.p.PhaseDolphin.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue