Some minor changes to framework.

This commit is contained in:
LevelX2 2014-12-06 18:29:17 +01:00
parent 5dc314c68a
commit 2fae97be63
6 changed files with 51 additions and 193 deletions

View file

@ -430,17 +430,15 @@ public class ContinuousEffects implements Serializable {
for (AsThoughEffect effect: asThoughEffectsList) {
HashSet<Ability> abilities = asThoughEffectsMap.get(type).getAbility(effect.getId());
for (Ability ability : abilities) {
//if (controllerId.equals(ability.getControllerId())) { must be checked in the applies method
if (affectedAbility == null) {
if (effect.applies(objectId, ability, controllerId, game)) {
return true;
}
} else {
if (effect.applies(objectId, affectedAbility, ability, game)) {
return true;
}
if (affectedAbility == null) {
if (effect.applies(objectId, ability, controllerId, game)) {
return true;
}
} else {
if (effect.applies(objectId, affectedAbility, ability, game)) {
return true;
}
//}
}
}
}
return false;