Browse Source

Fixed Plus 2 Karte Bug

main
Nicolas Fritz 2 years ago
parent
commit
811435ddf4
  1. 5
      uno/web/Style.js
  2. 5
      uno/web/cards/special/PlusAmount.js

5
uno/web/Style.js

@ -41,12 +41,12 @@ export default class Style {
$('.uno').css('filter', 'grayscale(80%)');
$('#sayUno-glow').css('opacity', 1);
this.game.currentPlayerInstanz.sayUno();
this.game.currentPlayerInstanz.mustSayUno = false;
})
$('#drawCard').on('click', () => {
if(this.game.currentPlayerInstanz.mustSayUno){
this.game.currentPlayerInstanz.mustSayUno = false;
console.log(this.game.currentPlayerInstanz.mustSayUno)
}
this.game.currentPlayerInstanz.drawCard(1, true, true);
this.refreshDebug();
@ -84,7 +84,6 @@ export default class Style {
refreshCardOnDeck() {
if (this._cardOnDeck !== this.game.cardOnDeck) {
console.log(" ewfw")
this.putCardAnim();
this._cardOnDeck = this.game.cardOnDeck;
} else {
@ -211,8 +210,6 @@ export default class Style {
currentPlayerHand[i].xPos = (width * (((43 + cardAmount / 2 * 5) - percent)) / 100);
currentPlayerHand[i].yPos = top;
console.log(i + ' ' + currentPlayerHand[i].yPos);
let card = $('#card' + i);
let put = false;

5
uno/web/cards/special/PlusAmount.js

@ -18,7 +18,7 @@ export default class PlusAmount extends Card {
//Führt eigene Logik aus (+Amount Karten für den nächsten Spieler)
putSelf() {
if (this.color !== CARD_COLORS[0]){
if (this.color !== CARD_COLORS[0] && this.plus === 4){
super.putSelf();
return;
}
@ -45,6 +45,9 @@ export default class PlusAmount extends Card {
this.game.style.showSelectColor(this);
}
if(this.plus === 2)
super.putSelf();
}
//Gibt den PlusWert der Karte zurück

|||||||
100:0
Loading…
Cancel
Save