mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
fix: Player could not concede having Platinum Angel on battlefield
This commit is contained in:
@@ -75,7 +75,6 @@ import com.thoughtworks.xstream.XStreamException;
|
|||||||
|
|
||||||
import forge.card.cardFactory.CardFactoryUtil;
|
import forge.card.cardFactory.CardFactoryUtil;
|
||||||
import forge.error.ErrorViewer;
|
import forge.error.ErrorViewer;
|
||||||
import forge.game.GameLossReason;
|
|
||||||
import forge.gui.ForgeAction;
|
import forge.gui.ForgeAction;
|
||||||
import forge.gui.GuiUtils;
|
import forge.gui.GuiUtils;
|
||||||
import forge.gui.game.CardDetailPanel;
|
import forge.gui.game.CardDetailPanel;
|
||||||
@@ -1325,7 +1324,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
|
|||||||
* Exit the Application
|
* Exit the Application
|
||||||
*/
|
*/
|
||||||
private void concede() {
|
private void concede() {
|
||||||
AllZone.getHumanPlayer().loseConditionMet(GameLossReason.Conceded, null );
|
AllZone.getHumanPlayer().concede();
|
||||||
AllZone.getGameAction().checkStateEffects();
|
AllZone.getGameAction().checkStateEffects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1479,8 +1479,11 @@ public abstract class Player extends MyObservable {
|
|||||||
loseConditionSpell = spellName;
|
loseConditionSpell = spellName;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void concede() { // No cantLose checks - just lose
|
||||||
|
lossState = GameLossReason.Conceded;
|
||||||
|
loseConditionSpell = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>cantLose.</p>
|
* <p>cantLose.</p>
|
||||||
@@ -1488,6 +1491,8 @@ public abstract class Player extends MyObservable {
|
|||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public boolean cantLose() {
|
public boolean cantLose() {
|
||||||
|
if (lossState == GameLossReason.Conceded) { return false; }
|
||||||
|
|
||||||
CardList list = AllZoneUtil.getPlayerCardsInPlay(this);
|
CardList list = AllZoneUtil.getPlayerCardsInPlay(this);
|
||||||
list = list.getKeyword("You can't lose the game.");
|
list = list.getKeyword("You can't lose the game.");
|
||||||
|
|
||||||
|
|||||||
@@ -203,9 +203,7 @@ public class SetInfoUtil {
|
|||||||
|
|
||||||
int mostRecent = -1;
|
int mostRecent = -1;
|
||||||
|
|
||||||
for (int i = 0; i < alSI.size(); i++) {
|
for (SetInfo s : alSI) {
|
||||||
SetInfo s = alSI.get(i);
|
|
||||||
|
|
||||||
for (int j = 0; j < setData.size(); j++) {
|
for (int j = 0; j < setData.size(); j++) {
|
||||||
if (setData.get(j).get("Code3").equals(s.Code)) {
|
if (setData.get(j).get("Code3").equals(s.Code)) {
|
||||||
if (j > mostRecent) {
|
if (j > mostRecent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user