Nethroi (IKO)

This commit is contained in:
Tim Mocny
2021-02-14 00:57:22 +00:00
committed by Anthony Calosa
parent 47fcd88366
commit d7f0665bae
8 changed files with 116 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
Name:Nethroi, Apex of Death
ManaCost:2 W B G
Types:Legendary Creature Cat Nightmare Beast
PT:5/5
K:Mutate:4 GW B B
K:Deathtouch
K:Lifelink
T:Mode$ Mutates | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ Whenever this creature mutates, return any number of target creature cards with total power 10 or less from your graveyard to the battlefield.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | TargetMin$ 0 | TargetMax$ X | References$ X | ValidTgts$ Creature.YouOwn | MaxTotalTargetPower$ 10 | TgtPrompt$ Select any number of creature cards with total power 10 or less
SVar:X:Count$ValidGraveyard Creature.YouOwn
Oracle:Mutate {4}{G/W}{B}{B} (If you cast this spell for its mutate cost, put it over or under target non-Human creature you own. They mutate into the creature on top plus all abilities from under it.)\nDeathtouch, lifelink\nWhenever this creature mutates, return any number of target creature cards with total power 10 or less from your graveyard to the battlefield.

View File

@@ -212,6 +212,20 @@ public final class InputSelectTargets extends InputSyncronizedBase {
}
}
if (sa.hasParam("MaxTotalTargetPower")) {
int maxTotalPower = tgt.getMaxTotalPower(sa.getHostCard(), sa);
if (maxTotalPower > 0) {
int soFar = Aggregates.sum(sa.getTargets().getTargetCards(), CardPredicates.Accessors.fnGetNetPower);
if (!sa.isTargeting(card)) {
soFar += card.getNetPower();
}
if (soFar > maxTotalPower) {
showMessage(sa.getHostCard() + " - Cannot target this card (power limit exceeded)");
return false;
}
}
}
// If all cards must have different controllers
if (tgt.isDifferentControllers()) {
final List<Player> targetedControllers = new ArrayList<>();