diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index 4e04ea09afc..a6a4642396e 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -3565,7 +3565,7 @@ public class AbilityUtils { * @return a int. */ public static int handlePaid(final Iterable paidList, final String string, final Card source, CardTraitBase ctb) { - if (paidList == null) { + if (Iterables.isEmpty(paidList)) { if (string.contains(".")) { final String[] splitString = string.split("\\.", 2); return doXMath(0, splitString[1], source, ctb); @@ -3594,6 +3594,10 @@ public class AbilityUtils { return Aggregates.sum(paidList, CardPredicates.Accessors.fnGetNetToughness); } + if (string.startsWith("GreatestCMC")) { + return Aggregates.max(paidList, CardPredicates.Accessors.fnGetCmc); + } + if (string.startsWith("DifferentCMC")) { final Set diffCMC = new HashSet<>(); for (final Card card : paidList) { diff --git a/forge-gui/res/cardsfolder/upcoming/monstrous_war_leech.txt b/forge-gui/res/cardsfolder/upcoming/monstrous_war_leech.txt index 8fadb4313d6..0e78df44ad0 100644 --- a/forge-gui/res/cardsfolder/upcoming/monstrous_war_leech.txt +++ b/forge-gui/res/cardsfolder/upcoming/monstrous_war_leech.txt @@ -6,7 +6,7 @@ K:Kicker:U K:ETBReplacement:Other:TrigMill SVar:TrigMill:DB$ Mill | NumCards$ 4 | Defined$ You | Condition$ Kicked | SpellDescription$ As CARDNAME enters the battlefield, if it was kicked, mill four cards. (To mill a card, put the top card of your library into your graveyard.) S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the highest mana value among cards in your graveyard. -SVar:X:Count$Valid Creature.YouOwn$GreatestPower +SVar:X:Count$ValidGraveyard Card.YouOwn$GreatestCMC DeckHas:Ability$Graveyard|Mill SVar:NoZeroToughnessAI:True DeckHints:Color$Blue