* Fixed a recently added bug that prevented attack a player if also a planeswalker of the attacked player is on the battlerfield.

This commit is contained in:
LevelX2 2015-05-12 17:28:17 +02:00
parent 69b381779b
commit 1561ed3fa4

View file

@ -197,10 +197,10 @@ public class TargetDefender extends TargetImpl {
public boolean canTarget(UUID id, Ability source, Game game) {
Player player = game.getPlayer(id);
MageObject targetSource = game.getObject(attackerId);
if (player != null && source != null) {
return notTarget || (player.canBeTargetedBy(targetSource, source.getControllerId(), game) && filter.match(player, game));
if (player != null) {
return notTarget || (player.canBeTargetedBy(targetSource, source == null ? null : source.getControllerId(), game) && filter.match(player, game));
}
Permanent permanent = game.getPermanent(id);
Permanent permanent = game.getPermanent(id); // planeswalker
if (permanent != null) {
//Could be targeting due to combat decision to attack a player or planeswalker.
UUID controllerId = null;