mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Reveal foretold cards and other face-down cards when a player leaves the game or the game ends
This commit is contained in:
@@ -736,6 +736,17 @@ public class Game {
|
||||
boolean planarControllerLost = false;
|
||||
boolean isMultiplayer = this.getPlayers().size() > 2;
|
||||
|
||||
// 702.142f & 707.9
|
||||
// If a player leaves the game, all face-down cards that player owns must be revealed to all players.
|
||||
// At the end of each game, all face-down cards must be revealed to all players.
|
||||
if (!isMultiplayer) {
|
||||
for (Player pl : getPlayers()) {
|
||||
pl.revealFaceDownCards();
|
||||
}
|
||||
} else {
|
||||
p.revealFaceDownCards();
|
||||
}
|
||||
|
||||
for(Card c : cards) {
|
||||
if (c.getController().equals(p) && (c.isPlane() || c.isPhenomenon())) {
|
||||
planarControllerLost = true;
|
||||
|
||||
@@ -2839,6 +2839,10 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
return facedown;
|
||||
}
|
||||
|
||||
public final boolean isRealFaceDown() {
|
||||
return facedown;
|
||||
}
|
||||
|
||||
public final void setFaceDown(boolean value) {
|
||||
facedown = value;
|
||||
}
|
||||
|
||||
@@ -3546,4 +3546,23 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
&& Iterables.any(landsControlled, Predicates.and(CardPredicates.isType("Urza's"), CardPredicates.isType("Power-Plant")))
|
||||
&& Iterables.any(landsControlled, Predicates.and(CardPredicates.isType("Urza's"), CardPredicates.isType("Tower")));
|
||||
}
|
||||
|
||||
public void revealFaceDownCards() {
|
||||
final List<List<ZoneType>> revealZones = Arrays.asList(Arrays.asList(ZoneType.Battlefield, ZoneType.Merged), Arrays.asList(ZoneType.Exile));
|
||||
final PlayerCollection otherPlayers = new PlayerCollection(game.getRegisteredPlayers());
|
||||
otherPlayers.remove(this);
|
||||
|
||||
for (List<ZoneType> z : revealZones) {
|
||||
CardCollection revealCards = new CardCollection();
|
||||
for (Card c : game.getCardsInOwnedBy(z, this)) {
|
||||
if (!c.isRealFaceDown()) continue;
|
||||
|
||||
Card lki = CardUtil.getLKICopy(c);
|
||||
lki.forceTurnFaceUp();
|
||||
lki.setZone(c.getZone());
|
||||
revealCards.add(lki);
|
||||
}
|
||||
game.getAction().revealTo(revealCards, otherPlayers, Localizer.getInstance().getMessage("lblRevealFaceDownCards"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2624,6 +2624,7 @@ lblDetectedInvalidHostAddress=Ungültige Host-Adresse ({0}) wurde festgestellt.
|
||||
#Player.java
|
||||
lblChooseACompanion=Wähle einen Gefährten
|
||||
lblChooseAColorFor=Wähle eine Farbe für {0}
|
||||
lblRevealFaceDownCards=Revealing face-down cards from
|
||||
#QuestPreferences.java
|
||||
lblWildOpponentNumberError=Anzahl der Wild-Gegner kann nur 0 bis 3 sein
|
||||
#GauntletWinLose.java
|
||||
|
||||
@@ -2624,6 +2624,7 @@ lblDetectedInvalidHostAddress=Invalid host address ({0}) was detected.
|
||||
#Player.java
|
||||
lblChooseACompanion=Choose a companion
|
||||
lblChooseAColorFor=Choose a color for {0}
|
||||
lblRevealFaceDownCards=Revealing face-down cards from
|
||||
#QuestPreferences.java
|
||||
lblWildOpponentNumberError=Wild Opponents can only be 0 to 3
|
||||
#GauntletWinLose.java
|
||||
|
||||
@@ -2624,6 +2624,7 @@ lblDetectedInvalidHostAddress=Se detectó una dirección de host no válida ({0}
|
||||
#Player.java
|
||||
lblChooseACompanion=Elige un compañero
|
||||
lblChooseAColorFor=Elige un color para {0}
|
||||
lblRevealFaceDownCards=Revealing face-down cards from
|
||||
#QuestPreferences.java
|
||||
lblWildOpponentNumberError=Los Oponentes Salvajes sólo pueden ser de 0 a 3
|
||||
#GauntletWinLose.java
|
||||
|
||||
@@ -2624,6 +2624,7 @@ lblDetectedInvalidHostAddress=Invalid host address ({0}) was detected.
|
||||
#Player.java
|
||||
lblChooseACompanion=Choose a companion
|
||||
lblChooseAColorFor=Choose a color for {0}
|
||||
lblRevealFaceDownCards=Revealing face-down cards from
|
||||
#QuestPreferences.java
|
||||
lblWildOpponentNumberError=Wild Opponents can only be 0 to 3
|
||||
#GauntletWinLose.java
|
||||
|
||||
@@ -2624,6 +2624,7 @@ lblDetectedInvalidHostAddress=检测到无效的主机地址({0})。
|
||||
#Player.java
|
||||
lblChooseACompanion=选择一个行侣
|
||||
lblChooseAColorFor=为{0}选择一个颜色
|
||||
lblRevealFaceDownCards=Revealing face-down cards from
|
||||
#QuestPreferences.java
|
||||
lblWildOpponentNumberError=野外对手数只能在0-3之间
|
||||
#GauntletWinLose.java
|
||||
|
||||
Reference in New Issue
Block a user