mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- 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.
This commit is contained in:
@@ -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<Card> ownAttachments = Lists.newArrayList();
|
||||
ArrayList<Card> attachments = Lists.newArrayList();
|
||||
ArrayList<Card> cardsOTB = Lists.newArrayList(CardLists.filter(
|
||||
controller.getCardsIn(ZoneType.Battlefield), new Predicate<Card>() {
|
||||
@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);
|
||||
|
||||
Reference in New Issue
Block a user