mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
[ALA] Finish fixing Death Baron and add test
This commit is contained in:
parent
ff5efb525a
commit
a48dedcd76
5 changed files with 77 additions and 9 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,8 +237,8 @@ public class Battlefield implements Serializable {
|
|||
|
||||
/**
|
||||
* Returns all {@link Permanent} on the battlefield that match the supplied
|
||||
* filter. This method ignores the range of influence. It ignores controller
|
||||
* predicates
|
||||
* filter. This method ignores the range of influence and ignores
|
||||
* ObjectSourcePlayer predicates in the filter (e.g. controller predicates)
|
||||
*
|
||||
* @param filter
|
||||
* @param game
|
||||
|
|
@ -254,7 +254,8 @@ public class Battlefield implements Serializable {
|
|||
|
||||
/**
|
||||
* Returns all {@link Permanent} that match the filter and are controlled by
|
||||
* controllerId. This method ignores the range of influence.
|
||||
* controllerId. This method ignores the range of influence and ignores
|
||||
* ObjectSourcePlayer predicates in the filter
|
||||
*
|
||||
* @param filter
|
||||
* @param controllerId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue