* Fixed that as thought effects could wrongly only apply to the ability controller.

This commit is contained in:
LevelX2 2014-09-17 15:57:06 +02:00
parent b3c0cc10b0
commit f9f49e9c00
11 changed files with 77 additions and 95 deletions

View file

@ -72,7 +72,7 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter
*
* @param cost alternate cost to pay
* @param condition only if the condition is true it's possible to use the alternate costs
* @param rule if set used as rule text
* @param rule if != null used as rule text
* @param filter filters the cards this alternate cost can be applied to
* @param onlyMana if true only the mana costs are replaced by this costs, other costs stay untouched
*/

View file

@ -435,7 +435,7 @@ 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())) {
//if (controllerId.equals(ability.getControllerId())) { must be checked in the applies method
if (affectedAbility == null) {
if (effect.applies(objectId, ability, controllerId, game)) {
return true;
@ -445,7 +445,7 @@ public class ContinuousEffects implements Serializable {
return true;
}
}
}
//}
}
}
return false;

View file

@ -490,7 +490,7 @@ public class CardUtil {
uniqueString.append(text);
}
uniqueString.append(cardId);
Card card = game.getCard(cardId);
Card card = game.getCard(cardId); // if called for a token, the id is enough
if (card != null) {
uniqueString.append(card.getZoneChangeCounter());
}