mirror of
https://github.com/exane/not-gwent-online
synced 2025-08-30 05:57:30 +00:00
add winner notification and weather effects
This commit is contained in:
@@ -53,24 +53,6 @@ var Battle = (function(){
|
||||
this.p2.foe = this.p1;
|
||||
this.p1.setUpWeatherFieldWith(this.p2);
|
||||
|
||||
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.start();
|
||||
@@ -82,6 +64,26 @@ 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.update();
|
||||
|
||||
|
||||
@@ -120,6 +122,7 @@ var Battle = (function(){
|
||||
var loser = this.checkRubies();
|
||||
if(this.checkIfIsOver()){
|
||||
console.log("its over!");
|
||||
this.gameOver(loser.foe);
|
||||
this.update();
|
||||
return;
|
||||
}
|
||||
@@ -133,6 +136,12 @@ var Battle = (function(){
|
||||
this.switchTurn(loser);
|
||||
}
|
||||
|
||||
r.gameOver = function(winner) {
|
||||
this.send("gameover", {
|
||||
winner: winner.getName()
|
||||
})
|
||||
}
|
||||
|
||||
r.update = function(){
|
||||
console.log("update called");
|
||||
this._update(this.p1);
|
||||
|
Reference in New Issue
Block a user