mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
prevent multiple singleton abilities on a permanent
This commit is contained in:
parent
6fb8ecbf81
commit
4fc38b4548
1 changed files with 5 additions and 3 deletions
|
@ -167,9 +167,11 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
|
|||
@Override
|
||||
public void addAbility(Ability ability) {
|
||||
Ability copy = ability.copy();
|
||||
copy.setControllerId(controllerId);
|
||||
copy.setSourceId(objectId);
|
||||
abilities.add(copy);
|
||||
if (!abilities.containsKey(copy.getId())) {
|
||||
copy.setControllerId(controllerId);
|
||||
copy.setSourceId(objectId);
|
||||
abilities.add(copy);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue