mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Properly fix targeting.
The notTarget should only invalidate the canBeTargetedBy return. The Filter should still be relevant.
This commit is contained in:
parent
495e20ae1a
commit
4a9eddb724
1 changed files with 2 additions and 2 deletions
|
@ -135,12 +135,12 @@ public class TargetDefender extends TargetImpl {
|
|||
MageObject targetSource = game.getObject(sourceId);
|
||||
for (UUID playerId: game.getState().getPlayersInRange(sourceControllerId, game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (notTarget || (player != null && player.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(player, game))) {
|
||||
if (player != null && (player.canBeTargetedBy(targetSource, sourceControllerId, game) || notTarget) && filter.match(player, game)) {
|
||||
possibleTargets.add(playerId);
|
||||
}
|
||||
}
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), sourceControllerId, game)) {
|
||||
if (notTarget || (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, game))) {
|
||||
if ((permanent.canBeTargetedBy(targetSource, sourceControllerId, game) || notTarget) && filter.match(permanent, game)) {
|
||||
possibleTargets.add(permanent.getId());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue