updated targeting for cards that damage

This commit is contained in:
Evan Kranzler 2018-04-19 11:45:20 -04:00
parent 7212b02e53
commit 5fe607e852
548 changed files with 1127 additions and 1133 deletions

View file

@ -15,8 +15,7 @@ import mage.players.Player;
import mage.target.TargetImpl;
/**
* @author JRHerlehy
* Created on 4/8/18.
* @author JRHerlehy Created on 4/8/18.
*/
public class TargetAnyTarget extends TargetImpl {
@ -165,14 +164,14 @@ public class TargetAnyTarget extends TargetImpl {
for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) {
Player player = game.getPlayer(playerId);
if (player != null
&& player.canBeTargetedBy(targetSource, sourceControllerId, game)
&& filter.getPlayerFilter().match(player, sourceId, sourceControllerId, game)) {
&& player.canBeTargetedBy(targetSource, sourceControllerId, game)
&& filter.getPlayerFilter().match(player, sourceId, sourceControllerId, game)) {
possibleTargets.add(playerId);
}
}
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) {
if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game)
&& filter.getCreatureFilter().match(permanent, sourceId, sourceControllerId, game)) {
&& filter.getCreatureFilter().match(permanent, sourceId, sourceControllerId, game)) {
possibleTargets.add(permanent.getId());
}
}