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