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 331a181c550..239175f7a3d 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -286,6 +286,8 @@ public class AbilityUtils { list = sa.getRootAbility().getPaidList("ExiledCards"); } else if (defined.startsWith("Exiled")) { list = sa.getRootAbility().getPaidList("Exiled"); + } else if (defined.startsWith("Milled")) { + list = sa.getRootAbility().getPaidList("Milled"); } else if (defined.startsWith("TappedCards")) { list = sa.getRootAbility().getPaidList("TappedCards"); } else if (defined.startsWith("Tapped")) { diff --git a/forge-game/src/main/java/forge/game/ability/effects/ManaEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ManaEffect.java index b55bcc90385..8558f46272b 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ManaEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ManaEffect.java @@ -195,6 +195,26 @@ public class ManaEffect extends SpellAbilityEffect { } if (colors == 0) return; abMana.setExpressChoice(ColorSet.fromMask(colors)); + } else if (type.startsWith("EachColoredManaSymbol")) { + final String res = type.split("_")[1]; + final CardCollection list = AbilityUtils.getDefinedCards(card, res, sa); + StringBuilder sb = new StringBuilder(); + for (Card c : list) { + String mana = c.getManaCost().toString(); + for (int i = 0; i < mana.length(); i++) { + char symbol = mana.charAt(i); + switch (symbol) { + case 'W': + case 'U': + case 'B': + case 'R': + case 'G': + sb.append(symbol).append(' '); + break; + } + } + } + abMana.setExpressChoice(sb.toString().trim()); } if (abMana.getExpressChoice().isEmpty()) { diff --git a/forge-gui/res/cardsfolder/c/charmed_pendant.txt b/forge-gui/res/cardsfolder/c/charmed_pendant.txt index 96a96485ba6..062c963d7a8 100644 --- a/forge-gui/res/cardsfolder/c/charmed_pendant.txt +++ b/forge-gui/res/cardsfolder/c/charmed_pendant.txt @@ -1,14 +1,5 @@ Name:Charmed Pendant ManaCost:4 Types:Artifact -A:AB$ Mana | Cost$ T Mill<1> | Produced$ W | Amount$ ManaW | References$ ManaW | InstantSpeed$ True | SubAbility$ DBManaU | SpellDescription$ For each colored mana symbol in the milled card's mana cost, add one mana of that color. Activate this ability only any time you could cast an instant. -SVar:DBManaU:DB$ Mana | Produced$ U | Amount$ ManaU | References$ ManaU | SubAbility$ DBManaB -SVar:DBManaB:DB$ Mana | Produced$ B | Amount$ ManaB | References$ ManaB | SubAbility$ DBManaR -SVar:DBManaR:DB$ Mana | Produced$ R | Amount$ ManaR | References$ ManaR | SubAbility$ DBManaG -SVar:DBManaG:DB$ Mana | Produced$ G | Amount$ ManaG | References$ ManaG -SVar:ManaW:Milled$ChromaSource.W -SVar:ManaU:Milled$ChromaSource.U -SVar:ManaB:Milled$ChromaSource.B -SVar:ManaR:Milled$ChromaSource.R -SVar:ManaG:Milled$ChromaSource.G +A:AB$ Mana | Cost$ T Mill<1> | Produced$ Special EachColoredManaSymbol_Milled | InstantSpeed$ True | SpellDescription$ For each colored mana symbol in the milled card's mana cost, add one mana of that color. Activate this ability only any time you could cast an instant. Oracle:{T}, Mill a card: For each colored mana symbol in the milled card's mana cost, add one mana of that color. Activate this ability only any time you could cast an instant.