- When assignments are done, if there is at least one minion unassigned (that could have been assigned), player will
have to confirm these assignments to proceed.
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
<pre style="font-size:80%">
|
<pre style="font-size:80%">
|
||||||
<b>02 Jan. 2013</b>
|
<b>02 Jan. 2013</b>
|
||||||
- "Countless Companies" should now correctly be able to "catch" possessions.
|
- "Countless Companies" should now correctly be able to "catch" possessions.
|
||||||
|
- When assignments are done, if there is at least one minion unassigned (that could have been assigned), player will
|
||||||
|
have to confirm these assignments to proceed.
|
||||||
|
|
||||||
<b>01 Jan. 2013</b>
|
<b>01 Jan. 2013</b>
|
||||||
- "Scintillating Bird" now should discard the cards, if not enough cards of the specified type are revealed.
|
- "Scintillating Bird" now should discard the cards, if not enough cards of the specified type are revealed.
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ var GempLotrGameUI = Class.extend({
|
|||||||
shadowAssignGroups:null,
|
shadowAssignGroups:null,
|
||||||
freePeopleAssignGroups:null,
|
freePeopleAssignGroups:null,
|
||||||
|
|
||||||
assignmentStarted:null,
|
|
||||||
|
|
||||||
selectionFunction:null,
|
selectionFunction:null,
|
||||||
|
|
||||||
chatBoxDiv:null,
|
chatBoxDiv:null,
|
||||||
@@ -1870,22 +1868,13 @@ var GempLotrGameUI = Class.extend({
|
|||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
this.assignmentStarted = false;
|
|
||||||
|
|
||||||
this.alertText.html(text);
|
this.alertText.html(text);
|
||||||
// ****CCG League****: Border around alert box
|
// ****CCG League****: Border around alert box
|
||||||
this.alertBox.css({"border-radius":"7px", "border-color":"#7faf7f", "border-width":"2px"});
|
this.alertBox.css({"border-radius":"7px", "border-color":"#7faf7f", "border-width":"2px"});
|
||||||
if (!this.replayMode) {
|
if (!this.replayMode) {
|
||||||
this.alertButtons.html("<button id='Done'>Done</button>");
|
this.alertButtons.html("<button id='Done'>Done</button>");
|
||||||
$("#Done").button().click(function () {
|
$("#Done").button().click(function () {
|
||||||
if (!that.assignmentStarted && !confirm("Do you want to skip assigning?"))
|
var atLeastOnMinionUnassigned = false;
|
||||||
return;
|
|
||||||
|
|
||||||
that.alertText.html("");
|
|
||||||
// ****CCG League****: Border around alert box
|
|
||||||
that.alertBox.css({"border-radius":"7px", "border-color":"", "border-width":"1px"});
|
|
||||||
that.alertButtons.html("");
|
|
||||||
that.clearSelection();
|
|
||||||
|
|
||||||
var assignmentMap = {};
|
var assignmentMap = {};
|
||||||
for (var i = 0; i < freeCharacters.length; i++) {
|
for (var i = 0; i < freeCharacters.length; i++) {
|
||||||
@@ -1896,13 +1885,24 @@ var GempLotrGameUI = Class.extend({
|
|||||||
var card = $(this).data("card");
|
var card = $(this).data("card");
|
||||||
if (card.assign != null)
|
if (card.assign != null)
|
||||||
assignmentMap[card.assign] += " " + card.cardId;
|
assignmentMap[card.assign] += " " + card.cardId;
|
||||||
|
else
|
||||||
|
atLeastOnMinionUnassigned=true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (atLeastOnMinionUnassigned && !confirm("At least one minion has not been assigned, do you want to proceed?"))
|
||||||
|
return;
|
||||||
|
|
||||||
var assignmentArray = new Array();
|
var assignmentArray = new Array();
|
||||||
for (var i = 0; i < freeCharacters.length; i++) {
|
for (var i = 0; i < freeCharacters.length; i++) {
|
||||||
assignmentArray.push(assignmentMap[freeCharacters[i]]);
|
assignmentArray.push(assignmentMap[freeCharacters[i]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
that.alertText.html("");
|
||||||
|
// ****CCG League****: Border around alert box
|
||||||
|
that.alertBox.css({"border-radius":"7px", "border-color":"", "border-width":"1px"});
|
||||||
|
that.alertButtons.html("");
|
||||||
|
that.clearSelection();
|
||||||
|
|
||||||
that.decisionFunction(id, "" + assignmentArray);
|
that.decisionFunction(id, "" + assignmentArray);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1954,7 +1954,6 @@ var GempLotrGameUI = Class.extend({
|
|||||||
doAssignments:function (freeCharacters, minions) {
|
doAssignments:function (freeCharacters, minions) {
|
||||||
var that = this;
|
var that = this;
|
||||||
this.selectionFunction = function (cardId) {
|
this.selectionFunction = function (cardId) {
|
||||||
that.assignmentStarted = true;
|
|
||||||
that.clearSelection();
|
that.clearSelection();
|
||||||
|
|
||||||
that.selectionFunction = function (secondCardId) {
|
that.selectionFunction = function (secondCardId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user