* Fixed a bug of mass destruction class (DestroyAllEffect) that the no regeneration option was not applied (concerns ~50 cards).

This commit is contained in:
LevelX2 2013-10-13 17:47:17 +02:00
parent a751028f19
commit 7ded7f0e36

View file

@ -28,9 +28,9 @@
package mage.abilities.effects.common; package mage.abilities.effects.common;
import mage.constants.Outcome;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -62,6 +62,7 @@ public class DestroyAllEffect extends OneShotEffect {
public DestroyAllEffect(final DestroyAllEffect effect) { public DestroyAllEffect(final DestroyAllEffect effect) {
super(effect); super(effect);
this.filter = effect.filter.copy(); this.filter = effect.filter.copy();
this.noRegen = effect.noRegen;
} }
@Override @Override
@ -72,7 +73,7 @@ public class DestroyAllEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
permanent.destroy(source.getId(), game, noRegen); permanent.destroy(source.getSourceId(), game, noRegen);
} }
return true; return true;
} }