mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
AI: fixed outcome for lose ability effect
This commit is contained in:
parent
7e08d20f6d
commit
9d0aff8395
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,7 @@ public class LoseAbilityAllEffect extends ContinuousEffectImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoseAbilityAllEffect(CompoundAbility ability, Duration duration, FilterPermanent filter, boolean excludeSource) {
|
public LoseAbilityAllEffect(CompoundAbility ability, Duration duration, FilterPermanent filter, boolean excludeSource) {
|
||||||
super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.LoseAbility);
|
||||||
this.ability = ability;
|
this.ability = ability;
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
this.excludeSource = excludeSource;
|
this.excludeSource = excludeSource;
|
||||||
|
@ -123,6 +123,7 @@ public class LoseAbilityAllEffect extends ContinuousEffectImpl {
|
||||||
} else {
|
} else {
|
||||||
for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
if (!(excludeSource && perm.getId().equals(source.getSourceId()))) {
|
if (!(excludeSource && perm.getId().equals(source.getSourceId()))) {
|
||||||
|
System.out.println(game.getTurn() + ", " + game.getPhase() + ": " + "remove from size " + perm.getAbilities().size());
|
||||||
for (Ability ability : ability) {
|
for (Ability ability : ability) {
|
||||||
perm.getAbilities().removeIf(entry -> entry.getId().equals(ability.getId()));
|
perm.getAbilities().removeIf(entry -> entry.getId().equals(ability.getId()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue