mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Adventure fixes: "No Sell Cards", quest tracking
This commit is contained in:
@@ -295,6 +295,7 @@ public class AdventureQuestStage implements Serializable {
|
||||
} else {
|
||||
status = ++progress4 >= count4 && count4 > 0 ? FAILED : status;
|
||||
}
|
||||
break;
|
||||
case Arena:
|
||||
status = event.type == AdventureQuestEventType.ARENACOMPLETE
|
||||
&& event.winner //if event won & not conceded
|
||||
|
||||
@@ -453,29 +453,24 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
|
||||
setSelectedDeckSlot(data.readInt("selectedDeckIndex"));
|
||||
cards.addAll(CardPool.fromCardList(Lists.newArrayList((String[]) data.readObject("cards"))));
|
||||
|
||||
//newCards.addAll(InventoryItem data.readObject("cards"))));
|
||||
data.storeObject("newCards", newCards.toFlatList().toArray(new InventoryItem[0]));
|
||||
data.storeObject("autoSellCards", autoSellCards.toFlatList().toArray(new InventoryItem[0]));
|
||||
data.storeObject("noSellCards", noSellCards.toFlatList().toArray(new InventoryItem[0]));
|
||||
|
||||
// if (data.containsKey("newCards")) {
|
||||
// InventoryItem[] items = (InventoryItem[]) data.readObject("newCards");
|
||||
// for (InventoryItem item : items){
|
||||
// newCards.add((PaperCard)item);
|
||||
// }
|
||||
// }
|
||||
// if (data.containsKey("noSellCards")) {
|
||||
// PaperCard[] items = (PaperCard[]) data.readObject("noSellCards");
|
||||
// for (PaperCard item : items){
|
||||
// noSellCards.add(item);
|
||||
// }
|
||||
// }
|
||||
// if (data.containsKey("autoSellCards")) {
|
||||
// PaperCard[] items = (PaperCard[]) data.readObject("autoSellCards");
|
||||
// for (PaperCard item : items){
|
||||
// autoSellCards.add(item);
|
||||
// }
|
||||
// }
|
||||
if (data.containsKey("newCards")) {
|
||||
InventoryItem[] items = (InventoryItem[]) data.readObject("newCards");
|
||||
for (InventoryItem item : items){
|
||||
newCards.add((PaperCard)item);
|
||||
}
|
||||
}
|
||||
if (data.containsKey("noSellCards")) {
|
||||
PaperCard[] items = (PaperCard[]) data.readObject("noSellCards");
|
||||
for (PaperCard item : items){
|
||||
noSellCards.add(item);
|
||||
}
|
||||
}
|
||||
if (data.containsKey("autoSellCards")) {
|
||||
PaperCard[] items = (PaperCard[]) data.readObject("autoSellCards");
|
||||
for (PaperCard item : items){
|
||||
autoSellCards.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
fantasyMode = data.containsKey("fantasyMode") && data.readBool("fantasyMode");
|
||||
announceFantasy = data.containsKey("announceFantasy") && data.readBool("announceFantasy");
|
||||
|
||||
Reference in New Issue
Block a user