mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fixed more instances of missing sub abilities
This commit is contained in:
parent
060ea7da83
commit
5a6bfb710e
3 changed files with 3 additions and 3 deletions
|
@ -305,9 +305,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
||||||
public void addAbility(Ability ability) {
|
public void addAbility(Ability ability) {
|
||||||
ability.setSourceId(this.getId());
|
ability.setSourceId(this.getId());
|
||||||
abilities.add(ability);
|
abilities.add(ability);
|
||||||
for (Ability subAbility : ability.getSubAbilities()) {
|
abilities.addAll(ability.getSubAbilities());
|
||||||
abilities.add(subAbility);
|
|
||||||
}
|
|
||||||
|
|
||||||
// dynamic check: you can't add ability to the PermanentCard, use permanent.addAbility(a, source, game) instead
|
// dynamic check: you can't add ability to the PermanentCard, use permanent.addAbility(a, source, game) instead
|
||||||
// reason: triggered abilities are not processing here
|
// reason: triggered abilities are not processing here
|
||||||
|
|
|
@ -119,6 +119,7 @@ public abstract class Designation implements MageObject {
|
||||||
public void addAbility(Ability ability) {
|
public void addAbility(Ability ability) {
|
||||||
ability.setSourceId(id);
|
ability.setSourceId(id);
|
||||||
abilites.add(ability);
|
abilites.add(ability);
|
||||||
|
abilites.addAll(ability.getSubAbilities());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2298,6 +2298,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
public void addAbility(Ability ability) {
|
public void addAbility(Ability ability) {
|
||||||
ability.setSourceId(playerId);
|
ability.setSourceId(playerId);
|
||||||
this.abilities.add(ability);
|
this.abilities.add(ability);
|
||||||
|
this.abilities.addAll(ability.getSubAbilities());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue