From 07d0e590a97c418e02532c90af07d879e60c7dc1 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 21 Aug 2021 11:19:34 +0400 Subject: [PATCH] Other: fixed rare NPE error on wrong connection, fixed formal param in Aminatou, the Fateshifter; --- Mage.Common/src/main/java/mage/remote/SessionImpl.java | 2 +- Mage.Sets/src/mage/cards/a/AminatouTheFateshifter.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Mage.Common/src/main/java/mage/remote/SessionImpl.java b/Mage.Common/src/main/java/mage/remote/SessionImpl.java index a2b3b45c7f..4b730261dd 100644 --- a/Mage.Common/src/main/java/mage/remote/SessionImpl.java +++ b/Mage.Common/src/main/java/mage/remote/SessionImpl.java @@ -518,7 +518,7 @@ public class SessionImpl implements Session { } try { - if (callbackClient.isConnected()) { + if (callbackClient != null && callbackClient.isConnected()) { callbackClient.removeListener(callbackHandler); callbackClient.disconnect(); } diff --git a/Mage.Sets/src/mage/cards/a/AminatouTheFateshifter.java b/Mage.Sets/src/mage/cards/a/AminatouTheFateshifter.java index 54c6abcf70..9125e8fc0f 100644 --- a/Mage.Sets/src/mage/cards/a/AminatouTheFateshifter.java +++ b/Mage.Sets/src/mage/cards/a/AminatouTheFateshifter.java @@ -30,7 +30,6 @@ import mage.target.targetpointer.FixedTarget; import java.util.UUID; /** - * * @author Colin Redman */ public class AminatouTheFateshifter extends CardImpl { @@ -53,9 +52,9 @@ public class AminatouTheFateshifter extends CardImpl { Ability ability = new LoyaltyAbility(new AminatouPlusEffect(), +1); this.addAbility(ability); - // -1: Exile another target permanent you own, then return it to the battlefield under your control. + // −1: Exile another target permanent you own, then return it to the battlefield under your control. ability = new LoyaltyAbility(new ExileTargetForSourceEffect(), -1); - ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true)); + ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(false)); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability);