[ALA] Finish fixing Death Baron and add test

This commit is contained in:
Alex W. Jackson 2022-04-08 01:42:41 -04:00
parent ff5efb525a
commit a48dedcd76
5 changed files with 77 additions and 9 deletions

View file

@ -117,8 +117,9 @@ public class BoostControlledEffect extends ContinuousEffectImpl {
}
}
} else {
for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
if (!(excludeSource && perm.getId().equals(source.getSourceId()))) {
for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game)) {
if (perm.isControlledBy(source.getControllerId())
&& (!(excludeSource && perm.getId().equals(source.getSourceId())))) {
perm.addPower(power.calculate(game, source, this));
perm.addToughness(toughness.calculate(game, source, this));
}

View file

@ -98,8 +98,9 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl {
}
}
} else {
for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
if (!(excludeSource && perm.getId().equals(source.getSourceId()))) {
for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game)) {
if (perm.isControlledBy(source.getControllerId())
&& !(excludeSource && perm.getId().equals(source.getSourceId()))) {
for (Ability abilityToAdd : ability) {
perm.addAbility(abilityToAdd, source.getSourceId(), game);
}
@ -149,5 +150,4 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl {
setText();
return this;
}
}