mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Update Charmed Pendant to be compatible with ChangeText effects
This commit is contained in:
@@ -286,6 +286,8 @@ public class AbilityUtils {
|
|||||||
list = sa.getRootAbility().getPaidList("ExiledCards");
|
list = sa.getRootAbility().getPaidList("ExiledCards");
|
||||||
} else if (defined.startsWith("Exiled")) {
|
} else if (defined.startsWith("Exiled")) {
|
||||||
list = sa.getRootAbility().getPaidList("Exiled");
|
list = sa.getRootAbility().getPaidList("Exiled");
|
||||||
|
} else if (defined.startsWith("Milled")) {
|
||||||
|
list = sa.getRootAbility().getPaidList("Milled");
|
||||||
} else if (defined.startsWith("TappedCards")) {
|
} else if (defined.startsWith("TappedCards")) {
|
||||||
list = sa.getRootAbility().getPaidList("TappedCards");
|
list = sa.getRootAbility().getPaidList("TappedCards");
|
||||||
} else if (defined.startsWith("Tapped")) {
|
} else if (defined.startsWith("Tapped")) {
|
||||||
|
|||||||
@@ -195,6 +195,26 @@ public class ManaEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
if (colors == 0) return;
|
if (colors == 0) return;
|
||||||
abMana.setExpressChoice(ColorSet.fromMask(colors));
|
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()) {
|
if (abMana.getExpressChoice().isEmpty()) {
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
Name:Charmed Pendant
|
Name:Charmed Pendant
|
||||||
ManaCost:4
|
ManaCost:4
|
||||||
Types:Artifact
|
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.
|
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.
|
||||||
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
|
|
||||||
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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user