mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Add launch screen for Planar Conquest events
Support remembering which commander you last selected for an event
This commit is contained in:
@@ -52,6 +52,7 @@ public final class ConquestData {
|
||||
private PaperCard planeswalker;
|
||||
private ISkinImage planeswalkerToken;
|
||||
private ConquestLocation currentLocation;
|
||||
private int selectedCommanderIndex;
|
||||
private int aetherShards;
|
||||
|
||||
private final File directory;
|
||||
@@ -93,6 +94,7 @@ public final class ConquestData {
|
||||
setPlaneswalker(xml.read("planeswalker", cardDb));
|
||||
aetherShards = xml.read("aetherShards", aetherShards);
|
||||
currentLocation = xml.read("currentLocation", ConquestLocation.class);
|
||||
selectedCommanderIndex = xml.read("selectedCommanderIndex", selectedCommanderIndex);
|
||||
xml.read("unlockedCards", unlockedCards, cardDb);
|
||||
xml.read("newCards", newCards, cardDb);
|
||||
xml.read("commanders", commanders, ConquestCommander.class);
|
||||
@@ -148,6 +150,13 @@ public final class ConquestData {
|
||||
return getOrCreatePlaneData(getCurrentPlane());
|
||||
}
|
||||
|
||||
public ConquestCommander getSelectedCommander() {
|
||||
return commanders.get(selectedCommanderIndex);
|
||||
}
|
||||
public void setSelectedCommanderIndex(int index0) {
|
||||
selectedCommanderIndex = index0;
|
||||
}
|
||||
|
||||
public Iterable<PaperCard> getUnlockedCards() {
|
||||
return unlockedCards;
|
||||
}
|
||||
@@ -220,6 +229,7 @@ public final class ConquestData {
|
||||
xml.write("planeswalker", planeswalker);
|
||||
xml.write("aetherShards", aetherShards);
|
||||
xml.write("currentLocation", currentLocation);
|
||||
xml.write("selectedCommanderIndex", selectedCommanderIndex);
|
||||
xml.write("unlockedCards", unlockedCards);
|
||||
xml.write("newCards", newCards);
|
||||
xml.write("commanders", commanders);
|
||||
|
||||
@@ -33,6 +33,7 @@ public abstract class ConquestEvent {
|
||||
|
||||
protected abstract Deck buildOpponentDeck();
|
||||
public abstract void addVariants(Set<GameType> variants);
|
||||
public abstract String getEventName();
|
||||
public abstract String getOpponentName();
|
||||
public abstract String getAvatarImageKey();
|
||||
|
||||
|
||||
@@ -123,6 +123,11 @@ public class ConquestLocation implements IXmlWritable {
|
||||
return ConquestUtil.generateDeck(commander, getRegion().getCardPool(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventName() {
|
||||
return commander.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOpponentName() {
|
||||
return commander.getName();
|
||||
|
||||
Reference in New Issue
Block a user