From 45d7068bd9a3d1ce64713fc737f87153da449eb7 Mon Sep 17 00:00:00 2001 From: Michael Kamensky Date: Tue, 2 Nov 2021 07:21:19 +0300 Subject: [PATCH] - FlipOntoBattlefieldEffect: checking for the controller of the aura is not reliable, since auras are visualized differently in different UIs. So allow all attachments to be hit. --- .../ability/effects/FlipOntoBattlefieldEffect.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/FlipOntoBattlefieldEffect.java b/forge-game/src/main/java/forge/game/ability/effects/FlipOntoBattlefieldEffect.java index df956389c3c..cdad7138bb5 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/FlipOntoBattlefieldEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/FlipOntoBattlefieldEffect.java @@ -101,13 +101,13 @@ public class FlipOntoBattlefieldEffect extends SpellAbilityEffect { // Currently gets the nearest (in zone order) card to the left or to the right of the designated one by type, // as well as cards attachments by the same controller that are visually located next to the requested card. Player controller = c.getController(); - ArrayList ownAttachments = Lists.newArrayList(); + ArrayList attachments = Lists.newArrayList(); ArrayList cardsOTB = Lists.newArrayList(CardLists.filter( controller.getCardsIn(ZoneType.Battlefield), new Predicate() { @Override public boolean apply(Card card) { - if (card.isAttachedToEntity(c) && card.getController() == controller) { - ownAttachments.add(card); + if (card.isAttachedToEntity(c)) { + attachments.add(card); return true; } else if (c.isCreature()) { return card.isCreature(); @@ -125,8 +125,8 @@ public class FlipOntoBattlefieldEffect extends SpellAbilityEffect { // Chance to hit an attachment float hitAttachment = 0.50f; - if (!ownAttachments.isEmpty() && direction < 0 && MyRandom.getRandom().nextFloat() <= hitAttachment) { - return Aggregates.random(ownAttachments); + if (!attachments.isEmpty() && direction < 0 && MyRandom.getRandom().nextFloat() <= hitAttachment) { + return Aggregates.random(attachments); } int loc = cardsOTB.indexOf(c);