Add Carrion Grub

This commit is contained in:
swordshine
2020-06-20 21:51:29 +08:00
parent 2ec4479994
commit c9e0d7722c
2 changed files with 17 additions and 4 deletions

View File

@@ -719,10 +719,13 @@ public class CardFactoryUtil {
return c.getImprintedCards().get(0).getCMC();
}
if (l[0].startsWith("GreatestPower_")) {
final String restriction = l[0].substring(14);
final String[] rest = restriction.split(",");
CardCollection list = CardLists.getValidCards(cc.getGame().getCardsIn(ZoneType.Battlefield), rest, cc, c, null);
if (l[0].startsWith("GreatestPower")) {
final String[] lparts = l[0].split("_", 2);
final String[] rest = lparts[1].split(",");
final CardCollectionView cardsInZones = lparts[0].length() > 13
? game.getCardsIn(ZoneType.listValueOf(lparts[0].substring(13)))
: game.getCardsIn(ZoneType.Battlefield);
CardCollection list = CardLists.getValidCards(cardsInZones, rest, cc, c, null);
int highest = 0;
for (final Card crd : list) {
if (crd.getNetPower() > highest) {

View File

@@ -0,0 +1,10 @@
Name:Carrion Grub
ManaCost:3 B
Types:Creature Insect
PT:0/5
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | References$ X | Description$ CARDNAME gets +X/+0, where X is the greatest power among creature cards in your graveyard.
SVar:X:Count$GreatestPowerGraveyard_Creature.YouOwn
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigMill | TriggerDescription$ When CARDNAME enters the battlefield, mill four cards.
SVar:TrigMill:DB$ Mill | Defined$ You | NumCards$ 4
DeckHas:Ability$Graveyard
Oracle:Carrion Grub gets +X/+0, where X is the greatest power among creature cards in your graveyard.\nWhen Carrion Grub enters the battlefield, mill four cards. (Put the top four cards of your library into your graveyard.)