mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
Fixed multitarget handling of Decimate and Boom//Bust.
This commit is contained in:
parent
0dcd11cf4b
commit
b4d7009af8
3 changed files with 13 additions and 14 deletions
|
|
@ -46,6 +46,7 @@ import mage.util.CardUtil;
|
|||
public class DestroyTargetEffect extends OneShotEffect {
|
||||
|
||||
protected boolean noRegen;
|
||||
protected boolean multitargetHandling;
|
||||
|
||||
public DestroyTargetEffect() {
|
||||
this(false);
|
||||
|
|
@ -57,13 +58,19 @@ public class DestroyTargetEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
public DestroyTargetEffect(boolean noRegen) {
|
||||
this(noRegen, false);
|
||||
}
|
||||
|
||||
public DestroyTargetEffect(boolean noRegen, boolean multitargetHandling) {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.noRegen = noRegen;
|
||||
this.multitargetHandling = multitargetHandling;
|
||||
}
|
||||
|
||||
public DestroyTargetEffect(final DestroyTargetEffect effect) {
|
||||
super(effect);
|
||||
this.noRegen = effect.noRegen;
|
||||
this.multitargetHandling = effect.multitargetHandling;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -74,7 +81,7 @@ public class DestroyTargetEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int affectedTargets = 0;
|
||||
if (source.getTargets().size() > 1 && targetPointer instanceof FirstTargetPointer) { // Decimate
|
||||
if (multitargetHandling && source.getTargets().size() > 1 && targetPointer instanceof FirstTargetPointer) { // Decimate
|
||||
for (Target target : source.getTargets()) {
|
||||
for (UUID permanentId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue