mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- A somewhat more fine-grained and less spoiler-y option to order graveyards, now with three states (Never / With Relevant Cards / Always).
This commit is contained in:
@@ -689,10 +689,24 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
||||
@Override
|
||||
public CardCollectionView orderMoveToZoneList(final CardCollectionView cards, final ZoneType destinationZone, final SpellAbility source) {
|
||||
if (source == null || source.getApi() != ApiType.ReorderZone) {
|
||||
if (destinationZone == ZoneType.Graveyard
|
||||
&& (!FModel.getPreferences().getPrefBoolean(FPref.UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED) || !game.isGraveyardOrdered())) {
|
||||
// Ordering not necessary
|
||||
return cards;
|
||||
if (destinationZone == ZoneType.Graveyard) {
|
||||
switch (FModel.getPreferences().getPref(FPref.UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED)) {
|
||||
case ForgeConstants.GRAVEYARD_ORDERING_NEVER:
|
||||
// No ordering is ever performed by the player except when done by effect (AF ReorderZone)
|
||||
return cards;
|
||||
case ForgeConstants.GRAVEYARD_ORDERING_OWN_CARDS:
|
||||
// Order only if the relevant cards controlled by the player determine the potential necessity for it
|
||||
if (!game.isGraveyardOrdered(player)) {
|
||||
return cards;
|
||||
}
|
||||
break;
|
||||
case ForgeConstants.GRAVEYARD_ORDERING_ALWAYS:
|
||||
// Always order cards, no matter if there is a determined case for it or not
|
||||
break;
|
||||
default:
|
||||
// By default, assume no special ordering necessary (but should not get here unless the preference file is borked)
|
||||
return cards;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -289,6 +289,11 @@ public final class ForgeConstants {
|
||||
public static final String AUTO_YIELD_PER_CARD = "Per Card (Each Game)";
|
||||
public static final String AUTO_YIELD_PER_ABILITY = "Per Ability (Each Match)";
|
||||
|
||||
// Constants for Graveyard Ordering
|
||||
public static final String GRAVEYARD_ORDERING_NEVER = "Never";
|
||||
public static final String GRAVEYARD_ORDERING_OWN_CARDS = "With Relevant Cards";
|
||||
public static final String GRAVEYARD_ORDERING_ALWAYS = "Always";
|
||||
|
||||
// Set boolean constant for landscape mode for gdx port
|
||||
public static final boolean isGdxPortLandscape = FileUtil.doesFileExist(ASSETS_DIR + "switch_orientation.ini") ? true : false;
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
||||
UI_ROTATE_PLANE_OR_PHENOMENON("false"),
|
||||
UI_DYNAMIC_PLANECHASE_BG("false"),
|
||||
UI_DISABLE_IMAGES_EFFECT_CARDS("false"),
|
||||
UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED ("false"),
|
||||
UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED ("never"),
|
||||
|
||||
UI_FOR_TOUCHSCREN("false"),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user