mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* 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:
parent
a6fa4405fd
commit
30ea2188bf
1 changed files with 5 additions and 3 deletions
|
@ -1049,9 +1049,11 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
protected LinkedHashMap<UUID, ManaAbility> getUseableManaAbilities(MageObject object, Zone zone, Game game) {
|
||||
LinkedHashMap<UUID, ManaAbility> useable = new LinkedHashMap<>();
|
||||
for (ManaAbility ability: object.getAbilities().getManaAbilities(zone)) {
|
||||
if (ability.canActivate(playerId, game)) {
|
||||
useable.put(ability.getId(), ability);
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue