add warning for effect source to selectEner

This commit is contained in:
WEBXOSS 2017-03-01 00:33:58 +08:00
parent ff57f7b810
commit 23b6fbca00

View file

@ -392,7 +392,10 @@ Dialog.prototype.selectSomeCards = function (title,cards,arg,callback) {
};
Dialog.prototype.selectEner = function (title,cards,colors,cost,callback,onCancel) {
this.selectCardAdvanced(title,cards,null,false,false,onSelectChange,callback,onCancel);
var texts = cards.map(function (card) {
return card.cid === cost.source ? 'WARN' : '';
},this);
this.selectCardAdvanced(title,cards,texts,false,false,onSelectChange,callback,onCancel);
function onSelectChange (selectedIndexes,disable) {
var need = {};