diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java
index 035ca1bfb86..8fa1cdebb40 100644
--- a/Mage.Client/src/main/java/mage/client/MageFrame.java
+++ b/Mage.Client/src/main/java/mage/client/MageFrame.java
@@ -1281,7 +1281,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
hideTables();
SessionHandler.disconnect(false);
if (errorCall) {
- UserRequestMessage message = new UserRequestMessage("Connection lost", "The connection to server was lost. Reconnect to " + currentConnection.getHost() + '?');
+ UserRequestMessage message = new UserRequestMessage("Connection lost", "The connection to server was lost. Reconnect?");
message.setButton1("No", null);
message.setButton2("Yes", PlayerAction.CLIENT_RECONNECT);
showUserRequestDialog(message);
diff --git a/Mage.Sets/src/mage/cards/m/MindsAglow.java b/Mage.Sets/src/mage/cards/m/MindsAglow.java
index 4810ea92470..6b32184ec4f 100644
--- a/Mage.Sets/src/mage/cards/m/MindsAglow.java
+++ b/Mage.Sets/src/mage/cards/m/MindsAglow.java
@@ -47,8 +47,7 @@ import mage.players.Player;
public class MindsAglow extends CardImpl {
public MindsAglow(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}");
-
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}");
// Join forces - Starting with you, each player may pay any amount of mana. Each player draws X cards, where X is the total amount of mana paid this way.
this.getSpellAbility().addEffect(new MindsAglowEffect());
@@ -66,44 +65,44 @@ public class MindsAglow extends CardImpl {
}
class MindsAglowEffect extends OneShotEffect {
-
+
public MindsAglowEffect() {
super(Outcome.Detriment);
this.staticText = "Join forces - Starting with you, each player may pay any amount of mana. Each player draws X cards, where X is the total amount of mana paid this way";
}
-
+
public MindsAglowEffect(final MindsAglowEffect effect) {
super(effect);
}
-
+
@Override
public MindsAglowEffect copy() {
return new MindsAglowEffect(this);
}
-
+
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int xSum = 0;
xSum += playerPaysXGenericMana(controller, source, game);
- for(UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
+ for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
if (!Objects.equals(playerId, controller.getId())) {
Player player = game.getPlayer(playerId);
if (player != null) {
xSum += playerPaysXGenericMana(player, source, game);
-
+
}
}
}
if (xSum > 0) {
- for(UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
+ for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.drawCards(xSum, game);
}
}
-
+
}
// prevent undo
controller.resetStoredBookmark(game);
@@ -120,6 +119,9 @@ class MindsAglowEffect extends OneShotEffect {
if (xValue > 0) {
Cost cost = new GenericManaCost(xValue);
payed = cost.pay(source, game, source.getSourceId(), player.getId(), false, null);
+ if (!payed) {
+ game.undo(player.getId());
+ }
} else {
payed = true;
}
diff --git a/Mage/src/main/java/mage/game/stack/Spell.java b/Mage/src/main/java/mage/game/stack/Spell.java
index bfa8c67bf80..288f757d9f9 100644
--- a/Mage/src/main/java/mage/game/stack/Spell.java
+++ b/Mage/src/main/java/mage/game/stack/Spell.java
@@ -69,8 +69,8 @@ import mage.util.SubTypeList;
*/
public class Spell extends StackObjImpl implements Card {
- private final List spellCards = new ArrayList<>();
private final List spellAbilities = new ArrayList<>();
+ private final List spellCards = new ArrayList<>();
private final Card card;
private final ObjectColor color;
@@ -108,7 +108,6 @@ public class Spell extends StackObjImpl implements Card {
this.controllerId = controllerId;
this.fromZone = fromZone;
this.countered = false;
- this.doneActivatingManaAbilities = false;
}
public Spell(final Spell spell) {
@@ -129,13 +128,18 @@ public class Spell extends StackObjImpl implements Card {
} else {
this.card = spell.card.copy();
}
- this.controllerId = spell.controllerId;
+
this.fromZone = spell.fromZone;
- this.copiedSpell = spell.copiedSpell;
- this.faceDown = spell.faceDown;
this.color = spell.color.copy();
this.frameColor = spell.color.copy();
this.frameStyle = spell.frameStyle;
+
+ this.controllerId = spell.controllerId;
+ this.copiedSpell = spell.copiedSpell;
+ this.faceDown = spell.faceDown;
+ this.countered = spell.countered;
+ this.resolving = spell.resolving;
+
this.doneActivatingManaAbilities = spell.doneActivatingManaAbilities;
}