1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-10-09 07:39:08 +00:00

tight bond fix

This commit is contained in:
exane
2015-07-01 10:40:57 +02:00
parent 214ee521f0
commit 344f9cc29a
4 changed files with 55 additions and 20 deletions

View File

@@ -88,18 +88,7 @@ module.exports = {
"tight_bond": {
name: "tight_bond",
description: "Tight Bond: Place next to a card with the name same to double the strength of both cards.",
onAfterPlace: function(card){
var field = this.field[card.getType()];
var cards = field.get();
var lastInsert = cards.length;
if(lastInsert < 2) return;
if(cards[lastInsert - 2].getName() == cards[lastInsert - 1].getName()){
cards[lastInsert - 2].setBoost(cards[lastInsert - 2].getID(), +cards[lastInsert - 2].getPower());
cards[lastInsert - 1].setBoost(cards[lastInsert - 1].getID(), +cards[lastInsert - 1].getPower());
}
}
tightBond: true
},
"spy": {
name: "spy",