mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +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;
|
package forge.quest.data;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
|
|
||||||
import com.google.code.jyield.Generator;
|
import com.google.code.jyield.Generator;
|
||||||
@@ -9,6 +11,8 @@ import com.google.code.jyield.YieldUtils;
|
|||||||
import forge.AllZone;
|
import forge.AllZone;
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.Constant;
|
import forge.Constant;
|
||||||
|
import forge.card.CardPrinted;
|
||||||
|
import forge.card.CardRarity;
|
||||||
import forge.deck.Deck;
|
import forge.deck.Deck;
|
||||||
import forge.gui.GuiUtils;
|
import forge.gui.GuiUtils;
|
||||||
|
|
||||||
@@ -139,14 +143,14 @@ public class DeckSingleQuest {
|
|||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public ArrayList<String> getCardRewardList() {
|
public List<CardPrinted> getCardRewardList() {
|
||||||
ArrayList<String> cardRewardList = new ArrayList<String>();
|
List<CardPrinted> cardRewardList = new ArrayList<CardPrinted>();
|
||||||
|
|
||||||
String[] details = this.getCardReward().split(" ");
|
String[] details = this.getCardReward().split(" ");
|
||||||
|
|
||||||
// Set quantity, color and rarity from file meta.
|
// Set quantity, color and rarity from file meta.
|
||||||
String cardscolor;
|
String cardscolor;
|
||||||
Constant.Rarity rarity;
|
CardRarity rarity;
|
||||||
int quantity = Integer.parseInt(details[0]);
|
int quantity = Integer.parseInt(details[0]);
|
||||||
|
|
||||||
// Color
|
// Color
|
||||||
@@ -185,17 +189,15 @@ public class DeckSingleQuest {
|
|||||||
|
|
||||||
// Rarity
|
// Rarity
|
||||||
if(details[2].toLowerCase().equals("rares")) {
|
if(details[2].toLowerCase().equals("rares")) {
|
||||||
rarity = Constant.Rarity.Rare;
|
rarity = CardRarity.Rare;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rarity = Constant.Rarity.Common;
|
rarity = CardRarity.Common;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate deck list.
|
// Generate deck list.
|
||||||
QuestBoosterPack pack = new QuestBoosterPack();
|
QuestBoosterPack pack = new QuestBoosterPack();
|
||||||
pack.generateCards(quantity, rarity, cardscolor);
|
return pack.generateCards(quantity, rarity, cardscolor);
|
||||||
|
|
||||||
return cardRewardList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import forge.*;
|
|||||||
import forge.deck.Deck;
|
import forge.deck.Deck;
|
||||||
import forge.gui.GuiUtils;
|
import forge.gui.GuiUtils;
|
||||||
import forge.gui.SelectablePanel;
|
import forge.gui.SelectablePanel;
|
||||||
|
import forge.gui.deckeditor.DeckEditorQuest;
|
||||||
|
import forge.gui.deckeditor.DeckEditorShop;
|
||||||
import forge.quest.data.DeckSingleBattle;
|
import forge.quest.data.DeckSingleBattle;
|
||||||
import forge.quest.data.ManagerBattle;
|
import forge.quest.data.ManagerBattle;
|
||||||
import forge.quest.data.QuestData;
|
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.show(exit);
|
||||||
g.setVisible(true);
|
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.show(exit);
|
||||||
g.setVisible(true);
|
g.setVisible(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user