- Ensure that (Targeting ERROR) is removed from the prompt window when showing the SA text when selecting targets.

- Some code formatting.
This commit is contained in:
Agetian
2017-01-20 17:15:38 +00:00
parent 55e34867ff
commit bf98c77eb7
2 changed files with 13 additions and 9 deletions

View File

@@ -52,7 +52,7 @@ public class InputPayManaOfCostPayment extends InputPayMana {
} }
if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) { if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) {
// msg.append(saPaidFor.getStackDescription().replace("(Targeting ERROR)", "")); // msg.append(saPaidFor.getStackDescription().replace("(Targeting ERROR)", ""));
if ( saPaidFor.isSpell() ) { if (saPaidFor.isSpell()) {
msg.append(saPaidFor.getStackDescription().replace("(Targeting ERROR)", "")); msg.append(saPaidFor.getStackDescription().replace("(Targeting ERROR)", ""));
} else { } else {
msg.append(saPaidFor.getHostCard()).append(" - ").append(saPaidFor.toString()); msg.append(saPaidFor.getHostCard()).append(" - ").append(saPaidFor.toString());

View File

@@ -51,12 +51,16 @@ public final class InputSelectTargets extends InputSyncronizedBase {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) { if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) {
// sb.append(sa.getStackDescription().replace("(Targeting ERROR)", "")).append("\n<b>").append(tgt.getVTSelection()).append("</b>\n"); // sb.append(sa.getStackDescription().replace("(Targeting ERROR)", "")).append("\n<b>").append(tgt.getVTSelection()).append("</b>\n");
if ( sa.isAbility() ) { sb.append(sa.getHostCard()).append(" - " ); } if (sa.isAbility()) {
sb.append(sa.toString()).append("\n<b>").append(tgt.getVTSelection()).append("</b>\n"); sb.append(sa.getHostCard()).append(" - ");
}
sb.append(sa.toString().replace("(Targeting ERROR)", "")).append("\n<b>").append(tgt.getVTSelection()).append("</b>\n");
} else { } else {
sb.append(sa.getHostCard()).append(" - ").append(tgt.getVTSelection()).append("\n"); sb.append(sa.getHostCard()).append(" - ").append(tgt.getVTSelection()).append("\n");
} }
if ( ! targetDepth.entrySet().isEmpty() ) { sb.append("Targeted:\n"); } if (!targetDepth.entrySet().isEmpty()) {
sb.append("Targeted:\n");
}
for (final Entry<GameEntity, Integer> o : targetDepth.entrySet()) { for (final Entry<GameEntity, Integer> o : targetDepth.entrySet()) {
sb.append(o.getKey()); sb.append(o.getKey());
if (o.getValue() > 1) { if (o.getValue() > 1) {