mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* 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:
parent
69b381779b
commit
1561ed3fa4
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue