mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
fix notTarget handling in TargetPermanentAmount
This commit is contained in:
parent
093a798912
commit
e6e241cfcb
1 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ public class TargetPermanentAmount extends TargetAmount {
|
|||
return filter.match(permanent, game);
|
||||
}
|
||||
MageObject targetSource = source.getSourceObject(game);
|
||||
return permanent.canBeTargetedBy(targetSource, source.getControllerId(), game)
|
||||
return (notTarget || permanent.canBeTargetedBy(targetSource, source.getControllerId(), game))
|
||||
&& filter.match(permanent, source.getControllerId(), source, game);
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ public class TargetPermanentAmount extends TargetAmount {
|
|||
.getActivePermanents(filter, sourceControllerId, source, game)
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(permanent -> permanent.canBeTargetedBy(targetSource, sourceControllerId, game))
|
||||
.filter(permanent -> notTarget || permanent.canBeTargetedBy(targetSource, sourceControllerId, game))
|
||||
.map(Permanent::getId)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue