From 83c44a18d2ccca3f6ae984ef7fcb8575049fb7f3 Mon Sep 17 00:00:00 2001 From: exane Date: Fri, 26 Jun 2015 08:29:01 +0200 Subject: [PATCH] fix weather bug --- client/js/client.js | 2 +- server/Battle.js | 27 +++++++++------------------ server/Battleside.js | 1 + 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/client/js/client.js b/client/js/client.js index 282a8ab..8ad571e 100644 --- a/client/js/client.js +++ b/client/js/client.js @@ -308,7 +308,7 @@ let BattleView = Backbone.View.extend({ if(this.user.get("waiting")) return; this.user.set("passing", true); this.user.get("app").send("set:passing"); - }, + }, onClick: function(e){ if(!!this.user.get("waiting")) return; if(!!this.user.get("passing")) return; diff --git a/server/Battle.js b/server/Battle.js index fa62b51..11073bc 100644 --- a/server/Battle.js +++ b/server/Battle.js @@ -64,24 +64,15 @@ var Battle = (function(){ this.p1.draw(10); this.p2.draw(10); - /*this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry")); - this.p1.hand.add(Card("poor_fucking_infantry")); - this.p2.hand.add(Card("poor_fucking_infantry"));*/ + /* this.p1.hand.add(Card("impenetrable_fog")); + this.p2.hand.add(Card("impenetrable_fog")); + this.p1.hand.add(Card("biting_frost")); + this.p2.hand.add(Card("biting_frost")); + this.p1.hand.add(Card("torrential_rain")); + this.p2.hand.add(Card("torrential_rain")); + this.p1.hand.add(Card("clear_weather")); + this.p2.hand.add(Card("clear_weather"));*/ + this.update(); diff --git a/server/Battleside.js b/server/Battleside.js index 98c78fe..198b8e4 100644 --- a/server/Battleside.js +++ b/server/Battleside.js @@ -567,6 +567,7 @@ Battleside = (function(){ r.resetNewRound = function(){ this.clearMainFields(); + this.setWeather(5); //clear weather this.setPassing(false); }