mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Dash: fix keyword after AlternativeCost
This commit is contained in:
committed by
Michael Kamensky
parent
235636ca4a
commit
adcd86e7d7
@@ -3849,10 +3849,21 @@ public class CardFactoryUtil {
|
||||
inst.addSpellAbility(sa);
|
||||
} else if (keyword.startsWith("Dash")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String dashString = "SP$ PermanentCreature | Cost$ " + k[1] + " | StackDescription$ CARDNAME (Dash)"
|
||||
+ " | Dash$ True | SpellDescription$ Dash " + ManaCostParser.parse(k[1]) + " (" + inst.getReminderText() + ")";
|
||||
final Cost dashCost = new Cost(k[1], false);
|
||||
|
||||
final SpellAbility newSA = card.getFirstSpellAbility().copyWithDefinedCost(dashCost);
|
||||
|
||||
final StringBuilder desc = new StringBuilder();
|
||||
desc.append("Dash ").append(dashCost.toSimpleString()).append(" (");
|
||||
desc.append(inst.getReminderText());
|
||||
desc.append(")");
|
||||
|
||||
newSA.setDescription(desc.toString());
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append(card.getName()).append(" (Dash)");
|
||||
newSA.setStackDescription(sb.toString());
|
||||
|
||||
final SpellAbility newSA = AbilityFactory.getAbility(dashString, card);
|
||||
newSA.setAlternativeCost(AlternativeCost.Dash);
|
||||
newSA.setIntrinsic(intrinsic);
|
||||
inst.addSpellAbility(newSA);
|
||||
|
||||
Reference in New Issue
Block a user