mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08: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…
Add table
Add a link
Reference in a new issue