mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Fixed Dark Catacombs.
- Added some beginning code of quest rewards for winning within a certain amount of turns.
This commit is contained in:
@@ -231,7 +231,7 @@ public class CardFactory implements NewConstants {
|
|||||||
{
|
{
|
||||||
Card c = clICtrl.get(i);
|
Card c = clICtrl.get(i);
|
||||||
for (int j = 0; j < types.length; j++)
|
for (int j = 0; j < types.length; j++)
|
||||||
if (c.getType().contains(types[j]))
|
if (c.getType().contains(types[j].trim()))
|
||||||
fnd = true;
|
fnd = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -136,9 +136,24 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
statsLabel.setText("Won: " + winLose.getWin() + ", Lost: " + winLose.getLose());
|
statsLabel.setText("Won: " + winLose.getWin() + ", Lost: " + winLose.getLose());
|
||||||
|
|
||||||
//show "You Won" or "You Lost"
|
//show "You Won" or "You Lost"
|
||||||
if(winLose.didWinRecently()) titleLabel.setText("You Won");
|
if(winLose.didWinRecently())
|
||||||
else titleLabel.setText("You Lost");
|
{
|
||||||
|
titleLabel.setText("You Won");
|
||||||
|
|
||||||
|
int game = 0;
|
||||||
|
if (winLose.getWinTurns()[0] != 0)
|
||||||
|
game = 1;
|
||||||
|
winLose.setWinTurn(game, AllZone.Phase.getTurn());
|
||||||
|
//winLose.setWinTurn(winLose.countWinLose()-1, AllZone.Phase.getTurn());
|
||||||
|
|
||||||
|
//System.out.println("CountwinLose:" + winLose.countWinLose());
|
||||||
|
//System.out.println("You won by turn: " + AllZone.Phase.getTurn());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
titleLabel.setText("You Lost");
|
||||||
|
//System.out.println("You lost by turn: " + AllZone.Phase.getTurn());
|
||||||
|
}
|
||||||
}//setup();
|
}//setup();
|
||||||
|
|
||||||
private void jbInit() throws Exception {
|
private void jbInit() throws Exception {
|
||||||
@@ -281,6 +296,20 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int[] winTurns = winLose.getWinTurns();
|
||||||
|
|
||||||
|
for (int i : winTurns)
|
||||||
|
{
|
||||||
|
System.out.println("Quest, won by turn:" + i);
|
||||||
|
if (i != 0)
|
||||||
|
{
|
||||||
|
if (i == 1)
|
||||||
|
sb.append("Won in one turn! Bonus: <b>+1500 credits</b>.<br>");
|
||||||
|
else if (i <= 5)
|
||||||
|
sb.append("Won by turn 5! Bonus: <b>+250 credits</b>.<br>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (winLose.getLose()==0)
|
if (winLose.getLose()==0)
|
||||||
sb.append("You have not lost once! Bonus: <b>+10 credits</b>.<br>");
|
sb.append("You have not lost once! Bonus: <b>+10 credits</b>.<br>");
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public class WinLose
|
|||||||
//...
|
//...
|
||||||
//
|
//
|
||||||
private String[] winMethods = new String[2];
|
private String[] winMethods = new String[2];
|
||||||
|
private int[] winTurns = new int[2];
|
||||||
|
|
||||||
|
|
||||||
private int win;
|
private int win;
|
||||||
private int lose;
|
private int lose;
|
||||||
@@ -33,6 +35,15 @@ public class WinLose
|
|||||||
return winMethods;
|
return winMethods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setWinTurn(int gameNumber, int turns)
|
||||||
|
{
|
||||||
|
winTurns[gameNumber] = turns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getWinTurns()
|
||||||
|
{
|
||||||
|
return winTurns;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean didWinRecently() {return winRecently;}
|
public boolean didWinRecently() {return winRecently;}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user