mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Initial work on the Time Vault hidden plane.
This commit is contained in:
@@ -34,7 +34,7 @@ public class ConquestPlaneSelector extends FDisplayObject {
|
|||||||
private static final float MONITOR_LEFT_MULTIPLIER = 19f / 443f;
|
private static final float MONITOR_LEFT_MULTIPLIER = 19f / 443f;
|
||||||
private static final float ARROW_THICKNESS = Utils.scale(3);
|
private static final float ARROW_THICKNESS = Utils.scale(3);
|
||||||
|
|
||||||
private static final List<ConquestPlane> planes = ImmutableList.copyOf(Iterables.filter(FModel.getPlanes(), new Predicate<ConquestPlane>() {
|
private static List<ConquestPlane> planes = ImmutableList.copyOf(Iterables.filter(FModel.getPlanes(), new Predicate<ConquestPlane>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(ConquestPlane plane) {
|
public boolean apply(ConquestPlane plane) {
|
||||||
return !plane.isUnreachable(); //filter out unreachable planes
|
return !plane.isUnreachable(); //filter out unreachable planes
|
||||||
@@ -131,7 +131,7 @@ public class ConquestPlaneSelector extends FDisplayObject {
|
|||||||
ConquestPlane plane = getSelectedPlane();
|
ConquestPlane plane = getSelectedPlane();
|
||||||
String desc = plane.getDescription();
|
String desc = plane.getDescription();
|
||||||
if (!desc.isEmpty()) {
|
if (!desc.isEmpty()) {
|
||||||
GuiDialog.message(plane.getDescription().replace("\\n", "\n"), plane.getName());
|
GuiDialog.message(plane.getDescription().replace("\\n", "\n"), plane.getName().replace("_", " "));
|
||||||
} else {
|
} else {
|
||||||
GuiDialog.message("This plane has no description.", plane.getName());
|
GuiDialog.message("This plane has no description.", plane.getName());
|
||||||
}
|
}
|
||||||
@@ -206,7 +206,7 @@ public class ConquestPlaneSelector extends FDisplayObject {
|
|||||||
float monitorBottom = monitorTop + monitorHeight;
|
float monitorBottom = monitorTop + monitorHeight;
|
||||||
float remainingHeight = h - monitorBottom;
|
float remainingHeight = h - monitorBottom;
|
||||||
ConquestPlane plane = getSelectedPlane();
|
ConquestPlane plane = getSelectedPlane();
|
||||||
g.drawText(plane.getName(), PLANE_NAME_FONT, Color.WHITE, textLeft, monitorBottom, w - 2 * textLeft, remainingHeight, false, HAlignment.CENTER, true);
|
g.drawText(plane.getName().replace("_", " " ), PLANE_NAME_FONT, Color.WHITE, textLeft, monitorBottom, w - 2 * textLeft, remainingHeight, false, HAlignment.CENTER, true);
|
||||||
|
|
||||||
//draw left/right arrows
|
//draw left/right arrows
|
||||||
float yMid = monitorBottom + remainingHeight / 2;
|
float yMid = monitorBottom + remainingHeight / 2;
|
||||||
@@ -224,4 +224,13 @@ public class ConquestPlaneSelector extends FDisplayObject {
|
|||||||
g.drawLine(ARROW_THICKNESS, Color.WHITE, xMid + offsetX, yMid - 1, xMid - offsetX, yMid + offsetY);
|
g.drawLine(ARROW_THICKNESS, Color.WHITE, xMid + offsetX, yMid - 1, xMid - offsetX, yMid + offsetY);
|
||||||
rightArrowBounds = new Rectangle(w - leftArrowBounds.width, monitorBottom, leftArrowBounds.width, remainingHeight);
|
rightArrowBounds = new Rectangle(w - leftArrowBounds.width, monitorBottom, leftArrowBounds.width, remainingHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateReachablePlanes() {
|
||||||
|
planes = ImmutableList.copyOf(Iterables.filter(FModel.getPlanes(), new Predicate<ConquestPlane>() {
|
||||||
|
@Override
|
||||||
|
public boolean apply(ConquestPlane plane) {
|
||||||
|
return !plane.isUnreachable();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class ConquestPlaneswalkScreen extends FScreen {
|
|||||||
public void onActivate() {
|
public void onActivate() {
|
||||||
ConquestData model = FModel.getConquest().getModel();
|
ConquestData model = FModel.getConquest().getModel();
|
||||||
setHeaderCaption(model.getName());
|
setHeaderCaption(model.getName());
|
||||||
|
planeSelector.updateReachablePlanes();
|
||||||
planeSelector.setCurrentPlane(model.getCurrentPlane());
|
planeSelector.setCurrentPlane(model.getCurrentPlane());
|
||||||
planeSelector.activate();
|
planeSelector.activate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Name:Josu Vess, Lich Knight|Deck:Josu Vess, Lich Knight.dck|Variant:Commander|Av
|
|||||||
Name:Kazarov, Sengir Pureblood|Deck:Kazarov, Sengir Pureblood.dck|Variant:Commander|Avatar:Kazarov, Sengir Pureblood|Desc:
|
Name:Kazarov, Sengir Pureblood|Deck:Kazarov, Sengir Pureblood.dck|Variant:Commander|Avatar:Kazarov, Sengir Pureblood|Desc:
|
||||||
Name:Arvad the Cursed|Deck:Arvad the Cursed.dck|Variant:Commander|Avatar:Arvad the Cursed|Desc:
|
Name:Arvad the Cursed|Deck:Arvad the Cursed.dck|Variant:Commander|Avatar:Arvad the Cursed|Desc:
|
||||||
Name:Liliana, the Necromancer|Deck:Liliana, the Necromancer.dck|Variant:Planeswalker|Avatar:Liliana, the Necromancer|Desc:
|
Name:Liliana, the Necromancer|Deck:Liliana, the Necromancer.dck|Variant:Planeswalker|Avatar:Liliana, the Necromancer|Desc:
|
||||||
Name:Isareth the Awakener|Deck:Isareth the Awakener.dck|Variant:Commander|Avatar:Isareth the Awakener|Desc:
|
Name:Demonlord Belzenlok|Deck:Demonlord Belzenlok.dck|Variant:Planechase|Avatar:Demonlord Belzenlok|TemporaryUnlock:Time_Vault|Desc:
|
||||||
Name:Yargle, Glutton of Urborg|Deck:Yargle, Glutton of Urborg.dck|Variant:Commander|Avatar:Yargle, Glutton of Urborg|Desc:
|
Name:Yargle, Glutton of Urborg|Deck:Yargle, Glutton of Urborg.dck|Variant:Commander|Avatar:Yargle, Glutton of Urborg|Desc:
|
||||||
|
Name:Isareth the Awakener|Deck:Isareth the Awakener.dck|Variant:Commander|Avatar:Isareth the Awakener|Desc:
|
||||||
Name:Necropotence|Deck:Necropotence.dck|Variant:Vanguard|Avatar:Necropotence|Desc:
|
Name:Necropotence|Deck:Necropotence.dck|Variant:Vanguard|Avatar:Necropotence|Desc:
|
||||||
Name:Demonlord Belzenlok|Deck:Demonlord Belzenlok.dck|Variant:Planechase|Avatar:Demonlord Belzenlok|Desc:
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
Name:EVENT1|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT2|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT3|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT4|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT5|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT6|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT7|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT8|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT9|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
Name:EVENT1|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT2|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT3|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT4|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT5|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT6|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT7|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT8|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
|
Name:EVENT9|Deck:Random.dck|Variant:None|Avatar:None|Desc:
|
||||||
26
forge-gui/res/conquest/planes/Time_Vault/cards.txt
Normal file
26
forge-gui/res/conquest/planes/Time_Vault/cards.txt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Crown of Empires
|
||||||
|
Scepter of Empires
|
||||||
|
Throne of Empires
|
||||||
|
Roc Egg
|
||||||
|
Brindle Boar
|
||||||
|
Armored Cancrix
|
||||||
|
Academy Raider
|
||||||
|
Alaborn Cavalier
|
||||||
|
Prossh, Skyraider of Kher
|
||||||
|
Balance of Power
|
||||||
|
Beetleback Chief
|
||||||
|
Crimson Mage
|
||||||
|
Cruel Edict
|
||||||
|
Dakmor Lancer
|
||||||
|
Famine
|
||||||
|
Firewing Phoenix
|
||||||
|
Flesh to Dust
|
||||||
|
Flusterstorm
|
||||||
|
Freyalise, Llanowar's Fury
|
||||||
|
Gaea's Revenge
|
||||||
|
Ice Cage
|
||||||
|
Liliana, Heretical Healer
|
||||||
|
Mwonvuli Beast Tracker
|
||||||
|
Teferi, Temporal Archmage
|
||||||
|
Titania, Protector of Argoth
|
||||||
|
Onyx Mage
|
||||||
1
forge-gui/res/conquest/planes/Time_Vault/plane_cards.txt
Normal file
1
forge-gui/res/conquest/planes/Time_Vault/plane_cards.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Time Vault
|
||||||
2
forge-gui/res/conquest/planes/Time_Vault/regions.txt
Normal file
2
forge-gui/res/conquest/planes/Time_Vault/regions.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Name:Chronicle of Ages|Art:Time Vault|Colors:WUBRG
|
||||||
|
Name:The Memory Lane|Art:Cast Through Time|Colors:WUBRG
|
||||||
21
forge-gui/res/conquest/planes/Time_Vault/sets.txt
Normal file
21
forge-gui/res/conquest/planes/Time_Vault/sets.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
ICE
|
||||||
|
ALL
|
||||||
|
CSP
|
||||||
|
MIR
|
||||||
|
VIS
|
||||||
|
WTH
|
||||||
|
USG
|
||||||
|
ULG
|
||||||
|
UDS
|
||||||
|
INV
|
||||||
|
PLS
|
||||||
|
APC
|
||||||
|
ODY
|
||||||
|
TOR
|
||||||
|
JUD
|
||||||
|
ONS
|
||||||
|
LGN
|
||||||
|
SCG
|
||||||
|
TSP
|
||||||
|
PLC
|
||||||
|
FUT
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
Name:Alara|RegionSize:9|Desc:As the boundaries between the shards dissolve, cultures clash and wars ensue.\nConsists of 54 events. Contains cards from ALA, CON, ARB, C13, and more.
|
Name:Alara|RegionSize:9|Desc:As the boundaries between the shards dissolve, cultures clash and wars ensue.\nConsists of 54 events. Contains cards from ALA, CON, ARB, C13, and more.
|
||||||
Name:Amonkhet|RegionSize:9|Desc:On the surface, Amonkhet seems like a marvelous place to live, but something unsettling and nefarious lurks behind the grand facade.\nConsists of 45 events. Contains cards from AKH, HOU, some C17, and Amonkhet Invocations.
|
Name:Amonkhet|RegionSize:9|Desc:On the surface, Amonkhet seems like a marvelous place to live, but something unsettling and nefarious lurks behind the grand facade.\nConsists of 45 events. Contains cards from AKH, HOU, some C17, and Amonkhet Invocations.
|
||||||
Name:Dominaria|RegionSize:9|Desc:The legendary plane, once the Nexus of the Multiverse. With the last Time Rift closed, Dominaria's mana flowed back into the land instantaneously, and the world healed and rejuvenated quickly with that infusion of power. After generations of peaceful development, much of Dominaria has managed to rebuild the cultures of its past. Yet, shortly after the Mending, the Cabal began to grow in strength and came under the control of the Demonlord Belzenlok.\nConsists of 45 events. Contains cards from DOM and most of M19 and C18.
|
Name:Dominaria|RegionSize:9|Desc:The legendary plane, once the Nexus of the Multiverse. With the last Time Rift closed, Dominaria's mana flowed back into the land instantaneously, and the world healed and rejuvenated quickly with that infusion of power. After generations of peaceful development, much of Dominaria has managed to rebuild the cultures of its past. Yet, shortly after the Mending, the Cabal began to grow in strength and came under the control of the Demonlord Belzenlok. Legends say that a mysterious Time Vault is hidden somewhere deep in this plane, though no one knows if this rumor is true...\nConsists of 45 events. Contains cards from DOM and most of M19 and C18.
|
||||||
Name:Innistrad|RegionSize:9|Desc:On this plane, humanity is terrorized by vampires, werewolves, zombies, and ghouls.\nConsists of 45 events. Contains cards from ISD, DKA, AVR, SOI, EMN, and C14.
|
Name:Innistrad|RegionSize:9|Desc:On this plane, humanity is terrorized by vampires, werewolves, zombies, and ghouls.\nConsists of 45 events. Contains cards from ISD, DKA, AVR, SOI, EMN, and C14.
|
||||||
Name:Ixalan|RegionSize:9|Desc:On Ixalan, the untamed jungles have hidden a coveted secret: Orazca, the city of gold, and rivals embark on a journey to claim the plane's greatest fortune for themselves.\nConsists of 45 events. Contains cards from XLN, RIX.
|
Name:Ixalan|RegionSize:9|Desc:On Ixalan, the untamed jungles have hidden a coveted secret: Orazca, the city of gold, and rivals embark on a journey to claim the plane's greatest fortune for themselves.\nConsists of 45 events. Contains cards from XLN, RIX.
|
||||||
Name:Kaladesh|RegionSize:9|Desc:Kaladesh is a living work of art. Aether is inextricably woven into the world's culture of inspired invention.\nConsists of 45 events. Contains cards from KLD, AER, some C17, and Kaladesh Inventions.
|
Name:Kaladesh|RegionSize:9|Desc:Kaladesh is a living work of art. Aether is inextricably woven into the world's culture of inspired invention.\nConsists of 45 events. Contains cards from KLD, AER, some C17, and Kaladesh Inventions.
|
||||||
@@ -14,5 +14,6 @@ Name:Regatha|RegionSize:6|Unreachable:True|Desc:
|
|||||||
Name:Shandalar|RegionSize:9|Unreachable:True|Desc:
|
Name:Shandalar|RegionSize:9|Unreachable:True|Desc:
|
||||||
Name:Tarkir|RegionSize:9|Desc:A plane dominated by five powerful clans... or five powerful dragon lords.\nConsists of 45 events. Contains cards from KTK, FRF, DTK, CMD, CNS/CN2, some C17.
|
Name:Tarkir|RegionSize:9|Desc:A plane dominated by five powerful clans... or five powerful dragon lords.\nConsists of 45 events. Contains cards from KTK, FRF, DTK, CMD, CNS/CN2, some C17.
|
||||||
Name:Theros|RegionSize:9|Desc:Mortals tremble before an awe-inspiring pantheon of gods.\nConsists of 45 events. Contains cards from THS, BNG, JOU, HOP, PCA, and more.
|
Name:Theros|RegionSize:9|Desc:Mortals tremble before an awe-inspiring pantheon of gods.\nConsists of 45 events. Contains cards from THS, BNG, JOU, HOP, PCA, and more.
|
||||||
|
Name:Time_Vault|RegionSize:9|Unreachable:True|Desc:A mysterious and legendary Time Vault, allowing one to travel back in time and revisit the ages long past and experience the history of Dominaria.\nConsists of 18 events. Contains cards from ICE, ALL, CSP, MIR, VIS, WTH, USG, ULG, UDS, INV, PLS, APC, ODY, TOR, JUD, ONS, LGN, SCG, TSP, PLC, and FUT.\n\nThe portal to this plane is unstable and will close soon, so hasten your step, planeswalker, while you have the chance...
|
||||||
Name:Ulgrotha|RegionSize:6|Unreachable:True|Desc:
|
Name:Ulgrotha|RegionSize:6|Unreachable:True|Desc:
|
||||||
Name:Zendikar|RegionSize:9|Desc:This land of primal mana was lethal even before its Eldrazi prisoners escaped.\nConsists of 60 events. Contains cards from ZEN, WWK, ROE, BFZ, OGW, and C16.
|
Name:Zendikar|RegionSize:9|Desc:This land of primal mana was lethal even before its Eldrazi prisoners escaped.\nConsists of 60 events. Contains cards from ZEN, WWK, ROE, BFZ, OGW, and C16.
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ public abstract class ConquestBattle {
|
|||||||
view.getBtnRestart().setVisible(false);
|
view.getBtnRestart().setVisible(false);
|
||||||
view.getBtnQuit().setText("Great!");
|
view.getBtnQuit().setText("Great!");
|
||||||
model.addWin(this);
|
model.addWin(this);
|
||||||
|
if (location.getEvent().getTemporaryUnlock() != null) {
|
||||||
|
ConquestUtil.makePlaneTemporarilyAccessible(location.getEvent().getTemporaryUnlock());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
view.getBtnRestart().setVisible(true);
|
view.getBtnRestart().setVisible(true);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class ConquestCommander implements InventoryItem, IXmlWritable {
|
|||||||
if (originPlane == null) {
|
if (originPlane == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return originPlane.getName() + " - " + originRegionName;
|
return originPlane.getName().replace("_", " ") + " - " + originRegionName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConquestPlane getOriginPlane() {
|
public ConquestPlane getOriginPlane() {
|
||||||
|
|||||||
@@ -25,16 +25,18 @@ public class ConquestEvent {
|
|||||||
private final String deckPath;
|
private final String deckPath;
|
||||||
private final Set<GameType> variants;
|
private final Set<GameType> variants;
|
||||||
private final String avatar;
|
private final String avatar;
|
||||||
|
private final String tempUnlock;
|
||||||
private PaperCard avatarCard;
|
private PaperCard avatarCard;
|
||||||
private Deck deck;
|
private Deck deck;
|
||||||
|
|
||||||
public ConquestEvent(ConquestRegion region0, String name0, String description0, String deckPath0, Set<GameType> variants0, String avatar0) {
|
public ConquestEvent(ConquestRegion region0, String name0, String description0, String deckPath0, Set<GameType> variants0, String avatar0, String tempUnlock0) {
|
||||||
region = region0;
|
region = region0;
|
||||||
name = name0;
|
name = name0;
|
||||||
description = description0;
|
description = description0;
|
||||||
deckPath = deckPath0;
|
deckPath = deckPath0;
|
||||||
variants = variants0;
|
variants = variants0;
|
||||||
avatar = avatar0;
|
avatar = avatar0;
|
||||||
|
tempUnlock = tempUnlock0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@@ -73,6 +75,8 @@ public class ConquestEvent {
|
|||||||
return avatar;
|
return avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTemporaryUnlock() { return tempUnlock; }
|
||||||
|
|
||||||
public PaperCard getAvatarCard() {
|
public PaperCard getAvatarCard() {
|
||||||
if (avatarCard == null && avatar != null) {
|
if (avatarCard == null && avatar != null) {
|
||||||
//attempt to load card from plane's card pool
|
//attempt to load card from plane's card pool
|
||||||
@@ -120,6 +124,7 @@ public class ConquestEvent {
|
|||||||
Set<GameType> variants = EnumSet.noneOf(GameType.class);
|
Set<GameType> variants = EnumSet.noneOf(GameType.class);
|
||||||
String avatar = null;
|
String avatar = null;
|
||||||
String description = null;
|
String description = null;
|
||||||
|
String tempUnlock = null;
|
||||||
|
|
||||||
String key, value;
|
String key, value;
|
||||||
String[] pieces = line.split("\\|");
|
String[] pieces = line.split("\\|");
|
||||||
@@ -159,6 +164,9 @@ public class ConquestEvent {
|
|||||||
case "desc":
|
case "desc":
|
||||||
description = value;
|
description = value;
|
||||||
break;
|
break;
|
||||||
|
case "temporaryunlock":
|
||||||
|
tempUnlock = value;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
alertInvalidLine(line, "Invalid event definition.");
|
alertInvalidLine(line, "Invalid event definition.");
|
||||||
break;
|
break;
|
||||||
@@ -168,7 +176,7 @@ public class ConquestEvent {
|
|||||||
deck = name + ".dck"; //assume deck file has same name if not specified
|
deck = name + ".dck"; //assume deck file has same name if not specified
|
||||||
}
|
}
|
||||||
deck = file.getParent() + ForgeConstants.PATH_SEPARATOR + deck;
|
deck = file.getParent() + ForgeConstants.PATH_SEPARATOR + deck;
|
||||||
return new ConquestEvent(region, name, description, deck, variants, avatar);
|
return new ConquestEvent(region, name, description, deck, variants, avatar, tempUnlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class ConquestPlane {
|
|||||||
private final String name;
|
private final String name;
|
||||||
private final String directory;
|
private final String directory;
|
||||||
private final String description;
|
private final String description;
|
||||||
private final boolean unreachable;
|
private boolean unreachable;
|
||||||
private final int rowsPerRegion;
|
private final int rowsPerRegion;
|
||||||
private final int cols;
|
private final int cols;
|
||||||
|
|
||||||
@@ -93,6 +93,10 @@ public class ConquestPlane {
|
|||||||
return unreachable;
|
return unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTemporarilyReachable(boolean reachable) {
|
||||||
|
unreachable = !reachable;
|
||||||
|
}
|
||||||
|
|
||||||
public FCollectionView<ConquestRegion> getRegions() {
|
public FCollectionView<ConquestRegion> getRegions() {
|
||||||
ensureRegionsLoaded();
|
ensureRegionsLoaded();
|
||||||
return regions;
|
return regions;
|
||||||
@@ -173,7 +177,7 @@ public class ConquestPlane {
|
|||||||
}
|
}
|
||||||
//if not enough events defined, create random events for remaining
|
//if not enough events defined, create random events for remaining
|
||||||
while (eventIndex < regionEndIndex) {
|
while (eventIndex < regionEndIndex) {
|
||||||
events[eventIndex++] = new ConquestEvent(region, region.getName() + " - Random " + ((eventIndex % eventsPerRegion) + 1), null, null, EnumSet.noneOf(GameType.class), null);
|
events[eventIndex++] = new ConquestEvent(region, region.getName() + " - Random " + ((eventIndex % eventsPerRegion) + 1), null, null, EnumSet.noneOf(GameType.class), null, null);
|
||||||
}
|
}
|
||||||
regionEndIndex += eventsPerRegion;
|
regionEndIndex += eventsPerRegion;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class ConquestRegion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return plane.getName() + " - " + name;
|
return plane.getName().replace("_", " ") + " - " + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Reader extends FCollectionReader<ConquestRegion> {
|
public static class Reader extends FCollectionReader<ConquestRegion> {
|
||||||
|
|||||||
@@ -154,6 +154,24 @@ public class ConquestUtil {
|
|||||||
return pool;
|
return pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ConquestPlane getPlaneByName(String planeName) {
|
||||||
|
for (ConquestPlane plane : FModel.getPlanes()) {
|
||||||
|
if (plane.getName().equals(planeName)) {
|
||||||
|
return plane;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void makePlaneTemporarilyAccessible(String planeName) {
|
||||||
|
ConquestPlane plane = getPlaneByName(planeName);
|
||||||
|
if (plane != null && plane.isUnreachable()) {
|
||||||
|
plane.setTemporarilyReachable(true);
|
||||||
|
} else {
|
||||||
|
System.err.println("Could not find plane to mark as temporarily accessible: " + planeName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Iterable<PaperCard> getStartingPlaneswalkerOptions(final PaperCard startingCommander) {
|
public static Iterable<PaperCard> getStartingPlaneswalkerOptions(final PaperCard startingCommander) {
|
||||||
final byte colorIdentity = startingCommander.getRules().getColorIdentity().getColor();
|
final byte colorIdentity = startingCommander.getRules().getColorIdentity().getColor();
|
||||||
return Iterables.filter(FModel.getMagicDb().getCommonCards().getUniqueCards(), new Predicate<PaperCard>() {
|
return Iterables.filter(FModel.getMagicDb().getCommonCards().getUniqueCards(), new Predicate<PaperCard>() {
|
||||||
|
|||||||
Reference in New Issue
Block a user