mirror of
https://github.com/exane/not-gwent-online
synced 2024-11-23 19:36:53 +00:00
minor fixes
This commit is contained in:
parent
9b71d0d06b
commit
d469585b89
@ -348,7 +348,7 @@ let BattleView = Backbone.View.extend({
|
||||
});
|
||||
|
||||
if(key === "decoy"){
|
||||
console.log("its decoy!!!");
|
||||
//console.log("its decoy!!!");
|
||||
this.user.set("waitForDecoy", id);
|
||||
this.render();
|
||||
}
|
||||
@ -369,7 +369,7 @@ let BattleView = Backbone.View.extend({
|
||||
if(this.user.get("setAgile")){
|
||||
let $field = $(e.target).closest(".field.active").find(".field-close, .field-range");
|
||||
|
||||
console.log($field);
|
||||
//console.log($field);
|
||||
let target = $field.hasClass("field-close") ? 0 : 1;
|
||||
this.app.send("agile:field", {
|
||||
field: target
|
||||
@ -379,7 +379,7 @@ let BattleView = Backbone.View.extend({
|
||||
if(this.user.get("setHorn")){
|
||||
let $field = $(e.target).closest(".field.active").find(".field-close, .field-range, .field-siege");
|
||||
|
||||
console.log($field);
|
||||
//console.log($field);
|
||||
let target = $field.hasClass("field-close") ? 0 : ($field.hasClass("field-range") ? 1 : 2);
|
||||
this.app.send("horn:field", {
|
||||
field: target
|
||||
@ -399,7 +399,7 @@ let BattleView = Backbone.View.extend({
|
||||
},
|
||||
openDiscard: function(e){
|
||||
let $discard = $(e.target).closest(".field-discard");
|
||||
console.log("opened discard");
|
||||
//console.log("opened discard");
|
||||
let side;
|
||||
if($discard.parent().hasClass("player")){
|
||||
side = this.yourSide;
|
||||
@ -477,7 +477,7 @@ let BattleView = Backbone.View.extend({
|
||||
if(!$card.parent().hasClass("player")) return;
|
||||
if($card.find(".card").hasClass("disabled")) return;
|
||||
|
||||
console.log("click leader");
|
||||
//console.log("click leader");
|
||||
|
||||
|
||||
this.app.send("activate:leader")
|
||||
@ -582,7 +582,7 @@ let MedicModal = Modal.extend({
|
||||
"click .card": "onCardClick"
|
||||
},
|
||||
onCardClick: function(e){
|
||||
console.log($(e.target).closest(".card"));
|
||||
//console.log($(e.target).closest(".card"));
|
||||
let id = $(e.target).closest(".card").data().id;
|
||||
this.model.get("app").send("medic:chooseCardFromDiscard", {
|
||||
cardID: id
|
||||
@ -604,7 +604,7 @@ let ReDrawModal = Modal.extend({
|
||||
"click .card": "onCardClick"
|
||||
},
|
||||
onCardClick: function(e){
|
||||
console.log($(e.target).closest(".card"));
|
||||
//console.log($(e.target).closest(".card"));
|
||||
let id = $(e.target).closest(".card").data().id;
|
||||
this.model.get("app").send("redraw:reDrawCard", {
|
||||
cardID: id
|
||||
@ -638,7 +638,7 @@ let User = Backbone.Model.extend({
|
||||
});
|
||||
|
||||
app.receive("init:battle", function(data){
|
||||
console.log("opponent found!");
|
||||
//console.log("opponent found!");
|
||||
self.set("roomSide", data.side);
|
||||
/*
|
||||
self.set("channel:battle", app.socket.subscribe(self.get("room")));*/
|
||||
@ -653,7 +653,7 @@ let User = Backbone.Model.extend({
|
||||
|
||||
app.receive("response:joinRoom", function(roomID){
|
||||
self.set("room", roomID);
|
||||
console.log("room id", self.get("room"));
|
||||
//console.log("room id", self.get("room"));
|
||||
})
|
||||
|
||||
app.receive("set:waiting", function(data){
|
||||
@ -667,25 +667,25 @@ let User = Backbone.Model.extend({
|
||||
})
|
||||
|
||||
app.receive("foe:left", function(){
|
||||
console.log("your foe left the room");
|
||||
//console.log("your foe left the room");
|
||||
$(".container").prepend('<div class="alert alert-danger">Your foe left the battle!</div>')
|
||||
})
|
||||
|
||||
app.receive("played:medic", function(data){
|
||||
let cards = JSON.parse(data.cards);
|
||||
console.log("played medic");
|
||||
//console.log("played medic");
|
||||
self.set("medicDiscard", {
|
||||
cards: cards
|
||||
});
|
||||
})
|
||||
|
||||
app.receive("played:agile", function(data){
|
||||
console.log("played agile");
|
||||
//console.log("played agile");
|
||||
self.set("setAgile", data.cardID);
|
||||
})
|
||||
|
||||
app.receive("played:horn", function(data){
|
||||
console.log("played horn");
|
||||
//console.log("played horn");
|
||||
self.set("setHorn", data.cardID);
|
||||
})
|
||||
|
||||
@ -710,7 +710,7 @@ let User = Backbone.Model.extend({
|
||||
app.receive("gameover", function(data){
|
||||
let winner = data.winner;
|
||||
|
||||
console.log("gameover");
|
||||
//console.log("gameover");
|
||||
|
||||
let model = Backbone.Model.extend({});
|
||||
let modal = new WinnerModal({model: new model({winner: winner})});
|
||||
@ -742,7 +742,7 @@ let User = Backbone.Model.extend({
|
||||
this.get("app").send("request:name", {name: name});
|
||||
},
|
||||
setDeck: function(deckKey){
|
||||
console.log("deck: ", deckKey);
|
||||
//console.log("deck: ", deckKey);
|
||||
this.set("deckKey", deckKey);
|
||||
this.get("app").send("set:deck", {deck: deckKey});
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ $game-height: 800px;
|
||||
.field {
|
||||
//width: 100%;
|
||||
height: 100px;
|
||||
border: 1px solid black;/*
|
||||
border: 1px solid black;
|
||||
/*
|
||||
overflow: hidden;
|
||||
|
||||
&:hover {
|
||||
@ -45,7 +46,8 @@ $game-height: 800px;
|
||||
}
|
||||
}
|
||||
|
||||
.field-horn {/*
|
||||
.field-horn {
|
||||
/*
|
||||
border: 1px solid green;*/
|
||||
/*clear: both;*/
|
||||
margin: 0px;
|
||||
@ -67,17 +69,19 @@ $game-height: 800px;
|
||||
&:hover {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
transform: scale(1.25,1.25);
|
||||
transform: scale(1.25, 1.25);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.passing {/*
|
||||
.passing {
|
||||
/*
|
||||
display: none;*/
|
||||
}
|
||||
|
||||
.field-single {
|
||||
border: 1px solid black;/*
|
||||
border: 1px solid black;
|
||||
/*
|
||||
width: 85px;*/
|
||||
/*margin: 5px;*/
|
||||
height: 98px;
|
||||
@ -157,7 +161,7 @@ $game-height: 800px;
|
||||
&.activeCard {
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
transform: scale(1.5,1.5) !important;
|
||||
transform: scale(1.5, 1.5) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,7 +188,7 @@ $game-height: 800px;
|
||||
|
||||
}
|
||||
|
||||
.gwent-lives{
|
||||
.gwent-lives {
|
||||
i {
|
||||
display: block;
|
||||
float: left;
|
||||
@ -195,43 +199,44 @@ $game-height: 800px;
|
||||
background: url("../../assets/ruby.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.field {
|
||||
.field {
|
||||
&.field-frost {
|
||||
background: #ffffff; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#2365ff)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#2365ff 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#2365ff 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#2365ff 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #ffffff 0%,#2365ff 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#2365ff',GradientType=0 ); /* IE6-9 */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #2365ff)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%, #2365ff 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #ffffff 0%, #2365ff 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#2365ff', GradientType=0); /* IE6-9 */
|
||||
|
||||
}
|
||||
&.field-fog {
|
||||
background: #ffffff; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #232f30 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#232f30)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#232f30 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#232f30 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#232f30 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #ffffff 0%,#232f30 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#232f30',GradientType=0 ); /* IE6-9 */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #232f30)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%, #232f30 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%, #232f30 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%, #232f30 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #ffffff 0%, #232f30 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#232f30', GradientType=0); /* IE6-9 */
|
||||
}
|
||||
&.field-rain {
|
||||
background: #ffffff; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#9b9b9b)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#9b9b9b 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#9b9b9b 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#9b9b9b 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #ffffff 0%,#9b9b9b 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#9b9b9b',GradientType=0 ); /* IE6-9 */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #9b9b9b)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%, #9b9b9b 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #ffffff 0%, #9b9b9b 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#9b9b9b', GradientType=0); /* IE6-9 */
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.playcard-banner {
|
||||
.playcard-banner {
|
||||
position: fixed;
|
||||
border: 1px solid red;
|
||||
background: orangered;
|
||||
@ -246,5 +251,4 @@ $game-height: 800px;
|
||||
left: 50%;
|
||||
top: 30%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,8 @@
|
||||
<h3 class="bbm-modal__title">Discard of {{openDiscard.name}}</h3>
|
||||
</div>
|
||||
<div class="bbm-modal__section">
|
||||
{{#each openDiscard.discard}}
|
||||
<div class="card" data-key="{{_key}}" data-id="{{_id}}">
|
||||
<img src="../assets/cards/{{_data.img}}.png">
|
||||
</div>
|
||||
{{#each openDiscard.discard as |val key|}}
|
||||
{{>card val}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="bbm-modal__bottombar">
|
||||
|
Loading…
Reference in New Issue
Block a user