- Improved detailed spell ability descriptions when paying costs/targeting by getting rid of the Targeting ERROR text in the prompt box at the time when the SA is not yet targeted by the player.

- Made the detailed SA descriptions on paying costs/targeting optional (can be enabled/disabled in preferences, enabled by default) for people wanting the old behavior (which might especially be useful for mobile Forge on small screens).
This commit is contained in:
Agetian
2017-01-14 19:44:01 +00:00
parent d80a8dcad4
commit ef27adc5c6
7 changed files with 32 additions and 3 deletions

View File

@@ -4,7 +4,9 @@ import forge.game.card.Card;
import forge.game.mana.ManaCostBeingPaid;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.model.FModel;
import forge.player.PlayerControllerHuman;
import forge.properties.ForgePreferences;
import forge.util.ITriggerEvent;
public class InputPayManaOfCostPayment extends InputPayMana {
@@ -48,7 +50,9 @@ public class InputPayManaOfCostPayment extends InputPayMana {
if (messagePrefix != null) {
msg.append(messagePrefix).append("\n");
}
msg.append(saPaidFor.getStackDescription()).append("\n");
if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) {
msg.append(saPaidFor.getStackDescription().replace("(Targeting ERROR)", "")).append("\n");
}
msg.append("Pay Mana Cost: ").append(displayMana);
if (this.phyLifeToLose > 0) {
msg.append(" (");

View File

@@ -23,7 +23,9 @@ import forge.game.card.Card;
import forge.game.mana.ManaCostBeingPaid;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.model.FModel;
import forge.player.PlayerControllerHuman;
import forge.properties.ForgePreferences;
import forge.util.ITriggerEvent;
//pays the cost of a card played from the player's hand
@@ -119,7 +121,10 @@ public class InputPayManaSimple extends InputPayMana {
*/
@Override
protected String getMessage() {
final StringBuilder msg = new StringBuilder(saPaidFor.getStackDescription()).append("\n");
final StringBuilder msg = new StringBuilder();
if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) {
msg.append(saPaidFor.getStackDescription().replace("(Targeting ERROR)", "")).append("\n");
}
msg.append("Pay Mana Cost: ").append(this.manaCost.toString(false, player.getManaPool()));
if (this.phyLifeToLose > 0) {
msg.append(" (");

View File

@@ -16,7 +16,9 @@ import forge.game.card.CardView;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.TargetRestrictions;
import forge.model.FModel;
import forge.player.PlayerControllerHuman;
import forge.properties.ForgePreferences;
import forge.util.ITriggerEvent;
public final class InputSelectTargets extends InputSyncronizedBase {
@@ -59,7 +61,11 @@ public final class InputSelectTargets extends InputSyncronizedBase {
sb.append("Parent Targeted:");
sb.append(sa.getUniqueTargets()).append("\n");
}
sb.append(sa.getStackDescription()).append("\n").append(tgt.getVTSelection());
if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) {
sb.append(sa.getStackDescription().replace("(Targeting ERROR)", "")).append("\n").append(tgt.getVTSelection());
} else {
sb.append(sa.getHostCard() + " - " + tgt.getVTSelection());
}
final int maxTargets = tgt.getMaxTargets(sa.getHostCard(), sa);
final int targeted = sa.getTargets().getNumTargeted();

View File

@@ -56,6 +56,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
UI_COMPACT_PROMPT ("false"),
UI_COMPACT_TABS ("false"),
UI_COMPACT_LIST_ITEMS ("false"),
UI_DETAILED_SPELLDESC_IN_PROMPT ("true"),
UI_CARD_SIZE ("small"),
UI_SINGLE_CARD_ZOOM("false"),
UI_LIBGDX_TEXTURE_FILTERING("false"),