Fixed more instances of missing sub abilities

This commit is contained in:
Daniel Bomar 2021-10-22 19:12:19 -05:00
parent 060ea7da83
commit 5a6bfb710e
No known key found for this signature in database
GPG key ID: C86C8658F4023918
3 changed files with 3 additions and 3 deletions

View file

@ -305,9 +305,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
public void addAbility(Ability ability) {
ability.setSourceId(this.getId());
abilities.add(ability);
for (Ability subAbility : ability.getSubAbilities()) {
abilities.add(subAbility);
}
abilities.addAll(ability.getSubAbilities());
// dynamic check: you can't add ability to the PermanentCard, use permanent.addAbility(a, source, game) instead
// reason: triggered abilities are not processing here

View file

@ -119,6 +119,7 @@ public abstract class Designation implements MageObject {
public void addAbility(Ability ability) {
ability.setSourceId(id);
abilites.add(ability);
abilites.addAll(ability.getSubAbilities());
}
@Override

View file

@ -2298,6 +2298,7 @@ public abstract class PlayerImpl implements Player, Serializable {
public void addAbility(Ability ability) {
ability.setSourceId(playerId);
this.abilities.add(ability);
this.abilities.addAll(ability.getSubAbilities());
}
@Override