mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Add commander and his deck to collection when commander added to your arsenal
This commit is contained in:
@@ -50,7 +50,7 @@ public class ConquestController {
|
||||
|
||||
public void load(final ConquestData model0) {
|
||||
model = model0;
|
||||
cardPool = model == null ? null : model.getCardPool();
|
||||
cardPool = model == null ? null : model.getCollection();
|
||||
decks = model == null ? null : model.getDeckStorage();
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public final class ConquestData {
|
||||
private ConquestPlane startingPlane, currentPlane;
|
||||
private List<ConquestCommander> commanders = new ArrayList<ConquestCommander>();
|
||||
|
||||
private final CardPool cardPool = new CardPool();
|
||||
private final CardPool collection = new CardPool();
|
||||
private final HashMap<String, Deck> decks = new HashMap<String, Deck>();
|
||||
|
||||
public ConquestData() { //needed for XML serialization
|
||||
@@ -62,6 +62,8 @@ public final class ConquestData {
|
||||
ConquestCommander commander = new ConquestCommander(card, currentPlane.getCardPool());
|
||||
commanders.add(commander);
|
||||
decks.put(commander.getDeck().getName(), commander.getDeck());
|
||||
collection.addAll(commander.getDeck().getMain());
|
||||
collection.add(card);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -80,8 +82,8 @@ public final class ConquestData {
|
||||
return currentPlane;
|
||||
}
|
||||
|
||||
public CardPool getCardPool() {
|
||||
return cardPool;
|
||||
public CardPool getCollection() {
|
||||
return collection;
|
||||
}
|
||||
|
||||
public ConquestDeckMap getDeckStorage() {
|
||||
|
||||
Reference in New Issue
Block a user