mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Rescue From the Underworld - small fix to the tooltip text.
This commit is contained in:
parent
beffdd5a8a
commit
06d5e2a4c6
2 changed files with 16 additions and 5 deletions
|
@ -395,7 +395,7 @@ public class TableController {
|
||||||
table.initGame();
|
table.initGame();
|
||||||
GameManager.getInstance().createGameSession(match.getGame(), userPlayerMap, table.getId(), choosingPlayerId);
|
GameManager.getInstance().createGameSession(match.getGame(), userPlayerMap, table.getId(), choosingPlayerId);
|
||||||
String creator = null;
|
String creator = null;
|
||||||
String opponent = null;
|
StringBuilder opponent = new StringBuilder();
|
||||||
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) {
|
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) {
|
||||||
if (!match.getPlayer(entry.getValue()).hasQuit()) {
|
if (!match.getPlayer(entry.getValue()).hasQuit()) {
|
||||||
User user = UserManager.getInstance().getUser(entry.getKey());
|
User user = UserManager.getInstance().getUser(entry.getKey());
|
||||||
|
@ -404,9 +404,10 @@ public class TableController {
|
||||||
if (creator == null) {
|
if (creator == null) {
|
||||||
creator = user.getName();
|
creator = user.getName();
|
||||||
} else {
|
} else {
|
||||||
if (opponent == null) {
|
if (opponent.length() > 0) {
|
||||||
opponent = user.getName();
|
opponent.append(" - ");
|
||||||
}
|
}
|
||||||
|
opponent.append(user.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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();
|
ServerMessagesUtil.getInstance().incGamesStarted();
|
||||||
|
|
||||||
// log about game started
|
// 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) {
|
catch (Exception ex) {
|
||||||
logger.fatal("Error starting game", ex);
|
logger.fatal("Error starting game", ex);
|
||||||
|
|
|
@ -43,6 +43,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
@ -82,7 +83,7 @@ public class RescueFromTheUnderworld extends CardImpl<RescueFromTheUnderworld> {
|
||||||
this.color.setBlack(true);
|
this.color.setBlack(true);
|
||||||
|
|
||||||
// As an additional cost to cast Rescue from the Underworld, sacrifice a creature.
|
// 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.
|
// 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());
|
this.getSpellAbility().addEffect(new RescueFromTheUnderworldTextEffect());
|
||||||
|
|
Loading…
Reference in a new issue