mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Add commander and his deck to collection when commander added to your arsenal
This commit is contained in:
@@ -270,7 +270,7 @@ public class LoadConquestScreen extends FScreen {
|
||||
float iconSize = h + Utils.scale(1);
|
||||
float iconOffset = SettingsScreen.SETTING_PADDING - Utils.scale(2);
|
||||
|
||||
String cards = String.valueOf(value.getCardPool().countAll());
|
||||
String cards = String.valueOf(value.getCollection().countAll());
|
||||
font = FSkinFont.get(12);
|
||||
float cardsWidth = font.getBounds(cards).width + iconSize + SettingsScreen.SETTING_PADDING;
|
||||
g.drawImage(FSkinImage.HAND, x + w - cardsWidth + iconOffset, y - SettingsScreen.SETTING_PADDING, iconSize, iconSize);
|
||||
|
||||
@@ -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