diff --git a/.gitignore b/.gitignore index 7d975d8f8..093b530a5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ logs/* **/logs .idea/ *.iml -remote-sync \ No newline at end of file +remote-sync +replay \ No newline at end of file diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3 b/gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3 new file mode 100644 index 000000000..5c3151126 Binary files /dev/null and b/gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3 differ diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3 b/gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3 new file mode 100644 index 000000000..c5a474574 Binary files /dev/null and b/gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3 differ diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/game.html b/gemp-lotr/gemp-lotr-async/src/main/web/game.html index 7b4981d5a..98b11aa52 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/game.html +++ b/gemp-lotr/gemp-lotr-async/src/main/web/game.html @@ -41,6 +41,9 @@ + + + + + diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/images/erratas/LOTR18008.jpg b/gemp-lotr/gemp-lotr-async/src/main/web/images/erratas/LOTR18008.jpg index 8e0a31b42..26b42ade0 100644 Binary files a/gemp-lotr/gemp-lotr-async/src/main/web/images/erratas/LOTR18008.jpg and b/gemp-lotr/gemp-lotr-async/src/main/web/images/erratas/LOTR18008.jpg differ 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 22db5d9a1..38b48dba8 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 @@ -1536,7 +1536,10 @@ var GempLotrGameUI = Class.extend({ this.smallDialog.append(but); } if (!this.replayMode) + { this.smallDialog.dialog("option", "buttons", {}); + this.PlaySound("awaitAction"); + } } this.smallDialog.dialog("open"); @@ -1798,7 +1801,10 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } openSizeDialog(this.cardActionDialog); this.arbitraryDialogResize(false); @@ -1940,10 +1946,21 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } $(':button').blur(); }, + + PlaySound: function(soundObj) { + var myAudio = document.getElementById(soundObj); + if(!document.hasFocus() || document.hidden || document.msHidden || document.webkitHidden) + { + myAudio.play(); + } + }, createActionChoiceContextMenu: function (actions, event, selectActionFunction) { // Remove context menus that may be showing @@ -2071,7 +2088,10 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } openSizeDialog(this.cardActionDialog); this.arbitraryDialogResize(false); @@ -2151,7 +2171,10 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } }, assignMinionsDecision: function (decision) { @@ -2199,6 +2222,8 @@ var GempLotrGameUI = Class.extend({ that.clearSelection(); that.decisionFunction(id, "" + assignmentArray); + + this.PlaySound("awaitAction"); }); } diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js index 2e7b04024..0e1f77943 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js @@ -397,6 +397,11 @@ var GempLotrHallUI = Class.extend({ .css({borderTopColor:"#000000", borderLeftColor:"#000000", borderBottomColor:"#000000", borderRightColor:"#000000"}) .animate({borderTopColor:"#ffffff", borderLeftColor:"#ffffff", borderBottomColor:"#ffffff", borderRightColor:"#ffffff"}, "fast"); }, + + PlaySound: function(soundObj) { + var myAudio = document.getElementById(soundObj); + myAudio.play(); + }, processHall:function (xml) { var that = this; @@ -678,12 +683,14 @@ var GempLotrHallUI = Class.extend({ window.open("/gemp-lotr/game.html?gameId=" + waitingGameId + participantIdAppend, "_blank"); } if (games.length > 0) { - var soundPlay = $(""); - this.tablesDiv.append(soundPlay); - setTimeout( - function() { - soundPlay.remove(); - }, 5000); + // var soundPlay = $(""); + // this.tablesDiv.append(soundPlay); + // setTimeout( + // function() { + // soundPlay.remove(); + // }, 5000); + + this.PlaySound("gamestart"); } if (!this.supportedFormatsInitialized) { diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/jCards.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/jCards.js index a322019d6..64bd7f704 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/jCards.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/jCards.js @@ -228,6 +228,12 @@ var Card = Class.extend({ }, hasErrata: function () { + var separator = this.blueprintId.indexOf("_"); + var setNo = parseInt(this.blueprintId.substr(0, separator)); + + if(setNo >= 50 && setNo <= 69) + return true; + return this.errata; },