mirror of
https://github.com/exane/not-gwent-online
synced 2024-12-23 21:03:14 +00:00
yoyo
This commit is contained in:
parent
9f5028741e
commit
164d6da97e
@ -256,12 +256,19 @@ Battleside = (function(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
r.checkAbilities = function(card, obj){
|
||||
r.checkAbilities = function(card, obj, __flag){
|
||||
var self = 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()){
|
||||
var ability = card.getAbility();
|
||||
if(ability && !Array.isArray(ability)){/*
|
||||
var ability = card.getAbility();*/
|
||||
if(ability.changeSide){
|
||||
obj.targetSide = this.foe;
|
||||
}
|
||||
|
@ -76,6 +76,13 @@ var Card = (function(){
|
||||
return this._data.ability;
|
||||
}
|
||||
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];
|
||||
}
|
||||
r.getImage = function(){
|
||||
|
Loading…
Reference in New Issue
Block a user