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

small changes

This commit is contained in:
exane 2015-07-05 12:03:44 +02:00
parent 862c18c408
commit 91cd34638f
5 changed files with 13 additions and 8 deletions

View File

@ -64,7 +64,8 @@ body {
} }
.btn-sub { .btn-sub {
font-size: 18px; font-size: 22px;
color: #6a8097;
} }
.bbm-modal__topbar { .bbm-modal__topbar {

View File

@ -1,6 +1,6 @@
<div class="bbm-modal__topbar"> <div class="bbm-modal__topbar">
<h3 class="bbm-modal__title">Choose one card from your foes discard pile</h3> <h3 class="bbm-modal__title">Choose one card from your foes discard pile</h3>
<span class="btn-sub bbm-close">CLOSE</span> <span class="btn-sub bbm-close">DONE</span>
</div> </div>
<div class="bbm-modal__section"> <div class="bbm-modal__section">
{{#each emreis_leader4.cards as |val key|}} {{#each emreis_leader4.cards as |val key|}}

View File

@ -1,6 +1,6 @@
<div class="bbm-modal__topbar"> <div class="bbm-modal__topbar">
<h3 class="bbm-modal__title">Choose one card from your discard pile</h3> <h3 class="bbm-modal__title">Choose one card from your discard pile</h3>
<span class="btn-sub bbm-close">CLOSE</span> <span class="btn-sub bbm-close">DONE</span>
</div> </div>
<div class="bbm-modal__section"> <div class="bbm-modal__section">
{{#each medicDiscard.cards as |val key|}} {{#each medicDiscard.cards as |val key|}}

View File

@ -1,6 +1,6 @@
<div class="bbm-modal__topbar"> <div class="bbm-modal__topbar">
<h3 class="bbm-modal__title">Choose up to 2 cards you wish to redraw!</h3> <h3 class="bbm-modal__title">Choose up to 2 cards you wish to redraw!</h3>
<span class="btn-sub bbm-close">READY</span> <span class="btn-sub bbm-close">DONE</span>
</div> </div>
<div class="bbm-modal__section preview-b small-cards-modal"> <div class="bbm-modal__section preview-b small-cards-modal">
{{#each handCards as |val key|}} {{#each handCards as |val key|}}

View File

@ -142,6 +142,9 @@ var Battle = (function(){
} }
r.getWinner = function() { r.getWinner = function() {
if(!this.p1.getRubies() && !this.p2.getRubies()){
return null; //tie
}
return this.p1.getRubies() ? this.p1 : this.p2; return this.p1.getRubies() ? this.p1 : this.p2;
} }
@ -152,6 +155,7 @@ var Battle = (function(){
if(this.checkIfIsOver()){ if(this.checkIfIsOver()){
//console.log("its over!"); //console.log("its over!");
var winner = this.getWinner(); var winner = this.getWinner();
winner = winner ? winner.getName() : "nobody";
this.gameOver(winner); this.gameOver(winner);
this.update(); this.update();
return; return;
@ -182,8 +186,8 @@ var Battle = (function(){
this.waitForScoiatael(this.p2); this.waitForScoiatael(this.p2);
} }
else { else {
this.sendNotification(loser.getName() + " begins!"); this.sendNotification(winner.getName() + " begins!");
this.switchTurn(loser); this.switchTurn(winner);
} }
} }
@ -204,9 +208,9 @@ var Battle = (function(){
}) })
} }
r.gameOver = function(winner){ r.gameOver = function(winnerName){
this.send("gameover", { this.send("gameover", {
winner: winner.getName() winner: winnerName
}) })
} }