mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18: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;
|
||||
if (isGameDone) {
|
||||
game.getPlayerRating(PlayerIndex.AI).setLossReason(computer.getLossState());
|
||||
game.getPlayerRating(PlayerIndex.HUMAN).setLossReason(human.getLossState());
|
||||
game.getPlayerRating(PlayerIndex.AI).setLossReason(computer.getLossState(), computer.getLossConditionSource());
|
||||
game.getPlayerRating(PlayerIndex.HUMAN).setLossReason(human.getLossState(), computer.getLossConditionSource());
|
||||
AllZone.getMatchState().addGamePlayed(game);
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +264,7 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
||||
switch(whyAiLost) {
|
||||
case Poisoned: winConditionName = "Poison"; break;
|
||||
case Milled: winConditionName = "Milled"; break;
|
||||
case SpellEffect: winConditionName = aiRating.getLossSpellName(); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1388,16 +1388,15 @@ public abstract class Player extends GameEntity {
|
||||
*
|
||||
* @return a {@link java.lang.String} object.
|
||||
*/
|
||||
public GameLossReason getLossState() {
|
||||
return lossState;
|
||||
}
|
||||
public GameLossReason getLossState() { return lossState; }
|
||||
public String getLossConditionSource() { return loseConditionSpell; }
|
||||
|
||||
/**
|
||||
* <p>altWinConditionMet.</p>
|
||||
*
|
||||
* @param s a {@link java.lang.String} object.
|
||||
*/
|
||||
public void altWinBySpellEffect( String sourceName ) {
|
||||
public void altWinBySpellEffect(final String sourceName) {
|
||||
if (cantWin()) {
|
||||
System.out.println("Tried to win, but currently can't.");
|
||||
return;
|
||||
|
||||
@@ -13,12 +13,18 @@ public class GamePlayerRating {
|
||||
protected int timesMulliganed = 0;
|
||||
|
||||
protected GameLossReason lossReason = GameLossReason.DidNotLoseYet;
|
||||
protected String lossSpellName;
|
||||
|
||||
public final GameLossReason getLossReason() {
|
||||
return lossReason;
|
||||
}
|
||||
public void setLossReason(GameLossReason loseCondition) {
|
||||
|
||||
public void setLossReason(GameLossReason loseCondition, String spellName) {
|
||||
lossReason = loseCondition;
|
||||
lossSpellName = spellName;
|
||||
}
|
||||
public String getLossSpellName() {
|
||||
return lossSpellName;
|
||||
}
|
||||
|
||||
public final int getOpeningHandSize() {
|
||||
|
||||
Reference in New Issue
Block a user