- Added an option to preselect the last known order of simultaneous abilities to simplify confirming the previous order (which is by far the most common thing you'd want).

- Fixed an issue where the wrapped abilities triggered by different objects counted as different abilities for the purpose of remembering simultaneous ability order.
- Updated CHANGES.txt.
This commit is contained in:
Agetian
2017-01-18 12:23:13 +00:00
parent ee65ad43a1
commit c31d1bae80
6 changed files with 32 additions and 5 deletions

View File

@@ -116,6 +116,7 @@ public enum CSubmenuPreferences implements ICDoc {
lstControls.add(Pair.of(view.getCbManaLostPrompt(), FPref.UI_MANA_LOST_PROMPT)); lstControls.add(Pair.of(view.getCbManaLostPrompt(), FPref.UI_MANA_LOST_PROMPT));
lstControls.add(Pair.of(view.getCbEscapeEndsTurn(), FPref.UI_ALLOW_ESC_TO_END_TURN)); lstControls.add(Pair.of(view.getCbEscapeEndsTurn(), FPref.UI_ALLOW_ESC_TO_END_TURN));
lstControls.add(Pair.of(view.getCbDetailedPaymentDesc(), FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)); lstControls.add(Pair.of(view.getCbDetailedPaymentDesc(), FPref.UI_DETAILED_SPELLDESC_IN_PROMPT));
lstControls.add(Pair.of(view.getcbPreselectPrevAbOrder(), FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER));
lstControls.add(Pair.of(view.getCbFilterLandsByColorId(), FPref.UI_FILTER_LANDS_BY_COLOR_IDENTITY)); lstControls.add(Pair.of(view.getCbFilterLandsByColorId(), FPref.UI_FILTER_LANDS_BY_COLOR_IDENTITY));

View File

@@ -82,6 +82,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
private final JCheckBox cbPauseWhileMinimized = new OptionsCheckBox("Pause While Minimized"); private final JCheckBox cbPauseWhileMinimized = new OptionsCheckBox("Pause While Minimized");
private final JCheckBox cbCompactPrompt = new OptionsCheckBox("Compact Prompt"); private final JCheckBox cbCompactPrompt = new OptionsCheckBox("Compact Prompt");
private final JCheckBox cbEscapeEndsTurn = new OptionsCheckBox("Use Escape Key to End Turn"); private final JCheckBox cbEscapeEndsTurn = new OptionsCheckBox("Use Escape Key to End Turn");
private final JCheckBox cbPreselectPrevAbOrder = new OptionsCheckBox("Preselect Last Order of Abilities");
private final JCheckBox cbHideReminderText = new OptionsCheckBox("Hide Reminder Text"); private final JCheckBox cbHideReminderText = new OptionsCheckBox("Hide Reminder Text");
private final JCheckBox cbOpenPacksIndiv = new OptionsCheckBox("Open Packs Individually"); private final JCheckBox cbOpenPacksIndiv = new OptionsCheckBox("Open Packs Individually");
private final JCheckBox cbTokensInSeparateRow = new OptionsCheckBox("Display Tokens in a Separate Row"); private final JCheckBox cbTokensInSeparateRow = new OptionsCheckBox("Display Tokens in a Separate Row");
@@ -170,6 +171,9 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
pnlPrefs.add(cbDetailedPaymentDesc, regularConstraints); pnlPrefs.add(cbDetailedPaymentDesc, regularConstraints);
pnlPrefs.add(new NoteLabel("When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."), regularConstraints); pnlPrefs.add(new NoteLabel("When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."), regularConstraints);
pnlPrefs.add(cbPreselectPrevAbOrder, regularConstraints);
pnlPrefs.add(new NoteLabel("When enabled, preselects the last defined simultaneous ability order in the ordering dialog."), regularConstraints);
// Deck building options // Deck building options
pnlPrefs.add(new SectionLabel("Random Deck Generation"), sectionConstraints); pnlPrefs.add(new SectionLabel("Random Deck Generation"), sectionConstraints);
@@ -614,6 +618,10 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
return cbDetailedPaymentDesc; return cbDetailedPaymentDesc;
} }
public final JCheckBox getcbPreselectPrevAbOrder() {
return cbPreselectPrevAbOrder;
}
/** @return {@link forge.toolbox.FLabel} */ /** @return {@link forge.toolbox.FLabel} */
public FLabel getBtnReset() { public FLabel getBtnReset() {
return btnReset; return btnReset;

View File

@@ -122,6 +122,10 @@ public class SettingsPage extends TabPage<SettingsScreen> {
"Spell Description in Payment Prompt", "Spell Description in Payment Prompt",
"When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."), "When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."),
1); 1);
lstSettings.addItem(new BooleanSetting(FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER,
"Preselect Last Order of Abilities",
"When enabled, preselects the last defined simultaneous ability order in the ordering dialog."),
1);
//Random Deck Generation //Random Deck Generation
lstSettings.addItem(new BooleanSetting(FPref.DECKGEN_NOSMALL, lstSettings.addItem(new BooleanSetting(FPref.DECKGEN_NOSMALL,

View File

@@ -8,8 +8,11 @@ Forge Beta: 01-13-2017 ver 1.5.58
Release Notes Release Notes
------------- -------------
- Aether Revolt (pre-release) - - New Option: Preselect Last Known Order of Simultaneous Abilities -
This release features many Aether Revolt cards that you can play with in all game modes. The remaining cards are expected to be scripted in the upcoming versions of Forge. Since this is the first release featuring Aether Revolt in its pre-release period, some issues are to be expected, please report any bugs and inconsistencies you experience with these cards at the forums. In both desktop and mobile Forge, there is now an option in Forge Preferences called "Preselect Last Order of Abilities" that preselects the last known order of simultaneous abilities, thus making it possible to just use "Space" once to confirm the previous order instead of having to press Space for each ability or clicking the ">>" button to add the previous order once more. This option is currently disabled by default to avoid being confusing to users who are used to doing it the way it used to be before.
- Aether Revolt -
This release features all Aether Revolt cards that you can play with in all game modes. There are still some remaining caveats and issues that are hopefully going to be addressed soon. Please report any issues you encounter with the new cards.
- Commander 2016 - - Commander 2016 -
This release features most Commander 2016 cards scripted and ready to play. The few remaining cards that are not currently supported may be scripted in the upcoming versions of Forge. This release features most Commander 2016 cards scripted and ready to play. The few remaining cards that are not currently supported may be scripted in the upcoming versions of Forge.

View File

@@ -1198,12 +1198,17 @@ public class PlayerControllerHuman
List<SpellAbility> orderedSAs = activePlayerSAs; List<SpellAbility> orderedSAs = activePlayerSAs;
if (activePlayerSAs.size() > 1) { if (activePlayerSAs.size() > 1) {
final String firstStr = activePlayerSAs.get(0).toString(); final String firstStr = activePlayerSAs.get(0).toString();
Integer idxAdditionalInfo = firstStr.indexOf(" ["); // no need for extra granularity based on a specific zone changer object etc.
boolean needPrompt = false; boolean needPrompt = false;
String saLookupKey = firstStr; String saLookupKey = idxAdditionalInfo != -1 ? firstStr.substring(0, idxAdditionalInfo - 1) : firstStr;
char delim = (char)5; char delim = (char)5;
for (int i = 1; i < activePlayerSAs.size(); i++) { for (int i = 1; i < activePlayerSAs.size(); i++) {
SpellAbility currentSa = activePlayerSAs.get(i); SpellAbility currentSa = activePlayerSAs.get(i);
String saStr = currentSa.toString(); String saStr = currentSa.toString();
idxAdditionalInfo = saStr.indexOf(" [");
if (idxAdditionalInfo != -1) {
saStr = saStr.substring(0, idxAdditionalInfo - 1);
}
if (!needPrompt && !saStr.equals(firstStr)) { if (!needPrompt && !saStr.equals(firstStr)) {
needPrompt = true; //prompt by default unless all abilities are the same needPrompt = true; //prompt by default unless all abilities are the same
} }
@@ -1218,8 +1223,13 @@ public class PlayerControllerHuman
orderedSAs.add(activePlayerSAs.get(index)); orderedSAs.add(activePlayerSAs.get(index));
} }
} }
orderedSAs = getGui().order(((savedOrder==null)?"Select order for":"Reorder") + " simultaneous abilities", if (savedOrder != null) {
"Resolve first", orderedSAs, null); boolean preselect = FModel.getPreferences().getPrefBoolean(FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER);
orderedSAs = getGui().order("Reorder simultaneous abilities", "Resolve first", 0, 0,
preselect ? new ArrayList<SpellAbility>() : orderedSAs, preselect ? orderedSAs : new ArrayList<SpellAbility>(), null, false);
} else {
orderedSAs = getGui().order("Select order for simultaneous abilities", "Resolve first", orderedSAs, null);
}
//save order to avoid needing to prompt a second time to order the same abilities //save order to avoid needing to prompt a second time to order the same abilities
savedOrder = new ArrayList<Integer>(activePlayerSAs.size()); savedOrder = new ArrayList<Integer>(activePlayerSAs.size());
for (SpellAbility sa : orderedSAs) { for (SpellAbility sa : orderedSAs) {

View File

@@ -84,6 +84,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
UI_DISPLAY_CURRENT_COLORS("Never"), UI_DISPLAY_CURRENT_COLORS("Never"),
UI_FILTER_LANDS_BY_COLOR_IDENTITY("true"), UI_FILTER_LANDS_BY_COLOR_IDENTITY("true"),
UI_ALLOW_ESC_TO_END_TURN ("false"), UI_ALLOW_ESC_TO_END_TURN ("false"),
UI_PRESELECT_PREVIOUS_ABILITY_ORDER ("false"),
UI_FOR_TOUCHSCREN("false"), UI_FOR_TOUCHSCREN("false"),