mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Fixed a bug with some of multiple targets getting illegal after casting Vines of Vastwood to protect a target.
This commit is contained in:
parent
641623a4b5
commit
4b5191af26
3 changed files with 11 additions and 11 deletions
|
@ -29,14 +29,13 @@
|
|||
package mage.sets.tenth;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
|
@ -48,7 +48,7 @@ public class CantBeTargetedTargetEffect extends ContinuousRuleModifiyingEffectIm
|
|||
private final FilterStackObject filterSource;
|
||||
|
||||
public CantBeTargetedTargetEffect(FilterStackObject filterSource, Duration duration) {
|
||||
super(duration, Outcome.Benefit);
|
||||
super(duration, Outcome.Benefit, false, false);
|
||||
this.filterSource = filterSource;
|
||||
}
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ public abstract class TargetImpl implements Target {
|
|||
public boolean isLegal(Ability source, Game game) {
|
||||
//20101001 - 608.2b
|
||||
Set <UUID> illegalTargets = new HashSet<>();
|
||||
int replacedTargets = 0;
|
||||
// int replacedTargets = 0;
|
||||
for (UUID targetId: targets.keySet()) {
|
||||
Card card = game.getCard(targetId);
|
||||
if (card != null) {
|
||||
|
@ -338,7 +338,8 @@ public abstract class TargetImpl implements Target {
|
|||
}
|
||||
}
|
||||
if (!notTarget && game.replaceEvent(GameEvent.getEvent(EventType.TARGET, targetId, source.getSourceId(), source.getControllerId()))) {
|
||||
replacedTargets++;
|
||||
// replacedTargets++;
|
||||
illegalTargets.add(targetId);
|
||||
continue;
|
||||
}
|
||||
if (!canTarget(targetId, source, game)) {
|
||||
|
@ -349,9 +350,9 @@ public abstract class TargetImpl implements Target {
|
|||
for (UUID targetId: illegalTargets) {
|
||||
targets.remove(targetId);
|
||||
}
|
||||
if (replacedTargets > 0 && replacedTargets == targets.size()) {
|
||||
return false;
|
||||
}
|
||||
// if (replacedTargets > 0 && replacedTargets == targets.size()) {
|
||||
// return false;
|
||||
// }
|
||||
if (minNumberOfTargets == 0 && targets.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue