mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
fixed a couple of compile errors from 10194, yet could not handle them all
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package forge.quest.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import com.google.code.jyield.Generator;
|
||||
@@ -9,6 +11,8 @@ import com.google.code.jyield.YieldUtils;
|
||||
import forge.AllZone;
|
||||
import forge.Card;
|
||||
import forge.Constant;
|
||||
import forge.card.CardPrinted;
|
||||
import forge.card.CardRarity;
|
||||
import forge.deck.Deck;
|
||||
import forge.gui.GuiUtils;
|
||||
|
||||
@@ -139,14 +143,14 @@ public class DeckSingleQuest {
|
||||
*
|
||||
* @return String[]
|
||||
*/
|
||||
public ArrayList<String> getCardRewardList() {
|
||||
ArrayList<String> cardRewardList = new ArrayList<String>();
|
||||
public List<CardPrinted> getCardRewardList() {
|
||||
List<CardPrinted> cardRewardList = new ArrayList<CardPrinted>();
|
||||
|
||||
String[] details = this.getCardReward().split(" ");
|
||||
|
||||
// Set quantity, color and rarity from file meta.
|
||||
String cardscolor;
|
||||
Constant.Rarity rarity;
|
||||
CardRarity rarity;
|
||||
int quantity = Integer.parseInt(details[0]);
|
||||
|
||||
// Color
|
||||
@@ -185,17 +189,15 @@ public class DeckSingleQuest {
|
||||
|
||||
// Rarity
|
||||
if(details[2].toLowerCase().equals("rares")) {
|
||||
rarity = Constant.Rarity.Rare;
|
||||
rarity = CardRarity.Rare;
|
||||
}
|
||||
else {
|
||||
rarity = Constant.Rarity.Common;
|
||||
rarity = CardRarity.Common;
|
||||
}
|
||||
|
||||
// Generate deck list.
|
||||
QuestBoosterPack pack = new QuestBoosterPack();
|
||||
pack.generateCards(quantity, rarity, cardscolor);
|
||||
|
||||
return cardRewardList;
|
||||
return pack.generateCards(quantity, rarity, cardscolor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,8 @@ import forge.*;
|
||||
import forge.deck.Deck;
|
||||
import forge.gui.GuiUtils;
|
||||
import forge.gui.SelectablePanel;
|
||||
import forge.gui.deckeditor.DeckEditorQuest;
|
||||
import forge.gui.deckeditor.DeckEditorShop;
|
||||
import forge.quest.data.DeckSingleBattle;
|
||||
import forge.quest.data.ManagerBattle;
|
||||
import forge.quest.data.QuestData;
|
||||
@@ -599,7 +601,7 @@ public class QuestMainPanel extends QuestAbstractPanel {
|
||||
}
|
||||
};
|
||||
|
||||
Gui_Quest_DeckEditor g = new Gui_Quest_DeckEditor();
|
||||
DeckEditorQuest g = new DeckEditorQuest();
|
||||
|
||||
g.show(exit);
|
||||
g.setVisible(true);
|
||||
@@ -628,7 +630,7 @@ public class QuestMainPanel extends QuestAbstractPanel {
|
||||
}
|
||||
};
|
||||
|
||||
Gui_CardShop g = new Gui_CardShop(questData);
|
||||
DeckEditorShop g = new DeckEditorShop(questData);
|
||||
|
||||
g.show(exit);
|
||||
g.setVisible(true);
|
||||
|
||||
Reference in New Issue
Block a user