* Restric activated abilities - Fixed a bug that restriction effects that prevented permanents from using activated abilities were not applied to activated mana abilities used tp pay mana costs (e.g. Linvala, Keeper of Silence).

This commit is contained in:
LevelX2 2014-08-24 06:56:47 +02:00
parent a6fa4405fd
commit 30ea2188bf

View file

@ -1049,11 +1049,13 @@ public abstract class PlayerImpl implements Player, Serializable {
protected LinkedHashMap<UUID, ManaAbility> getUseableManaAbilities(MageObject object, Zone zone, Game game) {
LinkedHashMap<UUID, ManaAbility> useable = new LinkedHashMap<>();
if (!(object instanceof Permanent) || ((Permanent)object).canUseActivatedAbilities(game)) {
for (ManaAbility ability: object.getAbilities().getManaAbilities(zone)) {
if (ability.canActivate(playerId, game)) {
useable.put(ability.getId(), ability);
}
}
}
return useable;
}