1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-12-23 21:03:14 +00:00
This commit is contained in:
exane 2015-07-01 20:18:09 +02:00
parent 05af359b85
commit 89b1396c50
6 changed files with 26 additions and 21 deletions

View File

@ -287,8 +287,8 @@ module.exports = {
}
},
"francesca_leader2": {
name: "",
description: "",
name: "Francesca Findabair the Beautiful",
description: "Doubles the strength of all your Ranged Combat units (unless a Commander's Horn is also present on that row).",
onActivate: function(){
this.setHorn("commanders_horn", 1);
}
@ -325,8 +325,8 @@ module.exports = {
}
},
"eredin_leader4": {
name: "",
description: "",
name: "Eredin King of the Wild Hunt",
description: "Double the strength of all your Close Combat units (unless a Commander's Horn is also present on that row).",
onActivate: function(){
this.setHorn("commanders_horn", 0);
}

View File

@ -5,6 +5,7 @@
<h1>{{winner}} wins the match!</h1>
<p>If you want to give feedback, or want to contribute, please feel free to visit <a href="https://github.com/exane/gwent-online" target="_blank">Github Gwent-Online</a>.</p>
<p>For another match reload the page und enqueue again!</p>
<p><button onclick="location.reload()">Reload</button></p>
<p><b>Thanks for playing the game!</b></p>
</div>
<div class="bbm-modal__bottombar">

View File

@ -111,7 +111,7 @@ var Battle = (function(){
Promise.when(this.p1.reDraw(2), this.p2.reDraw(2))
.then(function(){
this.on("NextTurn", this.switchTurn);
this.switchTurn(Math.random() > .5 ? this.p1 : this.p2);
this.switchTurn(Math.random() > 0.5 ? this.p1 : this.p2);
}.bind(this));
}
@ -136,7 +136,7 @@ var Battle = (function(){
this.runEvent("Turn" + side.getID());
console.log("current Turn: ", side.getName());
//console.log("current Turn: ", side.getName());
}
r.startNextRound = function(){
@ -144,7 +144,7 @@ var Battle = (function(){
var loser = lastRound.loser;
var winner = loser.foe;
if(this.checkIfIsOver()){
console.log("its over!");
//console.log("its over!");
this.gameOver(winner);
this.update();
return;
@ -153,13 +153,13 @@ var Battle = (function(){
this.p1.resetNewRound();
this.p2.resetNewRound();
console.log("start new round!");
//console.log("start new round!");
this.sendNotification("Start new round!");
if(winner.deck.getFaction() === Deck.FACTION.NORTHERN_REALM && !lastRound.isTie){
winner.draw(1);
console.log(winner.getName() + " draws 1 extra card! (Northern ability)");
//console.log(winner.getName() + " draws 1 extra card! (Northern ability)");
this.sendNotification(winner.getName() + " draws 1 extra card! (Northern ability)");
}
@ -182,10 +182,12 @@ var Battle = (function(){
r.waitForScoiatael = function(side){
var self = this;
self.sendNotification(side.getName() + " decides whos starts first");
side.turn();
side.foe.wait();
self.sendNotification(side.getName() + " decides who starts first");
side.send("request:chooseWhichSideBegins", null, true);
side.socket.once("response:chooseWhichSideBegins", function(data){
console.log("which side? ", data.side);
//console.log("which side? ", data.side);
if(data.side !== "p1" && data.side !== "p2")
throw new Error("Unknown side property! - ", data.side);
@ -202,7 +204,7 @@ var Battle = (function(){
}
r.update = function(){
console.log("update called");
//console.("update called");
this._update(this.p1);
this._update(this.p2);
}
@ -333,7 +335,7 @@ var Battle = (function(){
//check if is nilfgaardian faction ability
if(this.p1.deck.getFaction() === Deck.FACTION.NILFGAARDIAN_EMPIRE && this.p1.deck.getFaction() !== this.p2.deck.getFaction()){
this.p2.removeRuby();
console.log(this.p1.getName() + " wins the tie! (nilfgaardian ability)");
//console.log(this.p1.getName() + " wins the tie! (nilfgaardian ability)");
this.sendNotification(this.p1.getName() + " wins the tie! (nilfgaardian ability)");
return {
loser: this.p2,
@ -342,7 +344,7 @@ var Battle = (function(){
}
if(this.p2.deck.getFaction() === Deck.FACTION.NILFGAARDIAN_EMPIRE && this.p1.deck.getFaction() !== this.p2.deck.getFaction()){
this.p1.removeRuby();
console.log(this.p2.getName() + " wins the tie! (nilfgaardian ability)");
//console.log(this.p2.getName() + " wins the tie! (nilfgaardian ability)");
this.sendNotification(this.p2.getName() + " wins the tie! (nilfgaardian ability)");
return {
loser: this.p1,

View File

@ -50,7 +50,7 @@ Battleside = (function(){
var leaderCard = self.getLeader();
if(leaderCard.isDisabled()) return;
console.log("leader activated");
//console.log("leader activated");
var ability = leaderCard.getAbility();
@ -740,7 +740,8 @@ Battleside = (function(){
rndCard = this.getRandomCardOnField();
if(rndCard) {
rndCard.__lock = true;
console.log("Monsters faction ability triggered!");
//console.log("Monsters faction ability triggered!");
this.sendNotification(this.getName() + ": Monsters faction ability triggered! " + rndCard.getName());
} else {
this.sendNotification(this.getName() + ": Monsters faction ability triggered! But no card found.");
@ -848,13 +849,13 @@ Battleside = (function(){
if(!left) return;
left--;
var card = self.hand.remove(id)[0];
console.log("hand -> deck: ", card.getName());
//console.log("hand -> deck: ", card.getName());
self.deck.add(card);
self.deck.shuffle();
self.draw(1);
if(!left){
self.send("redraw:close", null, true);
console.log("redraw finished");
//console.log("redraw finished");
deferred.resolve("done");
//self.socket.off("redraw:reDrawCard", h1);
}
@ -863,7 +864,8 @@ Battleside = (function(){
})
this.receive("redraw:close_client", function(){
console.log("redraw finished!");
//console.log("redraw finished!");
self.wait();
deferred.resolve("done");
//self.socket.off("redraw:close_client", h2);
})

View File

@ -52,7 +52,7 @@ var Matchmaker = (function(){
}
r._getInQueue = function(user){
console.log(user.getName() + " joined in queue");
//console.log(user.getName() + " joined in queue");
this._queue.push(user);
user._inQueue = true;
}

View File

@ -17,7 +17,7 @@ var Room = (function(){
//this.socket = scServer.global;
console.log("room created: " + this.getID());
//console.log("room created: " + this.getID());
};
var r = Room.prototype;
/**