mirror of
https://github.com/exane/not-gwent-online
synced 2024-11-23 19:36:53 +00:00
yoyo
This commit is contained in:
parent
9f5028741e
commit
164d6da97e
@ -256,12 +256,19 @@ Battleside = (function(){
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
r.checkAbilities = function(card, obj){
|
r.checkAbilities = function(card, obj, __flag){
|
||||||
var self = this;
|
var self = this;
|
||||||
obj.targetSide = this;
|
obj.targetSide = this;
|
||||||
|
var ability = Array.isArray(__flag) || card.getAbility();
|
||||||
|
if(Array.isArray(ability) && ability.length){
|
||||||
|
var ret = ability.slice();
|
||||||
|
ret = ret.splice(0, 1);
|
||||||
|
this.checkAbilities(card, obj, ret);
|
||||||
|
ability = ability[0];
|
||||||
|
}
|
||||||
|
|
||||||
if(card.getAbility()){
|
if(ability && !Array.isArray(ability)){/*
|
||||||
var ability = card.getAbility();
|
var ability = card.getAbility();*/
|
||||||
if(ability.changeSide){
|
if(ability.changeSide){
|
||||||
obj.targetSide = this.foe;
|
obj.targetSide = this.foe;
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,13 @@ var Card = (function(){
|
|||||||
return this._data.ability;
|
return this._data.ability;
|
||||||
}
|
}
|
||||||
r.getAbility = function(){
|
r.getAbility = function(){
|
||||||
|
if(Array.isArray(this._data.ability)) {
|
||||||
|
var res = [];
|
||||||
|
this._data.ability.forEach(function(ability) {
|
||||||
|
res.push(AbilityData[ability]);
|
||||||
|
})
|
||||||
|
return res;
|
||||||
|
}
|
||||||
return AbilityData[this._data.ability];
|
return AbilityData[this._data.ability];
|
||||||
}
|
}
|
||||||
r.getImage = function(){
|
r.getImage = function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user