mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Fixed Iona, Shield of Emeria not preventing Sower of Temptation being cast (when blue is chosen).
- More quest updates (second pet, bunch of fixes).
This commit is contained in:
@@ -88,4 +88,14 @@ Four green rares
|
|||||||
225
|
225
|
||||||
leafIconSmall.png
|
leafIconSmall.png
|
||||||
|
|
||||||
|
10
|
||||||
|
Zombie Attack!
|
||||||
|
The village of Haven is getting attacked by the Zombie horde! Protect the village.
|
||||||
|
Hard
|
||||||
|
Not Repeatable
|
||||||
|
50
|
||||||
|
Four black rares
|
||||||
|
200
|
||||||
|
blackOrbSmall.png
|
||||||
|
|
||||||
End
|
End
|
||||||
@@ -23,9 +23,9 @@ public class QuestData_State implements Serializable {
|
|||||||
private static final long serialVersionUID = 7007940230351051937L;
|
private static final long serialVersionUID = 7007940230351051937L;
|
||||||
|
|
||||||
int rankIndex, win, lost;
|
int rankIndex, win, lost;
|
||||||
int plantLevel, wolfPetLevel, life, estatesLevel, questsPlayed;
|
int plantLevel, wolfPetLevel, crocPetLevel, life, estatesLevel, questsPlayed;
|
||||||
long credits;
|
long credits;
|
||||||
String difficulty, mode;
|
String difficulty, mode, selectedPet;
|
||||||
|
|
||||||
|
|
||||||
ArrayList<Integer> availableQuests, completedQuests;
|
ArrayList<Integer> availableQuests, completedQuests;
|
||||||
@@ -43,6 +43,6 @@ public class QuestData_State implements Serializable {
|
|||||||
for(Entry<String, Deck> deck:this.aiDecks.entrySet()) {
|
for(Entry<String, Deck> deck:this.aiDecks.entrySet()) {
|
||||||
aiDecks.put(deck.getKey(), deck.getValue().migrate());
|
aiDecks.put(deck.getKey(), deck.getValue().migrate());
|
||||||
}
|
}
|
||||||
return new forge.QuestData_State(rankIndex, win, lost, plantLevel, wolfPetLevel, life, estatesLevel, questsPlayed, availableQuests, completedQuests,credits, difficulty, mode, cardPool, shopList, myDecks, aiDecks);
|
return new forge.QuestData_State(rankIndex, win, lost, plantLevel, wolfPetLevel, crocPetLevel, selectedPet, life, estatesLevel, questsPlayed, availableQuests, completedQuests,credits, difficulty, mode, cardPool, shopList, myDecks, aiDecks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7542,7 +7542,7 @@ public class CardFactory_Creatures {
|
|||||||
@Override
|
@Override
|
||||||
public boolean canPlay() {
|
public boolean canPlay() {
|
||||||
CardList choice = (CardList) getCreature.execute();
|
CardList choice = (CardList) getCreature.execute();
|
||||||
return choice.size() > 0;
|
return choice.size() > 0 && super.canPlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -23,16 +23,16 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
private JFrame shopsGUI;
|
private JFrame shopsGUI;
|
||||||
private JLabel titleLabel = new JLabel();
|
private JLabel titleLabel = new JLabel();
|
||||||
|
|
||||||
private JLabel wolfPetDescLabel = new JLabel();
|
private JLabel petDescLabel = new JLabel();
|
||||||
private JLabel wolfPetStatsLabel = new JLabel();
|
private JLabel petStatsLabel = new JLabel();
|
||||||
private JLabel wolfPetPriceLabel = new JLabel();
|
private JLabel petPriceLabel = new JLabel();
|
||||||
private JLabel wolfPetIconLabel = new JLabel();
|
private JLabel petIconLabel = new JLabel();
|
||||||
|
|
||||||
private JLabel creditsLabel = new JLabel();
|
private JLabel creditsLabel = new JLabel();
|
||||||
|
|
||||||
private ImageIcon wolfPetIcon = new ImageIcon();
|
private ImageIcon petIcon = new ImageIcon();
|
||||||
|
|
||||||
private JButton buyWolfPetButton = new JButton();
|
private JButton buyPetButton = new JButton();
|
||||||
private JButton quitButton = new JButton();
|
private JButton quitButton = new JButton();
|
||||||
|
|
||||||
private QuestData questData = AllZone.QuestData;
|
private QuestData questData = AllZone.QuestData;
|
||||||
@@ -64,10 +64,9 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
private void setup() {
|
private void setup() {
|
||||||
//String fileName = "LeafIconSmall.png";
|
//String fileName = "LeafIconSmall.png";
|
||||||
//ImageIcon icon = getIcon(fileName);
|
//ImageIcon icon = getIcon(fileName);
|
||||||
buyWolfPetButton.setBounds(new Rectangle(10, 297, 120, 50));
|
buyPetButton.setBounds(new Rectangle(10, 297, 120, 50));
|
||||||
buyWolfPetButton.setText(getButtonText("Wolf"));
|
|
||||||
//buyPlantButton.setIcon(icon);
|
buyPetButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
buyWolfPetButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
try {
|
try {
|
||||||
buyPetButton_actionPerformed(e);
|
buyPetButton_actionPerformed(e);
|
||||||
@@ -108,12 +107,43 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
}
|
}
|
||||||
else if (questData.getWolfPetLevel() == 3)
|
else if (questData.getWolfPetLevel() == 3)
|
||||||
{
|
{
|
||||||
sb.append("Gives Flanking to your Wolf.<br>");
|
sb.append("Gives Flanking to your wolf.<br>");
|
||||||
sb.append("<u><b>Level 4</b></u>: 2/2 Flanking<br>");
|
sb.append("<u><b>Level 4</b></u>: 2/2 Flanking<br>");
|
||||||
}
|
}
|
||||||
else
|
else if (questData.getWolfPetLevel() >= 4)
|
||||||
{
|
{
|
||||||
sb.append("Wolf Level Maxed out.<br>");
|
//sb.append("Wolf Level Maxed out.<br>");
|
||||||
|
|
||||||
|
if (questData.getCrocPetLevel() == 0)
|
||||||
|
{
|
||||||
|
sb.append("With its razor sharp teeth, this swamp-dwelling monster is extremely dangerous.");
|
||||||
|
sb.append("Crikey mate!<br><br>");
|
||||||
|
sb.append("<u><b>Level 1</b></u>: 1/1<br>");
|
||||||
|
sb.append("<u><b>Next Level</b></u>: 2/1<br>");
|
||||||
|
sb.append("<u><b>Can learn</b></u>: Swampwalk");
|
||||||
|
}
|
||||||
|
else if (questData.getCrocPetLevel() == 1)
|
||||||
|
{
|
||||||
|
sb.append("Improve the attack power of your croc.<br>");
|
||||||
|
sb.append("<u><b>Level 2</b></u>: 2/1<br>");
|
||||||
|
sb.append("<u><b>Next Level</b></u>: 3/1<br>");
|
||||||
|
sb.append("<u><b>Can learn</b></u>: Swampwalk");
|
||||||
|
}
|
||||||
|
else if (questData.getCrocPetLevel() == 2)
|
||||||
|
{
|
||||||
|
sb.append("Improve the attack power of your croc.<br>");
|
||||||
|
sb.append("<u><b>Level 3</b></u>: 3/1<br>");
|
||||||
|
sb.append("<u><b>Next Level</b></u>: 3/1 Swampwalk<br>");
|
||||||
|
}
|
||||||
|
else if (questData.getCrocPetLevel() == 3)
|
||||||
|
{
|
||||||
|
sb.append("Gives Swampwalk to your croc.<br>");
|
||||||
|
sb.append("<u><b>Level 4</b></u>: 3/1 Swampwalk<br>");
|
||||||
|
}
|
||||||
|
else if (questData.getCrocPetLevel() >= 4)
|
||||||
|
{
|
||||||
|
sb.append("Croc Level Maxed out.<br>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("</html>");
|
sb.append("</html>");
|
||||||
@@ -131,6 +161,17 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
l = 500;
|
l = 500;
|
||||||
else if (questData.getWolfPetLevel() == 3)
|
else if (questData.getWolfPetLevel() == 3)
|
||||||
l = 550;
|
l = 550;
|
||||||
|
else if (questData.getWolfPetLevel() >= 4)
|
||||||
|
{
|
||||||
|
if (questData.getCrocPetLevel() == 0)
|
||||||
|
l = 250;
|
||||||
|
else if (questData.getCrocPetLevel() == 1)
|
||||||
|
l = 300;
|
||||||
|
else if (questData.getCrocPetLevel() == 2)
|
||||||
|
l = 450;
|
||||||
|
else if (questData.getCrocPetLevel() == 3)
|
||||||
|
l = 600;
|
||||||
|
}
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,23 +184,43 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
else
|
else
|
||||||
s = "Train " + pet;
|
s = "Train " + pet;
|
||||||
}
|
}
|
||||||
|
else if (pet.equals("Croc"))
|
||||||
|
{
|
||||||
|
if (questData.getCrocPetLevel() == 0)
|
||||||
|
s = "Buy " + pet;
|
||||||
|
else
|
||||||
|
s = "Train " + pet;
|
||||||
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getWolfStats()
|
private String getPetStats()
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
if (questData.getWolfPetLevel() < 4) {
|
||||||
if (questData.getWolfPetLevel() == 0)
|
if (questData.getWolfPetLevel() == 0)
|
||||||
sb.append("1/1");
|
sb.append("1/1");
|
||||||
else if (questData.getWolfPetLevel() == 1)
|
else if (questData.getWolfPetLevel() == 1)
|
||||||
sb.append("1/2");
|
sb.append("1/2");
|
||||||
else if (questData.getWolfPetLevel() == 2)
|
else if (questData.getWolfPetLevel() <= 3)
|
||||||
sb.append("2/2");
|
|
||||||
else /*if (questData.getWolfPetLevel() == 3)*/
|
|
||||||
sb.append("2/2");
|
sb.append("2/2");
|
||||||
|
|
||||||
sb.append(" Wolf Pet (current level ");
|
sb.append(" Wolf Pet (current level ");
|
||||||
sb.append(questData.getWolfPetLevel());
|
sb.append(questData.getWolfPetLevel());
|
||||||
|
} //getWolfPetLevel < 4
|
||||||
|
else if (questData.getCrocPetLevel() < 4)
|
||||||
|
{
|
||||||
|
if (questData.getCrocPetLevel() == 0)
|
||||||
|
sb.append("1/1");
|
||||||
|
else if (questData.getCrocPetLevel() == 1)
|
||||||
|
sb.append("2/1");
|
||||||
|
else if (questData.getCrocPetLevel() <= 3)
|
||||||
|
sb.append("3/1");
|
||||||
|
|
||||||
|
sb.append(" Croc Pet (current level ");
|
||||||
|
sb.append(questData.getCrocPetLevel());
|
||||||
|
}
|
||||||
|
|
||||||
sb.append("/4)");
|
sb.append("/4)");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
@@ -167,6 +228,7 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
private String getImageString()
|
private String getImageString()
|
||||||
{
|
{
|
||||||
String s = "";
|
String s = "";
|
||||||
|
if (questData.getWolfPetLevel() < 4) {
|
||||||
if (questData.getWolfPetLevel() == 0)
|
if (questData.getWolfPetLevel() == 0)
|
||||||
s = "g_1_1_wolf_pet_small.jpg";
|
s = "g_1_1_wolf_pet_small.jpg";
|
||||||
else if (questData.getWolfPetLevel() == 1)
|
else if (questData.getWolfPetLevel() == 1)
|
||||||
@@ -175,6 +237,18 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
s = "g_2_2_wolf_pet_small.jpg";
|
s = "g_2_2_wolf_pet_small.jpg";
|
||||||
else if (questData.getWolfPetLevel() == 3)
|
else if (questData.getWolfPetLevel() == 3)
|
||||||
s = "g_2_2_wolf_pet_flanking_small.jpg";
|
s = "g_2_2_wolf_pet_flanking_small.jpg";
|
||||||
|
}
|
||||||
|
else if (questData.getCrocPetLevel() < 4)
|
||||||
|
{
|
||||||
|
if (questData.getCrocPetLevel() == 0)
|
||||||
|
s = "b_1_1_crocodile_pet_small.jpg";
|
||||||
|
else if (questData.getCrocPetLevel() == 1)
|
||||||
|
s = "b_2_1_crocodile_pet_small.jpg";
|
||||||
|
else if (questData.getCrocPetLevel() == 2)
|
||||||
|
s = "b_3_1_crocodile_pet_small.jpg";
|
||||||
|
else if (questData.getCrocPetLevel() == 3)
|
||||||
|
s = "b_3_1_crocodile_pet_swampwalk_small.jpg";
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@@ -186,31 +260,36 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
titleLabel.setBounds(new Rectangle(150, 5, 198, 60));
|
titleLabel.setBounds(new Rectangle(150, 5, 198, 60));
|
||||||
this.getContentPane().setLayout(null);
|
this.getContentPane().setLayout(null);
|
||||||
|
|
||||||
wolfPetStatsLabel.setFont(new Font("sserif", Font.BOLD, 12));
|
petStatsLabel.setFont(new Font("sserif", Font.BOLD, 12));
|
||||||
wolfPetStatsLabel.setText(getWolfStats());
|
petStatsLabel.setText(getPetStats());
|
||||||
wolfPetStatsLabel.setBounds(new Rectangle(10, 65, 200, 15));
|
petStatsLabel.setBounds(new Rectangle(10, 65, 200, 15));
|
||||||
|
|
||||||
wolfPetDescLabel.setFont(new Font("sserif", 0, 12));
|
petDescLabel.setFont(new Font("sserif", 0, 12));
|
||||||
wolfPetDescLabel.setText(getDesc());
|
petDescLabel.setText(getDesc());
|
||||||
wolfPetDescLabel.setBounds(new Rectangle(10, 80, 300, 150));
|
petDescLabel.setBounds(new Rectangle(10, 80, 300, 150));
|
||||||
|
|
||||||
wolfPetPriceLabel.setFont(new Font("sserif", 0, 12));
|
petPriceLabel.setFont(new Font("sserif", 0, 12));
|
||||||
wolfPetPriceLabel.setText("<html><b><u>Price</u></b>: " + getPrice() + " credits</html>");
|
petPriceLabel.setText("<html><b><u>Price</u></b>: " + getPrice() + " credits</html>");
|
||||||
wolfPetPriceLabel.setBounds(new Rectangle(10, 230, 150, 15));
|
petPriceLabel.setBounds(new Rectangle(10, 230, 150, 15));
|
||||||
|
|
||||||
creditsLabel.setFont(new Font("sserif", 0, 12));
|
creditsLabel.setFont(new Font("sserif", 0, 12));
|
||||||
creditsLabel.setText("Credits: " + questData.getCredits());
|
creditsLabel.setText("Credits: " + questData.getCredits());
|
||||||
creditsLabel.setBounds(new Rectangle(10, 265, 150, 15));
|
creditsLabel.setBounds(new Rectangle(10, 265, 150, 15));
|
||||||
|
|
||||||
wolfPetIcon = getIcon(getImageString());
|
petIcon = getIcon(getImageString());
|
||||||
wolfPetIconLabel.setText("");
|
petIconLabel.setText("");
|
||||||
wolfPetIconLabel.setIcon(wolfPetIcon);
|
petIconLabel.setIcon(petIcon);
|
||||||
wolfPetIconLabel.setBounds(new Rectangle(280, 65, 201, 280));
|
petIconLabel.setBounds(new Rectangle(280, 65, 201, 280));
|
||||||
wolfPetIconLabel.setIconTextGap(0);
|
petIconLabel.setIconTextGap(0);
|
||||||
|
|
||||||
buyWolfPetButton.setEnabled(true);
|
if (questData.getWolfPetLevel() < 4)
|
||||||
if (questData.getCredits() < getPrice() || questData.getWolfPetLevel() >= 4)
|
buyPetButton.setText(getButtonText("Wolf"));
|
||||||
buyWolfPetButton.setEnabled(false);
|
else if (questData.getCrocPetLevel() < 4)
|
||||||
|
buyPetButton.setText(getButtonText("Croc"));
|
||||||
|
|
||||||
|
buyPetButton.setEnabled(true);
|
||||||
|
if (questData.getCredits() < getPrice() || questData.getCrocPetLevel() >= 4)
|
||||||
|
buyPetButton.setEnabled(false);
|
||||||
|
|
||||||
quitButton.setBounds(new Rectangle(140, 297, 120, 50));
|
quitButton.setBounds(new Rectangle(140, 297, 120, 50));
|
||||||
quitButton.setText("Quit");
|
quitButton.setText("Quit");
|
||||||
@@ -222,12 +301,12 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
|
|
||||||
|
|
||||||
//jPanel2.add(quitButton, null);
|
//jPanel2.add(quitButton, null);
|
||||||
this.getContentPane().add(buyWolfPetButton, null);
|
this.getContentPane().add(buyPetButton, null);
|
||||||
this.getContentPane().add(titleLabel, null);
|
this.getContentPane().add(titleLabel, null);
|
||||||
this.getContentPane().add(wolfPetStatsLabel, null);
|
this.getContentPane().add(petStatsLabel, null);
|
||||||
this.getContentPane().add(wolfPetDescLabel, null);
|
this.getContentPane().add(petDescLabel, null);
|
||||||
this.getContentPane().add(wolfPetIconLabel, null);
|
this.getContentPane().add(petIconLabel, null);
|
||||||
this.getContentPane().add(wolfPetPriceLabel, null);
|
this.getContentPane().add(petPriceLabel, null);
|
||||||
this.getContentPane().add(creditsLabel, null);
|
this.getContentPane().add(creditsLabel, null);
|
||||||
this.getContentPane().add(quitButton,null);
|
this.getContentPane().add(quitButton,null);
|
||||||
}
|
}
|
||||||
@@ -249,7 +328,12 @@ public class Gui_PetShop extends JFrame implements NewConstants{
|
|||||||
|
|
||||||
void buyPetButton_actionPerformed(ActionEvent e) throws Exception {
|
void buyPetButton_actionPerformed(ActionEvent e) throws Exception {
|
||||||
questData.subtractCredits(getPrice());
|
questData.subtractCredits(getPrice());
|
||||||
|
|
||||||
|
if (questData.getWolfPetLevel() < 4)
|
||||||
questData.addWolfPetLevel();
|
questData.addWolfPetLevel();
|
||||||
|
else if (questData.getCrocPetLevel() < 4)
|
||||||
|
questData.addCrocPetLevel();
|
||||||
|
|
||||||
QuestData.saveData(questData);
|
QuestData.saveData(questData);
|
||||||
jbInit();
|
jbInit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,11 +55,13 @@ public class Gui_Quest extends JFrame implements NewConstants{
|
|||||||
private JPanel jPanel2 = new JPanel();
|
private JPanel jPanel2 = new JPanel();
|
||||||
private JButton playGameButton = new JButton();
|
private JButton playGameButton = new JButton();
|
||||||
private JButton questsButton = new JButton();
|
private JButton questsButton = new JButton();
|
||||||
|
|
||||||
private JRadioButton oppTwoRadio = new JRadioButton();
|
private JRadioButton oppTwoRadio = new JRadioButton();
|
||||||
private JRadioButton oppOneRadio = new JRadioButton();
|
private JRadioButton oppOneRadio = new JRadioButton();
|
||||||
private JRadioButton oppThreeRadio = new JRadioButton();
|
private JRadioButton oppThreeRadio = new JRadioButton();
|
||||||
private JLabel jLabel5 = new JLabel();
|
private JLabel jLabel5 = new JLabel();
|
||||||
private JComboBox deckComboBox = new JComboBox();
|
private JComboBox deckComboBox = new JComboBox();
|
||||||
|
private JComboBox petComboBox = new JComboBox();
|
||||||
private ButtonGroup oppGroup = new ButtonGroup();
|
private ButtonGroup oppGroup = new ButtonGroup();
|
||||||
private static JCheckBox smoothLandCheckBox = new JCheckBox("", true);
|
private static JCheckBox smoothLandCheckBox = new JCheckBox("", true);
|
||||||
private static JCheckBox resizeCheckbox = new JCheckBox("", true);
|
private static JCheckBox resizeCheckbox = new JCheckBox("", true);
|
||||||
@@ -126,6 +128,13 @@ public class Gui_Quest extends JFrame implements NewConstants{
|
|||||||
deckComboBox.addItem(list.get(i));
|
deckComboBox.addItem(list.get(i));
|
||||||
|
|
||||||
if(Constant.Runtime.HumanDeck[0] != null) deckComboBox.setSelectedItem(Constant.Runtime.HumanDeck[0].getName());
|
if(Constant.Runtime.HumanDeck[0] != null) deckComboBox.setSelectedItem(Constant.Runtime.HumanDeck[0].getName());
|
||||||
|
|
||||||
|
if ("Fantasy".equals(questData.getMode()))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}//setup()
|
}//setup()
|
||||||
|
|
||||||
private void jbInit() throws Exception {
|
private void jbInit() throws Exception {
|
||||||
@@ -170,6 +179,10 @@ public class Gui_Quest extends JFrame implements NewConstants{
|
|||||||
//if (questData.getMode().equals("Fantasy"))
|
//if (questData.getMode().equals("Fantasy"))
|
||||||
if ("Fantasy".equals(questData.getMode()))
|
if ("Fantasy".equals(questData.getMode()))
|
||||||
{
|
{
|
||||||
|
//petComboBox.removeAll();
|
||||||
|
ArrayList<String> petList = QuestUtil.getPetNames(questData);
|
||||||
|
for (int i=0;i<petList.size();i++)
|
||||||
|
petComboBox.addItem(petList.get(i));
|
||||||
|
|
||||||
lifeLabel.setBounds(new Rectangle(1, 195, 499, 15));
|
lifeLabel.setBounds(new Rectangle(1, 195, 499, 15));
|
||||||
lifeLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
lifeLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
@@ -235,6 +248,7 @@ public class Gui_Quest extends JFrame implements NewConstants{
|
|||||||
jLabel5.setText("Your Deck:");
|
jLabel5.setText("Your Deck:");
|
||||||
jLabel5.setBounds(new Rectangle(15, 151, 125, 29));
|
jLabel5.setBounds(new Rectangle(15, 151, 125, 29));
|
||||||
deckComboBox.setBounds(new Rectangle(98, 152, 185, 29));
|
deckComboBox.setBounds(new Rectangle(98, 152, 185, 29));
|
||||||
|
petComboBox.setBounds(new Rectangle(291, 16, 142, 38));
|
||||||
smoothLandCheckBox.setText("Stack AI land");
|
smoothLandCheckBox.setText("Stack AI land");
|
||||||
smoothLandCheckBox.setBounds(new Rectangle(154, 455, 153, 21));
|
smoothLandCheckBox.setBounds(new Rectangle(154, 455, 153, 21));
|
||||||
//smoothLandCheckBox.setSelected(true);
|
//smoothLandCheckBox.setSelected(true);
|
||||||
@@ -252,6 +266,7 @@ public class Gui_Quest extends JFrame implements NewConstants{
|
|||||||
jPanel2.add(jLabel5, null);
|
jPanel2.add(jLabel5, null);
|
||||||
this.getContentPane().add(infoButton, null);
|
this.getContentPane().add(infoButton, null);
|
||||||
jPanel2.add(deckComboBox, null);
|
jPanel2.add(deckComboBox, null);
|
||||||
|
jPanel2.add(petComboBox, null);
|
||||||
jPanel2.add(oppOneRadio, null);
|
jPanel2.add(oppOneRadio, null);
|
||||||
jPanel2.add(oppTwoRadio, null);
|
jPanel2.add(oppTwoRadio, null);
|
||||||
jPanel2.add(oppThreeRadio, null);
|
jPanel2.add(oppThreeRadio, null);
|
||||||
@@ -600,6 +615,12 @@ public class Gui_Quest extends JFrame implements NewConstants{
|
|||||||
AllZone.GameAction.newGame(human, computer);
|
AllZone.GameAction.newGame(human, computer);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Object pet = petComboBox.getSelectedItem();
|
||||||
|
if (pet != null)
|
||||||
|
{
|
||||||
|
//System.out.println("Selected Pet:" +pet.toString());
|
||||||
|
questData.setSelectedPet(pet.toString());
|
||||||
|
}
|
||||||
CardList hCl = QuestUtil.getHumanPlantAndPet(questData);
|
CardList hCl = QuestUtil.getHumanPlantAndPet(questData);
|
||||||
int hLife = QuestUtil.getLife(questData);
|
int hLife = QuestUtil.getLife(questData);
|
||||||
AllZone.GameAction.newGame(human, computer, hCl, new CardList(), hLife, 20, null);
|
AllZone.GameAction.newGame(human, computer, hCl, new CardList(), hLife, 20, null);
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ public class QuestData implements NewConstants {
|
|||||||
|
|
||||||
private int plantLevel;
|
private int plantLevel;
|
||||||
private int wolfPetLevel;
|
private int wolfPetLevel;
|
||||||
|
private int crocPetLevel;
|
||||||
|
|
||||||
|
private String selectedPet;
|
||||||
|
|
||||||
private int life;
|
private int life;
|
||||||
private int estatesLevel;
|
private int estatesLevel;
|
||||||
@@ -252,6 +255,8 @@ public class QuestData implements NewConstants {
|
|||||||
|
|
||||||
data.plantLevel = state.plantLevel;
|
data.plantLevel = state.plantLevel;
|
||||||
data.wolfPetLevel = state.wolfPetLevel;
|
data.wolfPetLevel = state.wolfPetLevel;
|
||||||
|
data.crocPetLevel = state.crocPetLevel;
|
||||||
|
data.selectedPet = state.selectedPet;
|
||||||
data.life = state.life;
|
data.life = state.life;
|
||||||
data.estatesLevel = state.estatesLevel;
|
data.estatesLevel = state.estatesLevel;
|
||||||
data.questsPlayed = state.questsPlayed;
|
data.questsPlayed = state.questsPlayed;
|
||||||
@@ -624,6 +629,27 @@ public class QuestData implements NewConstants {
|
|||||||
return wolfPetLevel;
|
return wolfPetLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addCrocPetLevel()
|
||||||
|
{
|
||||||
|
crocPetLevel++;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCrocPetLevel()
|
||||||
|
{
|
||||||
|
return crocPetLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedPet(String s)
|
||||||
|
{
|
||||||
|
selectedPet = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSelectedPet()
|
||||||
|
{
|
||||||
|
return selectedPet;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setLife(int n)
|
public void setLife(int n)
|
||||||
{
|
{
|
||||||
life = n;
|
life = n;
|
||||||
@@ -765,6 +791,8 @@ public class QuestData implements NewConstants {
|
|||||||
|
|
||||||
state.plantLevel = q.plantLevel;
|
state.plantLevel = q.plantLevel;
|
||||||
state.wolfPetLevel = q.wolfPetLevel;
|
state.wolfPetLevel = q.wolfPetLevel;
|
||||||
|
state.crocPetLevel = q.crocPetLevel;
|
||||||
|
state.selectedPet = q.selectedPet;
|
||||||
state.life = q.life;
|
state.life = q.life;
|
||||||
state.estatesLevel = q.estatesLevel;
|
state.estatesLevel = q.estatesLevel;
|
||||||
state.questsPlayed = q.questsPlayed;
|
state.questsPlayed = q.questsPlayed;
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ public class QuestData_State implements Serializable {
|
|||||||
private static final long serialVersionUID = 7007940230351051937L;
|
private static final long serialVersionUID = 7007940230351051937L;
|
||||||
|
|
||||||
int rankIndex, win, lost;
|
int rankIndex, win, lost;
|
||||||
int plantLevel, wolfPetLevel, life, estatesLevel, questsPlayed;
|
int plantLevel, wolfPetLevel, crocPetLevel, life, estatesLevel, questsPlayed;
|
||||||
long credits;
|
long credits;
|
||||||
String difficulty, mode;
|
String difficulty, mode, selectedPet;
|
||||||
|
|
||||||
ArrayList<Integer> availableQuests, completedQuests;
|
ArrayList<Integer> availableQuests, completedQuests;
|
||||||
ArrayList<String> cardPool, shopList;
|
ArrayList<String> cardPool, shopList;
|
||||||
@@ -38,7 +38,7 @@ public class QuestData_State implements Serializable {
|
|||||||
* This constructor is used by QestData_State in the default package to create a replacement object for the
|
* This constructor is used by QestData_State in the default package to create a replacement object for the
|
||||||
* obsolete class.
|
* obsolete class.
|
||||||
*/
|
*/
|
||||||
public QuestData_State(int rankIndex, int win, int lost, int plantLevel, int wolfPetLevel, int life, int estatesLevel, int questsPlayed,
|
public QuestData_State(int rankIndex, int win, int lost, int plantLevel, int wolfPetLevel, int crocPetLevel, String selectedPet, int life, int estatesLevel, int questsPlayed,
|
||||||
ArrayList<Integer> availableQuests, ArrayList<Integer> completedQuests, long credits, String difficulty, String mode,
|
ArrayList<Integer> availableQuests, ArrayList<Integer> completedQuests, long credits, String difficulty, String mode,
|
||||||
ArrayList<String> cardPool, ArrayList<String> shopList, Map<String, Deck> myDecks, Map<String, Deck> aiDecks) {
|
ArrayList<String> cardPool, ArrayList<String> shopList, Map<String, Deck> myDecks, Map<String, Deck> aiDecks) {
|
||||||
this.rankIndex = rankIndex;
|
this.rankIndex = rankIndex;
|
||||||
@@ -46,6 +46,7 @@ public class QuestData_State implements Serializable {
|
|||||||
this.lost = lost;
|
this.lost = lost;
|
||||||
this.plantLevel = plantLevel;
|
this.plantLevel = plantLevel;
|
||||||
this.wolfPetLevel = wolfPetLevel;
|
this.wolfPetLevel = wolfPetLevel;
|
||||||
|
this.crocPetLevel = crocPetLevel;
|
||||||
this.life = life;
|
this.life = life;
|
||||||
this.estatesLevel = estatesLevel;
|
this.estatesLevel = estatesLevel;
|
||||||
this.questsPlayed = questsPlayed;
|
this.questsPlayed = questsPlayed;
|
||||||
|
|||||||
@@ -34,8 +34,10 @@ public class QuestUtil {
|
|||||||
{
|
{
|
||||||
CardList list = new CardList();
|
CardList list = new CardList();
|
||||||
|
|
||||||
if (qd.getWolfPetLevel() > 0)
|
if (qd.getSelectedPet().equals("Wolf") && qd.getWolfPetLevel() > 0)
|
||||||
list.add(getWolfPetToken(qd.getWolfPetLevel()));
|
list.add(getWolfPetToken(qd.getWolfPetLevel()));
|
||||||
|
else if (qd.getSelectedPet().equals("Croc") && qd.getCrocPetLevel() > 0)
|
||||||
|
list.add(getCrocPetToken(qd.getCrocPetLevel()));
|
||||||
|
|
||||||
if (qd.getPlantLevel() > 0)
|
if (qd.getPlantLevel() > 0)
|
||||||
list.add(getPlantToken(qd.getPlantLevel()));
|
list.add(getPlantToken(qd.getPlantLevel()));
|
||||||
@@ -206,6 +208,72 @@ public class QuestUtil {
|
|||||||
return c;
|
return c;
|
||||||
}//getWolfPetToken
|
}//getWolfPetToken
|
||||||
|
|
||||||
|
public static Card getCrocPetToken(int level)
|
||||||
|
{
|
||||||
|
String imageName = "";
|
||||||
|
int baseAttack = 0;
|
||||||
|
int baseDefense = 0;
|
||||||
|
|
||||||
|
if (level == 1)
|
||||||
|
{
|
||||||
|
imageName = "B 1 1 Crocodile Pet";
|
||||||
|
baseDefense = 1;
|
||||||
|
baseAttack = 1;
|
||||||
|
}
|
||||||
|
else if (level == 2)
|
||||||
|
{
|
||||||
|
imageName = "B 2 1 Crocodile Pet";
|
||||||
|
baseDefense = 1;
|
||||||
|
baseAttack = 2;
|
||||||
|
}
|
||||||
|
else if (level == 3)
|
||||||
|
{
|
||||||
|
imageName = "G 3 1 Crocodile Pet";
|
||||||
|
baseDefense = 1;
|
||||||
|
baseAttack = 3;
|
||||||
|
}
|
||||||
|
else if (level == 4)
|
||||||
|
{
|
||||||
|
imageName = "G 3 1 Crocodile Pet Swampwalk";
|
||||||
|
baseDefense = 1;
|
||||||
|
baseAttack = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Card c = new Card();
|
||||||
|
c.setName("Crocodile Pet");
|
||||||
|
|
||||||
|
c.setImageName(imageName);
|
||||||
|
|
||||||
|
c.setController(Constant.Player.Human);
|
||||||
|
c.setOwner(Constant.Player.Human);
|
||||||
|
|
||||||
|
c.setManaCost("B");
|
||||||
|
c.setToken(true);
|
||||||
|
|
||||||
|
c.addType("Creature");
|
||||||
|
c.addType("Crocodile");
|
||||||
|
c.addType("Pet");
|
||||||
|
|
||||||
|
if (level >= 4)
|
||||||
|
c.addIntrinsicKeyword("Swampwalk");
|
||||||
|
|
||||||
|
c.setBaseAttack(baseAttack);
|
||||||
|
c.setBaseDefense(baseDefense);
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}//getCrocPetToken
|
||||||
|
|
||||||
|
public static ArrayList<String> getPetNames(QuestData questData)
|
||||||
|
{
|
||||||
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
|
if (questData.getWolfPetLevel() > 0)
|
||||||
|
list.add("Wolf");
|
||||||
|
if (questData.getCrocPetLevel() > 0)
|
||||||
|
list.add("Croc");
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setupQuest(Quest_Assignment qa)
|
public static void setupQuest(Quest_Assignment qa)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -291,7 +359,29 @@ public class QuestUtil {
|
|||||||
|
|
||||||
qa.setCardRewardList(pack.getRare(4, 4));
|
qa.setCardRewardList(pack.getRare(4, 4));
|
||||||
}
|
}
|
||||||
|
else if (id == 10)
|
||||||
|
{
|
||||||
|
CardList humanList = new CardList();
|
||||||
|
|
||||||
|
Card c = AllZone.CardFactory.getCard("Wall of Spears", Constant.Player.Human);
|
||||||
|
humanList.add(c);
|
||||||
|
|
||||||
|
for (int i=0;i<3;i++)
|
||||||
|
{
|
||||||
|
c = CardFactoryUtil.makeToken("Citizen", "W 1 1 Citizen", Constant.Player.Human, "W",
|
||||||
|
new String[] {"Creature","Citizen"}, 1, 1, new String[]{""}).get(0);
|
||||||
|
humanList.add(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qa.setHuman(humanList);
|
||||||
|
|
||||||
|
for (int i=0;i<3;i++)
|
||||||
|
qa.addCompy("Scathe Zombies");
|
||||||
|
qa.addCompy("Mass of Ghouls");
|
||||||
|
|
||||||
|
qa.setCardRewardList(pack.getRare(4, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}//QuestUtil
|
}//QuestUtil
|
||||||
|
|||||||
Reference in New Issue
Block a user