Fix Card Detail for Equip and Fortify cards

This commit is contained in:
drdev
2013-11-23 22:49:54 +00:00
parent 1cc1516feb
commit 427cef758f
3 changed files with 25 additions and 18 deletions

View File

@@ -2100,7 +2100,7 @@ public class Card extends GameEntity implements Comparable<Card> {
sbLong.append("with another unpaired creature when either ");
sbLong.append("enters the battlefield. They remain paired for ");
sbLong.append("as long as you control both of them)");
} else if (keyword.startsWith("Equip") || keyword.startsWith("Fortification")) {
} else if (keyword.startsWith("Equip") || keyword.startsWith("Fortify")) {
// keyword parsing takes care of adding a proper description
continue;
} else if (keyword.startsWith("CantBeBlockedBy")) {

View File

@@ -2564,12 +2564,13 @@ public class CardFactoryUtil {
if (equipExtras != null) {
abilityStr.append("| ").append(equipExtras[1]).append(" ");
}
if (equipCost.matches(".+<.+>")) { //Something other than a mana cost
abilityStr.append("| PrecostDesc$ Equip - | SpellDescription$ (Attach to target creature you control. Equip only as a sorcery.)");
}
else {
abilityStr.append("| PrecostDesc$ Equip | SpellDescription$ (Attach to target creature you control. Equip only as a sorcery.)");
abilityStr.append("| PrecostDesc$ Equip ");
Cost cost = new Cost(equipCost, true);
if (!cost.isOnlyManaCost()) { //Something other than a mana cost
abilityStr.append("- ");
}
abilityStr.append("| CostDesc$ " + cost.toSimpleString() + " ");
abilityStr.append("| SpellDescription$ (" + cost.toSimpleString() + ": Attach to target creature you control. Equip only as a sorcery.)");
// instantiate attach ability
final SpellAbility sa = AbilityFactory.getAbility(abilityStr.toString(), card);
card.addSpellAbility(sa);
@@ -2597,7 +2598,13 @@ public class CardFactoryUtil {
if (equipExtras != null) {
abilityStr.append("| ").append(equipExtras[1]).append(" ");
}
abilityStr.append("| PrecostDesc$ Fortify | SpellDescription$ (Attach to target land you control. Fortify only as a sorcery.)");
abilityStr.append("| PrecostDesc$ Fortify ");
Cost cost = new Cost(equipCost, true);
if (!cost.isOnlyManaCost()) { //Something other than a mana cost
abilityStr.append("- ");
}
abilityStr.append("| CostDesc$ " + cost.toSimpleString() + " ");
abilityStr.append("| SpellDescription$ (" + cost.toSimpleString() + ": Attach to target land you control. Fortify only as a sorcery.)");
// instantiate attach ability
final SpellAbility sa = AbilityFactory.getAbility(abilityStr.toString(), card);