From e77ebb1149663ae269e810a12dd4f5406db1e94f Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Sat, 13 May 2023 18:21:07 -0500 Subject: [PATCH] Added a fourth UI pile for showing all cards which have been removed from the game. This was supposed to be public information for all sides, but was incorrectly handled as private info. --- .../src/main/web/css/gemp-001/game.css | 11 ++++ .../src/main/web/images/exiled-42.png | Bin 0 -> 2763 bytes .../main/web/js/gemp-022/gameAnimations.js | 4 ++ .../src/main/web/js/gemp-022/gameUi.js | 50 +++++++++--------- .../lotro/logic/timing/GameStats.java | 1 + 5 files changed, 40 insertions(+), 26 deletions(-) create mode 100644 gemp-lotr/gemp-lotr-async/src/main/web/images/exiled-42.png diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css index 1f9b044ce..fad6a3f36 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css +++ b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/game.css @@ -68,6 +68,17 @@ body { background-image: url('/gemp-lotr/images/adventureDeck-42.png'); } +.removedPileSize { + display: none; + text-align: center; + vertical-align: middle; + font-size: 200%; + font-weight: bolder; + width: 42px; + height: 42px; + background-image: url('/gemp-lotr/images/exiled-42.png'); +} + .showStats { display: table-cell; } diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/images/exiled-42.png b/gemp-lotr/gemp-lotr-async/src/main/web/images/exiled-42.png new file mode 100644 index 0000000000000000000000000000000000000000..cf1faf0801fbf751de4f672b3525e6f6c491643a GIT binary patch literal 2763 zcmV;+3N-bJP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+HFul4#OY}yYq@Y0g?d8bLiSh`@x<+18LP(wS+M- zG9h96eLvyVK}mw-s>Mo)fS4FH2#phMaEdZ`fSP;hS`UXoC^2@PM=gGTucsqmZVf7* zg7odiay3jmUvEMF5ciGNAf{;~4`|+LF|Fq>EL*%n=L(&;j_f1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otr-async/src/main/web/js/gemp-022/gameAnimations.js index 2af91a52d..59e1eac59 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameAnimations.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameAnimations.js @@ -226,6 +226,8 @@ var GameAnimations = Class.extend({ that.game.deadPileDialogs[participantId].append(cardDiv); else if (zone == "ADVENTURE_DECK") that.game.adventureDeckDialogs[participantId].append(cardDiv); + else if (zone == "REMOVED") + that.game.removedPileDialogs[participantId].append(cardDiv); else $("#main").append(cardDiv); @@ -797,12 +799,14 @@ var GameAnimations = Class.extend({ var adventureDeck = playerZone.getAttribute("ADVENTURE_DECK"); var dead = playerZone.getAttribute("DEAD"); var deck = playerZone.getAttribute("DECK"); + var removed = playerZone.getAttribute("REMOVED"); $("#deck" + that.game.getPlayerIndex(playerId)).text(deck); $("#hand" + that.game.getPlayerIndex(playerId)).text(hand); $("#discard" + that.game.getPlayerIndex(playerId)).text(discard); $("#deadPile" + that.game.getPlayerIndex(playerId)).text(dead); $("#adventureDeck" + that.game.getPlayerIndex(playerId)).text(adventureDeck); + $("#removedPile" + that.game.getPlayerIndex(playerId)).text(removed); } var playerThreats = element.getElementsByTagName("threats") diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js index 6747c533f..5d162a6ee 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js @@ -32,6 +32,8 @@ var GempLotrGameUI = Class.extend({ adventureDeckGroups: null, deadPileDialogs: null, deadPileGroups: null, + removedPileDialogs: null, + removedPileGroups: null, statsDiv: null, @@ -146,6 +148,8 @@ var GempLotrGameUI = Class.extend({ this.adventureDeckGroups = {}; this.deadPileDialogs = {}; this.deadPileGroups = {}; + this.removedPileDialogs = {}; + this.removedPileGroups = {}; this.skirmishShadowGroup = new NormalCardGroup($("#main"), function (card) { return card.zone == "SHADOW_CHARACTERS" && card.skirmish == true; @@ -294,7 +298,7 @@ var GempLotrGameUI = Class.extend({ for (var i = 0; i < this.allPlayerIds.length; i++) { this.gameStateElem.append("
" + (i + 1) + ". " + this.allPlayerIds[i] + "
" - + "
"); + + "
"); } this.gameStateElem.append("
0
"); @@ -314,11 +318,13 @@ var GempLotrGameUI = Class.extend({ $("#discard" + playerIndex).css({display: "none"}); $("#deadPile" + playerIndex).css({display: "none"}); $("#adventureDeck" + playerIndex).css({display: "none"}); + $("#removedPile" + playerIndex).css({display: "none"}); } else { - $(this).addClass("opened").css({width: 150 - that.padding + 126}); + $(this).addClass("opened").css({width: 150 - that.padding + 168}); $("#discard" + playerIndex).css({display: "table-cell"}); $("#deadPile" + playerIndex).css({display: "table-cell"}); $("#adventureDeck" + playerIndex).css({display: "table-cell"}); + $("#removedPile" + playerIndex).css({display: "table-cell"}); } } }); @@ -328,7 +334,6 @@ var GempLotrGameUI = Class.extend({ $("#showStats" + i).append(showBut); } - //TODO: This is where we will need to add support for public discard piles if (!this.spectatorMode) { if(!discardPublic) { $("#discard" + this.getPlayerIndex(this.bottomPlayerId)).addClass("clickable").click( @@ -366,6 +371,17 @@ var GempLotrGameUI = Class.extend({ }; })(i)); + $("#removedPile" + i).addClass("clickable").click( + (function (index) { + return function () { + var dialog = that.removedPileDialogs[that.allPlayerIds[index]]; + var group = that.removedPileGroups[that.allPlayerIds[index]]; + openSizeDialog(dialog); + that.dialogResize(dialog, group); + group.layoutCards(); + }; + })(i)); + if(discardPublic) { $("#discard" + i).addClass("clickable").click( (function (index) { @@ -1028,6 +1044,10 @@ var GempLotrGameUI = Class.extend({ for (var playerId in this.deadPileGroups) if (this.deadPileGroups.hasOwnProperty(playerId)) this.deadPileGroups[playerId].layoutCards(); + + for (var playerId in this.removedPileGroups) + if (this.removedPileGroups.hasOwnProperty(playerId)) + this.removedPileGroups[playerId].layoutCards(); } this.tabPane.css({ position: "absolute", @@ -1399,33 +1419,11 @@ var GempLotrGameUI = Class.extend({ participantId = this.allPlayerIds[i]; this.createPile(participantId, "Dead Pile", "deadPileDialogs", "deadPileGroups"); + this.createPile(participantId, "Removed Pile", "removedPileDialogs", "removedPileGroups"); if(discardPublic) { this.createPile(participantId, "Discard Pile", "discardPileDialogs", "discardPileGroups"); } - - // var deadPileDialog = $("
").dialog({ - // autoOpen: false, - // closeOnEscape: true, - // resizable: true, - // title: "Dead pile - " + this.allPlayerIds[i], - // minHeight: 80, - // minWidth: 200, - // width: 600, - // height: 300 - // }); - // this.deadPileDialogs[this.allPlayerIds[i]] = deadPileDialog; - // this.deadPileGroups[this.allPlayerIds[i]] = new NormalCardGroup(deadPileDialog, function (card) { - // return true; - // }, false); - - // this.deadPileGroups[this.allPlayerIds[i]].setBounds(this.padding, this.padding, 580 - 2 * (this.padding), 250 - 2 * (this.padding)); - - // deadPileDialog.bind("dialogresize", (function (dialog, index) { - // return function () { - // that.dialogResize(dialog, that.deadPileGroups[that.allPlayerIds[index]]); - // } - // })(deadPileDialog, i)); } this.initializeGameUI(discardPublic); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/GameStats.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/GameStats.java index 08142a571..7b95a42a2 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/GameStats.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/GameStats.java @@ -135,6 +135,7 @@ public class GameStats { playerZoneSizes.put(Zone.ADVENTURE_DECK, game.getGameState().getAdventureDeck(player).size()); playerZoneSizes.put(Zone.DISCARD, game.getGameState().getDiscard(player).size()); playerZoneSizes.put(Zone.DEAD, game.getGameState().getDeadPile(player).size()); + playerZoneSizes.put(Zone.REMOVED, game.getGameState().getRemoved(player).size()); newZoneSizes.put(player, playerZoneSizes); } }