Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion forge-game/src/main/java/forge/game/GameActionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,15 @@ public static SpellAbility getGraveyardSpellByKeyword(KeywordInterface inst, Spe
// there is a flashback cost (and not the cards cost)
if (keyword.contains(":")) { // K:Flashback:Cost:ExtraParams:ExtraDescription
final String[] k = keyword.split(":");
newSA = sa.copyWithManaCostReplaced(activator, new Cost(k[1], false));

// Default to mana cost if no cost provided
final String costString = k[1];
if (costString.equals("")) {
newSA = sa.copy(activator);
} else {
newSA = sa.copyWithManaCostReplaced(activator, new Cost(k[1], false));
}

String extraParams = k.length > 2 ? k[2] : "";
if (!extraParams.isEmpty()) {
for (Map.Entry<String, String> param : AbilityFactory.getMapParams(extraParams).entrySet()) {
Expand Down
10 changes: 9 additions & 1 deletion forge-game/src/main/java/forge/game/card/CardFactoryUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,15 @@ public static void addReplacementEffect(final KeywordInterface inst, final CardS

if (keyword.contains(":")) { // K:Flashback:Cost:ExtraParams:ExtraDescription
final String[] k = keyword.split(":");
final Cost cost = new Cost(k[1], false);

// Default to mana cost if no cost provided
final String costString = k[1];
Cost cost;
if (costString.equals("")) {
cost = new Cost(card.getManaCost(), false);
} else {
cost = new Cost(k[1], false);
}
sb.append(cost.isOnlyManaCost() ? " " : "—").append(cost.toSimpleString());
sb.append(cost.isOnlyManaCost() ? "" : ".");

Expand Down
Loading