mirror of
https://github.com/webxoss/webxoss-client.git
synced 2024-11-20 05:49:55 +01:00
fix ener zone button
This commit is contained in:
parent
23b6fbca00
commit
8ff00e83cf
2 changed files with 5 additions and 2 deletions
|
@ -393,7 +393,7 @@ Dialog.prototype.selectSomeCards = function (title,cards,arg,callback) {
|
||||||
|
|
||||||
Dialog.prototype.selectEner = function (title,cards,colors,cost,callback,onCancel) {
|
Dialog.prototype.selectEner = function (title,cards,colors,cost,callback,onCancel) {
|
||||||
var texts = cards.map(function (card) {
|
var texts = cards.map(function (card) {
|
||||||
return card.cid === cost.source ? 'WARN' : '';
|
return card.sid === cost.source ? 'WARN' : '';
|
||||||
},this);
|
},this);
|
||||||
this.selectCardAdvanced(title,cards,texts,false,false,onSelectChange,callback,onCancel);
|
this.selectCardAdvanced(title,cards,texts,false,false,onSelectChange,callback,onCancel);
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ Selector.prototype.showButtons = function () {
|
||||||
var buttonCarrier;
|
var buttonCarrier;
|
||||||
var description = msg.descriptions[idx];
|
var description = msg.descriptions[idx];
|
||||||
if (card.shouldUseDialog()) {
|
if (card.shouldUseDialog()) {
|
||||||
if (card.zone.constructor === TileZone && card.zone.name !== 'EnerZone') {
|
if (card.zone.constructor === TileZone) {
|
||||||
buttonCarrier = this.game.buttonZone;
|
buttonCarrier = this.game.buttonZone;
|
||||||
} else {
|
} else {
|
||||||
buttonCarrier = card.zone;
|
buttonCarrier = card.zone;
|
||||||
|
@ -76,6 +76,9 @@ Selector.prototype.showButtons = function () {
|
||||||
} else {
|
} else {
|
||||||
buttonCarrier = card;
|
buttonCarrier = card;
|
||||||
}
|
}
|
||||||
|
if (card.zone.name === 'EnerZone') {
|
||||||
|
buttonCarrier = card.zone.cards.length > 4 ? card.zone : card;
|
||||||
|
}
|
||||||
var data;
|
var data;
|
||||||
for (var i = 0; i < datas.length; i++) {
|
for (var i = 0; i < datas.length; i++) {
|
||||||
var data= datas[i];
|
var data= datas[i];
|
||||||
|
|
Loading…
Reference in a new issue