mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Update Win/Lose Overlay (mobile)
At the end of the match, user can minimize the overlay to see the last battlefield and browse other zones, to bring up the overlay, click game menu, and click Show WinLose Overlay. Also fixes issue #928
This commit is contained in:
@@ -672,21 +672,25 @@ public class Game {
|
||||
// Rule 800.4 Losing a Multiplayer game
|
||||
CardCollectionView cards = this.getCardsInGame();
|
||||
boolean planarControllerLost = false;
|
||||
boolean isMultiplayer = this.getPlayers().size() > 2;
|
||||
|
||||
for(Card c : cards) {
|
||||
if (c.getController().equals(p) && (c.isPlane() || c.isPhenomenon())) {
|
||||
planarControllerLost = true;
|
||||
}
|
||||
|
||||
if (c.getOwner().equals(p)) {
|
||||
c.ceaseToExist();
|
||||
} else {
|
||||
c.removeTempController(p);
|
||||
if (c.getController().equals(p)) {
|
||||
this.getAction().exile(c, null);
|
||||
if(isMultiplayer) {
|
||||
if (c.getOwner().equals(p)) {
|
||||
c.ceaseToExist();
|
||||
} else {
|
||||
c.removeTempController(p);
|
||||
if (c.getController().equals(p)) {
|
||||
this.getAction().exile(c, null);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
c.forceTurnFaceUp();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 901.6: If the current planar controller would leave the game, instead the next player
|
||||
|
||||
@@ -285,6 +285,12 @@ public class Match {
|
||||
if (null != cardsComplained) {
|
||||
rAICards.putAll(player, cardsComplained);
|
||||
}
|
||||
} else {
|
||||
//reset cards to fix weird issues on netplay nextgame client
|
||||
for (Card c : player.getCardsIn(ZoneType.Library)) {
|
||||
c.setTapped(false);
|
||||
c.resetActivationsPerTurn();
|
||||
}
|
||||
}
|
||||
|
||||
if (myRemovedAnteCards != null && !myRemovedAnteCards.isEmpty()) {
|
||||
|
||||
@@ -6331,6 +6331,12 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
getGame().getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
|
||||
}
|
||||
|
||||
public void forceTurnFaceUp() {
|
||||
getGame().getTriggerHandler().suppressMode(TriggerType.TurnFaceUp);
|
||||
turnFaceUp(false, false);
|
||||
getGame().getTriggerHandler().clearSuppression(TriggerType.TurnFaceUp);
|
||||
}
|
||||
|
||||
public final void addGoad(Long timestamp, final Player p) {
|
||||
goad.put(timestamp, p);
|
||||
updateAbilityTextForView();
|
||||
|
||||
@@ -886,12 +886,6 @@ public class CardView extends GameEntityView {
|
||||
}
|
||||
public String getImageKey(Iterable<PlayerView> viewers) {
|
||||
if (canBeShownToAny(viewers)) {
|
||||
// Morph cards can only be present on the battlefield and on stack, otherwise show a standard card back
|
||||
if (getZone() != ZoneType.Battlefield && getZone() != ZoneType.Stack) {
|
||||
if (isFaceDown() && get(TrackableProperty.ImageKey).equals(ImageKeys.getTokenKey(ImageKeys.MORPH_IMAGE))) {
|
||||
return ImageKeys.getTokenKey(ImageKeys.HIDDEN_CARD);
|
||||
}
|
||||
}
|
||||
return get(TrackableProperty.ImageKey);
|
||||
}
|
||||
return ImageKeys.getTokenKey(ImageKeys.HIDDEN_CARD);
|
||||
|
||||
@@ -61,8 +61,8 @@ public enum TrackableProperty {
|
||||
Haunting(TrackableTypes.CardViewType),
|
||||
MustBlockCards(TrackableTypes.CardViewCollectionType),
|
||||
PairedWith(TrackableTypes.CardViewType),
|
||||
CurrentState(TrackableTypes.CardStateViewType, FreezeMode.IgnoresFreezeIfUnset),
|
||||
AlternateState(TrackableTypes.CardStateViewType),
|
||||
CurrentState(TrackableTypes.CardStateViewType, FreezeMode.IgnoresFreeze),
|
||||
AlternateState(TrackableTypes.CardStateViewType, FreezeMode.IgnoresFreeze),
|
||||
HiddenId(TrackableTypes.IntegerType),
|
||||
ExertedThisTurn(TrackableTypes.BooleanType),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user