mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix ignoring CantAttach
This commit is contained in:
@@ -2524,17 +2524,12 @@ public class GameAction {
|
|||||||
|
|
||||||
Player p = source.getController();
|
Player p = source.getController();
|
||||||
if (tgt.canTgtPlayer()) {
|
if (tgt.canTgtPlayer()) {
|
||||||
final FCollection<Player> players = new FCollection<>();
|
final FCollection<Player> players = game.getPlayers().filter(PlayerPredicates.canBeAttached(source, aura));
|
||||||
|
|
||||||
for (Player player : game.getPlayers()) {
|
|
||||||
if (player.isValid(tgt.getValidTgts(), aura.getActivatingPlayer(), source, aura)) {
|
|
||||||
players.add(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final Player pa = p.getController().chooseSingleEntityForEffect(players, aura,
|
final Player pa = p.getController().chooseSingleEntityForEffect(players, aura,
|
||||||
Localizer.getInstance().getMessage("lblSelectAPlayerAttachSourceTo", CardTranslation.getTranslatedName(source.getName())), null);
|
Localizer.getInstance().getMessage("lblSelectAPlayerAttachSourceTo", CardTranslation.getTranslatedName(source.getName())), null);
|
||||||
if (pa != null) {
|
if (pa != null) {
|
||||||
source.attachToEntity(pa, null);
|
source.attachToEntity(pa, null, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2553,7 +2548,7 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
list.addAll(game.getCardsIn(zones));
|
list.addAll(game.getCardsIn(zones));
|
||||||
|
|
||||||
list = CardLists.getValidCards(list, tgt.getValidTgts(), aura.getActivatingPlayer(), source, aura);
|
list = CardLists.filter(list, CardPredicates.canBeAttached(source, aura));
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user