1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-10-31 10:36:53 +00:00

do card reset even if card is keeping on field (monster ability) after round end

This commit is contained in:
exane 2015-07-03 09:47:28 +02:00
parent 2c674a2191
commit a6dbba198f

View File

@ -88,19 +88,12 @@ var Field = (function(){
r.removeAll = function(){ r.removeAll = function(){
var tmp = this._cards.slice(); var tmp = this._cards.slice();
var self = this; var self = this;
/*tmp.forEach(function(card){
card.reset();
for(var event in card._uidEvents) {
self.side.off(event, card.getUidEvents(event));
}
})*/
for(var i = 0; i < tmp.length; i++) { for(var i = 0; i < tmp.length; i++) {
var card = tmp[i]; var card = tmp[i];
card.reset();
if(card.__lock){ if(card.__lock){
//delete card.__lock;
continue; continue;
} }
card.reset();
for(var event in card._uidEvents) { for(var event in card._uidEvents) {
self.side.off(event, card.getUidEvents(event)); self.side.off(event, card.getUidEvents(event));
} }