1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-11-08 09:08:40 +00:00

debugging

This commit is contained in:
exane
2015-06-20 13:08:28 +02:00
parent eb647efa20
commit 190a44e103
5 changed files with 21 additions and 14 deletions

View File

@@ -59,9 +59,13 @@ var Battle = (function(){
r.start = function(){
this.p1.setLeadercard();
this.p2.setLeadercard();
this.p1.draw(5);
this.p2.draw(5);
this.p1.draw(10);
this.p2.draw(10);
this.p1.hand.add(Card("blue_stripes_commando"));
this.p2.hand.add(Card("blue_stripes_commando"));
this.p1.hand.add(Card("blue_stripes_commando"));
this.p2.hand.add(Card("blue_stripes_commando"));
/*
this.p1.hand.add(Card("kaedweni_siege_expert"));
this.p2.hand.add(Card("kaedweni_siege_expert"));
this.p1.hand.add(Card("ballista"));
@@ -75,15 +79,15 @@ var Battle = (function(){
this.p1.hand.add(Card("ballista"));
this.p2.hand.add(Card("ballista"));
this.p1.hand.add(Card("decoy"));
this.p2.hand.add(Card("decoy"));
this.p2.hand.add(Card("decoy"));*/
/*
this.p1.hand.add(Card("dun_banner_medic"));
this.p2.hand.add(Card("dun_banner_medic"));
this.p1.hand.add(Card("isengrim_faoiltiarnah"));
this.p2.hand.add(Card("isengrim_faoiltiarnah"));*/
/*this.p1.addToDiscard([Card("kaedweni_siege_expert")]);
this.p2.addToDiscard([Card("kaedweni_siege_expert")]);*/
this.p1.addToDiscard([Card("kaedweni_siege_expert")]);
this.p2.addToDiscard([Card("kaedweni_siege_expert")]);
/*
this.p1.hand.add(Card("decoy"));
this.p1.hand.add(Card("impenetrable_fog"));

View File

@@ -286,8 +286,6 @@ Battleside = (function(){
this.runEvent("EachCardPlace");
this.checkAbilityOnAfterPlace(card, obj);
/*
this.runEvent("AfterPlace", this, [card, obj]);*/
this.update();
@@ -329,10 +327,10 @@ Battleside = (function(){
}
if(ability.changeSide){
obj.targetSide = this.foe;
}
}/*
if(ability.onReset){
this.on("Reset", ability.onReset, this, [card])
}
}*/
if(ability.replaceWith){
obj._cancelPlacement = true;
this.on("Decoy:replaceWith", function(replaceCard){

View File

@@ -46,6 +46,10 @@ var Hand = (function(){
id = id instanceof Card ? id.getID() : id;
for(var i = 0; i < n; i++) {
if(!this._hand[i]) {
console.trace(this._hand[i]);
continue;
}
if(this._hand[i].getID() != id) continue;
return this._hand.splice(i, 1);
}