mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Door to nothingness (as well as any other spell effect causing a GL) should be displayed correctly in quest battle debriefing
This commit is contained in:
@@ -618,8 +618,8 @@ public class GameAction {
|
|||||||
|
|
||||||
boolean isGameDone = humanWins || computerWins;
|
boolean isGameDone = humanWins || computerWins;
|
||||||
if (isGameDone) {
|
if (isGameDone) {
|
||||||
game.getPlayerRating(PlayerIndex.AI).setLossReason(computer.getLossState());
|
game.getPlayerRating(PlayerIndex.AI).setLossReason(computer.getLossState(), computer.getLossConditionSource());
|
||||||
game.getPlayerRating(PlayerIndex.HUMAN).setLossReason(human.getLossState());
|
game.getPlayerRating(PlayerIndex.HUMAN).setLossReason(human.getLossState(), computer.getLossConditionSource());
|
||||||
AllZone.getMatchState().addGamePlayed(game);
|
AllZone.getMatchState().addGamePlayed(game);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -264,6 +264,7 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
switch(whyAiLost) {
|
switch(whyAiLost) {
|
||||||
case Poisoned: winConditionName = "Poison"; break;
|
case Poisoned: winConditionName = "Poison"; break;
|
||||||
case Milled: winConditionName = "Milled"; break;
|
case Milled: winConditionName = "Milled"; break;
|
||||||
|
case SpellEffect: winConditionName = aiRating.getLossSpellName(); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1388,16 +1388,15 @@ public abstract class Player extends GameEntity {
|
|||||||
*
|
*
|
||||||
* @return a {@link java.lang.String} object.
|
* @return a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public GameLossReason getLossState() {
|
public GameLossReason getLossState() { return lossState; }
|
||||||
return lossState;
|
public String getLossConditionSource() { return loseConditionSpell; }
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>altWinConditionMet.</p>
|
* <p>altWinConditionMet.</p>
|
||||||
*
|
*
|
||||||
* @param s a {@link java.lang.String} object.
|
* @param s a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public void altWinBySpellEffect( String sourceName ) {
|
public void altWinBySpellEffect(final String sourceName) {
|
||||||
if (cantWin()) {
|
if (cantWin()) {
|
||||||
System.out.println("Tried to win, but currently can't.");
|
System.out.println("Tried to win, but currently can't.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -13,12 +13,18 @@ public class GamePlayerRating {
|
|||||||
protected int timesMulliganed = 0;
|
protected int timesMulliganed = 0;
|
||||||
|
|
||||||
protected GameLossReason lossReason = GameLossReason.DidNotLoseYet;
|
protected GameLossReason lossReason = GameLossReason.DidNotLoseYet;
|
||||||
|
protected String lossSpellName;
|
||||||
|
|
||||||
public final GameLossReason getLossReason() {
|
public final GameLossReason getLossReason() {
|
||||||
return lossReason;
|
return lossReason;
|
||||||
}
|
}
|
||||||
public void setLossReason(GameLossReason loseCondition) {
|
|
||||||
|
public void setLossReason(GameLossReason loseCondition, String spellName) {
|
||||||
lossReason = loseCondition;
|
lossReason = loseCondition;
|
||||||
|
lossSpellName = spellName;
|
||||||
|
}
|
||||||
|
public String getLossSpellName() {
|
||||||
|
return lossSpellName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getOpeningHandSize() {
|
public final int getOpeningHandSize() {
|
||||||
|
|||||||
Reference in New Issue
Block a user