diff --git a/Mage.Server/src/main/java/mage/server/TableController.java b/Mage.Server/src/main/java/mage/server/TableController.java index 52bb731796..9990738274 100644 --- a/Mage.Server/src/main/java/mage/server/TableController.java +++ b/Mage.Server/src/main/java/mage/server/TableController.java @@ -395,7 +395,7 @@ public class TableController { table.initGame(); GameManager.getInstance().createGameSession(match.getGame(), userPlayerMap, table.getId(), choosingPlayerId); String creator = null; - String opponent = null; + StringBuilder opponent = new StringBuilder(); for (Entry entry: userPlayerMap.entrySet()) { if (!match.getPlayer(entry.getValue()).hasQuit()) { User user = UserManager.getInstance().getUser(entry.getKey()); @@ -404,9 +404,10 @@ public class TableController { if (creator == null) { creator = user.getName(); } else { - if (opponent == null) { - opponent = user.getName(); + if (opponent.length() > 0) { + opponent.append(" - "); } + opponent.append(user.getName()); } } else { @@ -417,10 +418,19 @@ public class TableController { } } } + // Append AI opponents to the log file + for (MatchPlayer mPlayer :match.getPlayers()) { + if (!mPlayer.getPlayer().isHuman()) { + if (opponent.length() > 0) { + opponent.append(" - "); + } + opponent.append(mPlayer.getPlayer().getName()); + } + } ServerMessagesUtil.getInstance().incGamesStarted(); // log about game started - LogServiceImpl.instance.log(LogKeys.KEY_GAME_STARTED, String.valueOf(userPlayerMap.size()), creator, opponent); + LogServiceImpl.instance.log(LogKeys.KEY_GAME_STARTED, String.valueOf(userPlayerMap.size()), creator, opponent.toString()); } catch (Exception ex) { logger.fatal("Error starting game", ex); diff --git a/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java b/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java index ab69e33346..0eeea35bf3 100644 --- a/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java +++ b/Mage.Sets/src/mage/sets/theros/RescueFromTheUnderworld.java @@ -43,6 +43,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.TargetController; import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.game.events.GameEvent; @@ -82,7 +83,7 @@ public class RescueFromTheUnderworld extends CardImpl { this.color.setBlack(true); // As an additional cost to cast Rescue from the Underworld, sacrifice a creature. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), false))); // Choose target creature card in your graveyard. Return that card and the sacrificed card to the battlefield under your control at the beginning of your next upkeep. Exile Rescue from the Underworld. this.getSpellAbility().addEffect(new RescueFromTheUnderworldTextEffect());