mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 14:02:05 -08:00
* Attacking Planeswalker - Fixed a bug that it was not able to attack a planeswalker that had hexproof.
This commit is contained in:
parent
4e9bf6693a
commit
b5ef4a7f45
2 changed files with 3 additions and 1 deletions
|
|
@ -86,6 +86,7 @@ public class TargetDefender extends TargetImpl<TargetDefender> {
|
|||
MageObject targetSource = game.getObject(sourceId);
|
||||
for (UUID playerId: game.getPlayer(sourceControllerId).getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
// removed canBeTargeted because it's not correct to check it for attacking target
|
||||
if (player != null && player.canBeTargetedBy(targetSource, game) && filter.match(player, game)) {
|
||||
count++;
|
||||
if (count >= this.minNumberOfTargets) {
|
||||
|
|
@ -94,6 +95,7 @@ public class TargetDefender extends TargetImpl<TargetDefender> {
|
|||
}
|
||||
}
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), sourceControllerId, game)) {
|
||||
// removed canBeTargeted because it's not correct to check for attacking target
|
||||
if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, game)) {
|
||||
count++;
|
||||
if (count >= this.minNumberOfTargets) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue