mirror of
https://github.com/exane/not-gwent-online
synced 2024-10-31 10:36:53 +00:00
add multi ability support
This commit is contained in:
parent
83c44a18d2
commit
b7439e5ee4
@ -43,6 +43,7 @@ module.exports = {
|
|||||||
if(!field.isOnField(card)){
|
if(!field.isOnField(card)){
|
||||||
field.get().forEach(function(_card){
|
field.get().forEach(function(_card){
|
||||||
if(_card.getID() == id) return;
|
if(_card.getID() == id) return;
|
||||||
|
if(_card.hasAbility("hero")) return;
|
||||||
if(_card.getType() != card.getType()) return;
|
if(_card.getType() != card.getType()) return;
|
||||||
_card.setBoost(id, 0);
|
_card.setBoost(id, 0);
|
||||||
})
|
})
|
||||||
@ -52,6 +53,7 @@ module.exports = {
|
|||||||
|
|
||||||
field.get().forEach(function(_card){
|
field.get().forEach(function(_card){
|
||||||
if(_card.getID() == id) return;
|
if(_card.getID() == id) return;
|
||||||
|
if(_card.hasAbility("hero")) return;
|
||||||
if(_card.getType() != card.getType()) return;
|
if(_card.getType() != card.getType()) return;
|
||||||
_card.setBoost(id, 1);
|
_card.setBoost(id, 1);
|
||||||
})
|
})
|
||||||
|
@ -551,7 +551,7 @@ module.exports = {
|
|||||||
"kayran": {
|
"kayran": {
|
||||||
name: "Kayran",
|
name: "Kayran",
|
||||||
power: 8,
|
power: 8,
|
||||||
ability: ["hero", "morale_boost"],
|
ability: ["hero", "morale_boost", "agile"],
|
||||||
img: "kayran",
|
img: "kayran",
|
||||||
faction: "monster",
|
faction: "monster",
|
||||||
type: 1
|
type: 1
|
||||||
|
@ -64,6 +64,7 @@ var Battle = (function(){
|
|||||||
this.p1.draw(10);
|
this.p1.draw(10);
|
||||||
this.p2.draw(10);
|
this.p2.draw(10);
|
||||||
|
|
||||||
|
|
||||||
/* this.p1.hand.add(Card("impenetrable_fog"));
|
/* this.p1.hand.add(Card("impenetrable_fog"));
|
||||||
this.p2.hand.add(Card("impenetrable_fog"));
|
this.p2.hand.add(Card("impenetrable_fog"));
|
||||||
this.p1.hand.add(Card("biting_frost"));
|
this.p1.hand.add(Card("biting_frost"));
|
||||||
|
@ -397,11 +397,11 @@ Battleside = (function(){
|
|||||||
var self = this;
|
var self = this;
|
||||||
obj.targetSide = this;
|
obj.targetSide = this;
|
||||||
if(obj.disabled) return;
|
if(obj.disabled) return;
|
||||||
var ability = Array.isArray(__flag) || card.getAbility();
|
var ability = Array.isArray(__flag) ? __flag : card.getAbility();
|
||||||
|
|
||||||
if(Array.isArray(ability) && ability.length){
|
if(Array.isArray(ability) && ability.length){
|
||||||
var ret = ability.slice();
|
var ret = ability.slice();
|
||||||
ret = ret.splice(0, 1);
|
ret.splice(0, 1);
|
||||||
this.checkAbilities(card, obj, ret);
|
this.checkAbilities(card, obj, ret);
|
||||||
ability = ability[0];
|
ability = ability[0];
|
||||||
}
|
}
|
||||||
@ -443,6 +443,7 @@ Battleside = (function(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(replaceCard.getName() === card.getName()) return;
|
if(replaceCard.getName() === card.getName()) return;
|
||||||
|
if(replaceCard.hasAbility("hero")) return;
|
||||||
self.off("Decoy:replaceWith");
|
self.off("Decoy:replaceWith");
|
||||||
var field = self.field[replaceCard.getType()];
|
var field = self.field[replaceCard.getType()];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user