diff --git a/assets/data/abilities.js b/assets/data/abilities.js index c122a50..1f8a717 100644 --- a/assets/data/abilities.js +++ b/assets/data/abilities.js @@ -61,12 +61,14 @@ module.exports = { var cardsHand = this.hand.find("musterType", musterType); cardsDeck.forEach(function(_card){ + if(_card.getID() === card.getID()) return; self.deck.removeFromDeck(_card); self.placeCard(_card, { suppress: "muster" }); }) cardsHand.forEach(function(_card){ + if(_card.getID() === card.getID()) return; self.hand.remove(_card); self.placeCard(_card, { suppress: "muster" @@ -83,9 +85,8 @@ module.exports = { if(lastInsert < 2) return; if(cards[lastInsert - 2].getName() == cards[lastInsert - 1].getName()){ - cards[lastInsert - 2].boost(+cards[lastInsert - 2].getPower()); - cards[lastInsert - 1].boost(+cards[lastInsert - 1].getPower()); - //todo: boost fixen + cards[lastInsert - 2].setBoost(cards[lastInsert - 2].getID(), +cards[lastInsert - 2].getPower()); + cards[lastInsert - 1].setBoost(cards[lastInsert - 1].getID(), +cards[lastInsert - 1].getPower()); } } }, diff --git a/assets/data/cards.js b/assets/data/cards.js index 6c7f778..7b8f04f 100644 --- a/assets/data/cards.js +++ b/assets/data/cards.js @@ -502,7 +502,7 @@ module.exports = { power: 2, ability: "muster", musterType: "nekker", - img: "nekker", + img: "nekker1", faction: "monster", type: 0 }, diff --git a/server/Battle.js b/server/Battle.js index ded116b..2d48979 100644 --- a/server/Battle.js +++ b/server/Battle.js @@ -59,9 +59,13 @@ var Battle = (function(){ r.start = function(){ this.p1.setLeadercard(); this.p2.setLeadercard(); - this.p1.draw(5); - this.p2.draw(5); - + this.p1.draw(10); + this.p2.draw(10); + this.p1.hand.add(Card("blue_stripes_commando")); + this.p2.hand.add(Card("blue_stripes_commando")); + this.p1.hand.add(Card("blue_stripes_commando")); + this.p2.hand.add(Card("blue_stripes_commando")); +/* this.p1.hand.add(Card("kaedweni_siege_expert")); this.p2.hand.add(Card("kaedweni_siege_expert")); this.p1.hand.add(Card("ballista")); @@ -75,15 +79,15 @@ var Battle = (function(){ this.p1.hand.add(Card("ballista")); this.p2.hand.add(Card("ballista")); this.p1.hand.add(Card("decoy")); - this.p2.hand.add(Card("decoy")); + this.p2.hand.add(Card("decoy"));*/ /* this.p1.hand.add(Card("dun_banner_medic")); this.p2.hand.add(Card("dun_banner_medic")); this.p1.hand.add(Card("isengrim_faoiltiarnah")); this.p2.hand.add(Card("isengrim_faoiltiarnah"));*/ - /*this.p1.addToDiscard([Card("kaedweni_siege_expert")]); - this.p2.addToDiscard([Card("kaedweni_siege_expert")]);*/ + this.p1.addToDiscard([Card("kaedweni_siege_expert")]); + this.p2.addToDiscard([Card("kaedweni_siege_expert")]); /* this.p1.hand.add(Card("decoy")); this.p1.hand.add(Card("impenetrable_fog")); diff --git a/server/Battleside.js b/server/Battleside.js index fe50164..fb9a9f5 100644 --- a/server/Battleside.js +++ b/server/Battleside.js @@ -286,8 +286,6 @@ Battleside = (function(){ this.runEvent("EachCardPlace"); this.checkAbilityOnAfterPlace(card, obj); - /* - this.runEvent("AfterPlace", this, [card, obj]);*/ this.update(); @@ -329,10 +327,10 @@ Battleside = (function(){ } if(ability.changeSide){ obj.targetSide = this.foe; - } + }/* if(ability.onReset){ this.on("Reset", ability.onReset, this, [card]) - } + }*/ if(ability.replaceWith){ obj._cancelPlacement = true; this.on("Decoy:replaceWith", function(replaceCard){ diff --git a/server/Hand.js b/server/Hand.js index 613a55d..fd59edf 100644 --- a/server/Hand.js +++ b/server/Hand.js @@ -46,6 +46,10 @@ var Hand = (function(){ id = id instanceof Card ? id.getID() : id; for(var i = 0; i < n; i++) { + if(!this._hand[i]) { + console.trace(this._hand[i]); + continue; + } if(this._hand[i].getID() != id) continue; return this._hand.splice(i, 1); }