- Fixed a bug with Liliana Vess (and probably some other cards) if the human player is targeted while having an empty hand.

- Fixed a bug with Ashes to Ashes.
- Fixed a bug with Korlash, Heir to Blackblade (selecting all or more than two swamps would put all of them into play).
- Added some alternate win condition rewards in Quest mode (untested).
This commit is contained in:
jendave
2011-08-06 03:46:12 +00:00
parent 079ef0abf7
commit eff6c3d98a
9 changed files with 101 additions and 11 deletions

View File

@@ -4502,6 +4502,7 @@ Izzet Signet =25
Jabari's Banner =23
Jabari's Influence =93
Jace Beleren =630
Jace, the Mind Sculptor =5055
Jack-in-the-Mox =99
Jackal Familiar =25
Jackal Pup =28

View File

@@ -5015,9 +5015,8 @@ public class CardFactory implements NewConstants {
public void resolve() {
for(int i = 0; i < target.length; i++) {
Card c = target[i];
PlayerZone remove = AllZone.getZone(Constant.Zone.Removed_From_Play, c.getOwner());
AllZone.GameAction.moveTo(remove, c);
if (AllZone.GameAction.isCardInPlay(c))
AllZone.GameAction.removeFromGame(c);
}
PlayerLife life = AllZone.GameAction.getPlayerLife(card.getController());
@@ -14125,6 +14124,11 @@ public class CardFactory implements NewConstants {
@Override
public void resolve() {
AllZone.GameAction.getPlayerLife(getTargetPlayer()).setLife(0);
int gameNumber = 0;
if (Constant.Runtime.WinLose.getWin()==1)
gameNumber = 1;
Constant.Runtime.WinLose.setWinMethod(gameNumber,"Door to Nothingness");
}
@Override

View File

@@ -541,6 +541,7 @@ public class CardFactoryUtil {
@Override
public void showMessage() {
if (AllZone.Human_Hand.getCards().length == 0) stop();
AllZone.Display.showMessage("Select " + (nCards - n) + " cards to discard, unless you discard a "
+ uType + ".");
ButtonUtil.disableAll();
@@ -1731,8 +1732,8 @@ public class CardFactoryUtil {
@Override
public void showMessage() {
if (AllZone.Human_Hand.getCards().length == 0) stop();
AllZone.Display.showMessage("Select a card to discard");
ButtonUtil.disableAll();
}

View File

@@ -1099,7 +1099,9 @@ public class CardFactory_Creatures {
List<Card> selection = AllZone.Display.getChoices("Select up to two swamps", swamp.toArray());
for(int i = 0; i < selection.size(); i++) {
Card c = selection.get(i);
if (i == 2)
break;
Card c = selection.get(i);
library.remove(c);
play.add(c);

View File

@@ -415,10 +415,19 @@ public class GameAction {
if (isAliFromCairoInPlay(AllZone.Human_Play) && AllZone.Human_Life.getLife() < 1)
AllZone.Human_Life.setLife(1);
if(AllZone.Computer_Life.getLife() <= 0 || AllZone.Computer_PoisonCounter.getPoisonCounters() >= 10) {
if(AllZone.Computer_Life.getLife() <= 0 ) {
Constant.Runtime.WinLose.addWin();
stop = true;
}
if (AllZone.Computer_PoisonCounter.getPoisonCounters() >= 10)
{
int gameNumber = 0;
if (Constant.Runtime.WinLose.getWin() == 1)
gameNumber = 1;
Constant.Runtime.WinLose.setWinMethod(gameNumber, "Poison Counters");
Constant.Runtime.WinLose.addWin();
stop = true;
}
if(AllZone.Human_Life.getLife() <= 0 || AllZone.Human_PoisonCounter.getPoisonCounters() >= 10) {
Constant.Runtime.WinLose.addLose();
stop = true;
@@ -781,6 +790,12 @@ public class GameAction {
//lose:
else if(Constant.Runtime.Mill[0]) {
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
int gameNumber = 0;
if (Constant.Runtime.WinLose.getWin()==1)
gameNumber = 1;
Constant.Runtime.WinLose.setWinMethod(gameNumber,"Battle of Wits");
life.setLife(0);
checkStateEffects();
}

View File

@@ -5846,6 +5846,11 @@ public class GameActionUtil {
public void resolve() {
String opponent = AllZone.GameAction.getOpponent(player);
PlayerLife life = AllZone.GameAction.getPlayerLife(opponent);
int gameNumber = 0;
if (Constant.Runtime.WinLose.getWin()==1)
gameNumber = 1;
Constant.Runtime.WinLose.setWinMethod(gameNumber,"Felidar Sovereign");
life.setLife(0);
}
};// Ability
@@ -5869,6 +5874,12 @@ public class GameActionUtil {
public void resolve() {
String opponent = AllZone.GameAction.getOpponent(player);
PlayerLife life = AllZone.GameAction.getPlayerLife(opponent);
int gameNumber = 0;
if (Constant.Runtime.WinLose.getWin()==1)
gameNumber = 1;
Constant.Runtime.WinLose.setWinMethod(gameNumber,"Battle of Wits");
life.setLife(0);
}
};// Ability
@@ -5891,6 +5902,10 @@ public class GameActionUtil {
@Override
public void resolve()
{
int gameNumber = 0;
if (Constant.Runtime.WinLose.getWin()==1)
gameNumber = 1;
Constant.Runtime.WinLose.setWinMethod(gameNumber,"Helix Pinnacle");
AllZone.GameAction.getPlayerLife(AllZone.GameAction.getOpponent(player))
.setLife(0);
}

View File

@@ -47,7 +47,6 @@ public class Gui_WinLose extends JFrame implements NewConstants {
Constant.Runtime.WinLose.addWin();
Constant.Runtime.WinLose.addLose();
//setup limited deck
Deck deck = new Deck(Constant.GameType.Sealed);
CardList pack = new CardList(BoosterPack.getBoosterPack(1).toArray());
@@ -181,8 +180,24 @@ public class Gui_WinLose extends JFrame implements NewConstants {
private String getWinText(long creds, WinLose winLose)
{
StringBuilder sb = new StringBuilder();
String[] wins = winLose.getWinMethods();
for (String s : wins)
{
if (s != null) {
if (s.equals("Poison Counters") || s.equals("Milled") || s.equals("Battle of Wits") ||
s.equals("Felidar Sovereign") || s.equals("Helix Pinnacle") || s.equals("Epic Struggle") ||
s.equals("Door to Nothingness")) {
sb.append("Alternate win condition: ");
sb.append(s);
sb.append("! Bonus: +100 credits.\r\n");
}
}
}
if (winLose.getLose()==0)
sb.append("You have not lost once! Bonus: 10 credits.\r\n");
sb.append("You have not lost once! Bonus: +10 credits.\r\n");
sb.append("You have earned " + creds + " credits in total.");
return sb.toString();
}
@@ -197,7 +212,9 @@ public class Gui_WinLose extends JFrame implements NewConstants {
void quitButton_actionPerformed(ActionEvent e) {
//are we on a quest?
if(AllZone.QuestData == null) new Gui_NewGame();
if(AllZone.QuestData == null) {
new Gui_NewGame();
}
else { //Quest
WinLose winLose = Constant.Runtime.WinLose;
QuestData quest = AllZone.QuestData;

View File

@@ -419,8 +419,22 @@ public class QuestData implements NewConstants {
public long getCreditsToAdd(WinLose winLose)
{
long creds = (long) (10 + (0.2 * win));
String[] wins = winLose.getWinMethods();
if (winLose.getLose() == 0)
creds += 10;
for(String s : wins)
{
if (s != null) {
if (s.equals("Poison Counters") || s.equals("Milled") || s.equals("Battle of Wits") ||
s.equals("Felidar Sovereign") || s.equals("Helix Pinnacle") || s.equals("Epic Struggle") ||
s.equals("Door to Nothingness")) {
creds+=100;
}
}
}
this.addCredits(creds);
return creds;

View File

@@ -1,17 +1,38 @@
package forge;
public class WinLose
{
//the way wins were achieved:
//Damage
//Poison Counters
//Battle of Wits
//Milled
//Felidar Sovereign
//...
//
private String[] winMethods = new String[2];
private int win;
private int lose;
private boolean winRecently;
public void reset() {win = 0; lose = 0;}
public void reset() {win = 0; lose = 0; winMethods = new String[2];}
public void addWin() {win++; winRecently = true;}
public void addLose(){lose++; winRecently = false;}
public int getWin() {return win;}
public int getLose() {return lose;}
public int countWinLose() {return win + lose;}
public void setWinMethod(int gameNumber, String method)
{
winMethods[gameNumber] = method;
}
public String[] getWinMethods()
{
return winMethods;
}
public boolean didWinRecently() {return winRecently;}
}