mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Added some font color to object and player names output to game logging and feedback area.
This commit is contained in:
parent
c3ea08b59c
commit
9c97953b6b
384 changed files with 745 additions and 636 deletions
|
@ -7,7 +7,6 @@ import com.mortennobel.imagescaling.ResampleOp;
|
|||
import java.awt.Graphics2D;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.EOFException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
@ -105,8 +104,15 @@ public class ImageCache {
|
|||
thumbnailFile = new TFile(thumbnailPath);
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
|
||||
if (thumbnailFile != null && thumbnailFile.exists()) {
|
||||
boolean exists =false;
|
||||
if (thumbnailFile != null) {
|
||||
try {
|
||||
exists = thumbnailFile.exists();
|
||||
} catch(Exception ex) {
|
||||
exists = false;
|
||||
}
|
||||
}
|
||||
if (exists) {
|
||||
log.debug("loading thumbnail for " + key + ", path="+thumbnailPath);
|
||||
return loadImage(thumbnailFile);
|
||||
} else {
|
||||
|
|
|
@ -114,7 +114,7 @@ public class CardsView extends LinkedHashMap<UUID, CardView> {
|
|||
} else {
|
||||
sourceCardView = new CardView(sourceObject);
|
||||
}
|
||||
abilityView = new AbilityView(ability, sourceObject.getLogName(), sourceCardView);
|
||||
abilityView = new AbilityView(ability, sourceObject.getName(), sourceCardView);
|
||||
}
|
||||
if (ability.getTargets().size() > 0) {
|
||||
abilityView.setTargets(ability.getTargets());
|
||||
|
@ -133,7 +133,7 @@ public class CardsView extends LinkedHashMap<UUID, CardView> {
|
|||
for (UUID uuid : abilityTargets) {
|
||||
MageObject mageObject = game.getObject(uuid);
|
||||
if (mageObject != null) {
|
||||
names.add(mageObject.getLogName());
|
||||
names.add(mageObject.getName());
|
||||
}
|
||||
}
|
||||
if (!names.isEmpty()) {
|
||||
|
@ -150,7 +150,7 @@ public class CardsView extends LinkedHashMap<UUID, CardView> {
|
|||
for (Ability ability: abilities) {
|
||||
Card sourceCard = state.getPermanent(ability.getSourceId());
|
||||
if (sourceCard != null) {
|
||||
this.put(ability.getId(), new AbilityView(ability, sourceCard.getLogName(), new CardView(sourceCard)));
|
||||
this.put(ability.getId(), new AbilityView(ability, sourceCard.getName(), new CardView(sourceCard)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.*;
|
|||
public class RateCard {
|
||||
|
||||
private static Map<String, Integer> ratings;
|
||||
private static Map<String, Integer> rated = new HashMap<String, Integer>();
|
||||
private static final Map<String, Integer> rated = new HashMap<>();
|
||||
private static Integer min = Integer.MAX_VALUE, max = 0;
|
||||
|
||||
/**
|
||||
|
@ -47,16 +47,17 @@ public class RateCard {
|
|||
* If allowedColors is null then the rating is retrieved from the cache
|
||||
*
|
||||
* @param card
|
||||
* @param allowedColors
|
||||
* @return
|
||||
*/
|
||||
public static int rateCard(Card card, List<ColoredManaSymbol> allowedColors) {
|
||||
if (allowedColors == null && rated.containsKey(card.getName())) {
|
||||
return rated.get(card.getName());
|
||||
}
|
||||
int type = 0;
|
||||
int type;
|
||||
if (card.getCardType().contains(CardType.PLANESWALKER)) {
|
||||
type = 15;
|
||||
} if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
} else if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
type = 10;
|
||||
} else if (card.getSubtype().contains("Equipment")) {
|
||||
type = 8;
|
||||
|
|
|
@ -336,8 +336,8 @@ public class GameController implements GameCallback {
|
|||
joinType = "rejoined";
|
||||
}
|
||||
user.addGame(playerId, gameSession);
|
||||
logger.debug("Player " + player.getName()+ " " + playerId + " has " + joinType + " gameId: " + game.getId());
|
||||
ChatManager.getInstance().broadcast(chatId, "", game.getPlayer(playerId).getName() + " has " + joinType + " the game", MessageColor.ORANGE, true, MessageType.GAME);
|
||||
logger.debug("Player " + player.getLogName()+ " " + playerId + " has " + joinType + " gameId: " + game.getId());
|
||||
ChatManager.getInstance().broadcast(chatId, "", game.getPlayer(playerId).getLogName() + " has " + joinType + " the game", MessageColor.ORANGE, true, MessageType.GAME);
|
||||
checkStart();
|
||||
}
|
||||
|
||||
|
@ -361,19 +361,19 @@ public class GameController implements GameCallback {
|
|||
// join the game because player has not joined are was removed because of disconnect
|
||||
user.removeConstructing(player.getId());
|
||||
GameManager.getInstance().joinGame(game.getId(), user.getId());
|
||||
logger.debug("Player " + user.getName() + " (disconnected) has joined gameId: " +game.getId());
|
||||
logger.debug("Player " + player.getLogName() + " (disconnected) has joined gameId: " +game.getId());
|
||||
}
|
||||
ChatManager.getInstance().broadcast(chatId, player.getName(), user.getPingInfo() + " is pending to join the game", MessageColor.BLUE, true, ChatMessage.MessageType.STATUS);
|
||||
if (user.getSecondsDisconnected() > 240) {
|
||||
// Cancel player join possibility lately after 4 minutes
|
||||
logger.debug("Player " + user.getName() + " - canceled game (after 240 seconds) gameId: " +game.getId());
|
||||
logger.debug("Player " + player.getLogName() + " - canceled game (after 240 seconds) gameId: " +game.getId());
|
||||
player.leave();
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
if (!player.hasLeft()) {
|
||||
logger.debug("Player " + player.getName() + " canceled game (no user) gameId: " + game.getId());
|
||||
logger.debug("Player " + player.getLogName() + " canceled game (no user) gameId: " + game.getId());
|
||||
player.leave();
|
||||
}
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ public class GameController implements GameCallback {
|
|||
public void idleTimeout(UUID playerId) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
String sb = player.getName() +
|
||||
String sb = player.getLogName() +
|
||||
" has timed out (player had priority and was not active for " +
|
||||
ConfigSettings.getInstance().getMaxSecondsIdle() + " seconds ) - Auto concede.";
|
||||
ChatManager.getInstance().broadcast(chatId, "", sb, MessageColor.BLACK, true, MessageType.STATUS);
|
||||
|
@ -800,7 +800,7 @@ public class GameController implements GameCallback {
|
|||
if (game.getStep() != null) {
|
||||
message.append(game.getStep().getType().toString()).append(" - ");
|
||||
}
|
||||
message.append("Waiting for ").append(game.getPlayer(playerId).getName());
|
||||
message.append("Waiting for ").append(game.getPlayer(playerId).getLogName());
|
||||
for (final Entry<UUID, GameSessionPlayer> entry: gameSessions.entrySet()) {
|
||||
if (!entry.getKey().equals(playerId)) {
|
||||
entry.getValue().inform(message.toString());
|
||||
|
|
|
@ -143,7 +143,7 @@ public class TournamentController {
|
|||
if (!player.getPlayer().isHuman()) {
|
||||
player.setJoined();
|
||||
logger.debug("player " + player.getPlayer().getId() + " has joined tournament " + tournament.getId());
|
||||
ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS);
|
||||
ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getLogName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS);
|
||||
}
|
||||
}
|
||||
checkStart();
|
||||
|
@ -173,7 +173,7 @@ public class TournamentController {
|
|||
TournamentPlayer player = tournament.getPlayer(playerId);
|
||||
player.setJoined();
|
||||
logger.debug("player " +player.getPlayer().getName() + " - client has joined tournament " + tournament.getId());
|
||||
ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS);
|
||||
ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getLogName() + " has joined the tournament", MessageColor.BLACK, true, MessageType.STATUS);
|
||||
checkStart();
|
||||
} else {
|
||||
logger.error("User not found userId: " + userId + " tournamentId: " + tournament.getId());
|
||||
|
@ -296,7 +296,7 @@ public class TournamentController {
|
|||
TournamentPlayer player = tournament.getPlayer(playerId);
|
||||
if (player != null && !player.hasQuit()) {
|
||||
tournamentSessions.get(playerId).submitDeck(deck);
|
||||
ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getName() + " has submitted his tournament deck", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerSubmittedDeck);
|
||||
ChatManager.getInstance().broadcast(chatId, "", player.getPlayer().getLogName() + " has submitted his tournament deck", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerSubmittedDeck);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ public class TournamentController {
|
|||
tournamentPlayer.setQuit(info);
|
||||
tournament.quit(playerId);
|
||||
tournamentSession.quit();
|
||||
ChatManager.getInstance().broadcast(chatId, "", tournamentPlayer.getPlayer().getName() + " has quit the tournament", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerQuitTournament);
|
||||
ChatManager.getInstance().broadcast(chatId, "", tournamentPlayer.getPlayer().getLogName() + " has quit the tournament", MessageColor.BLACK, true, MessageType.STATUS, SoundToPlay.PlayerQuitTournament);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ public class TournamentController {
|
|||
user.removeTable(leavingPlayer.getPlayer().getId());
|
||||
user.removeTournament(leavingPlayer.getPlayer().getId());
|
||||
}
|
||||
ChatManager.getInstance().broadcast(chatId, "", leavingPlayer.getPlayer().getName() + " was replaced by draftbot", MessageColor.BLACK, true, MessageType.STATUS);
|
||||
ChatManager.getInstance().broadcast(chatId, "", leavingPlayer.getPlayer().getLogName() + " was replaced by draftbot", MessageColor.BLACK, true, MessageType.STATUS);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class ClovenCastingEffect extends OneShotEffect {
|
|||
if (activateMessage.startsWith(" casts ")) {
|
||||
activateMessage = activateMessage.substring(6);
|
||||
}
|
||||
game.informPlayers(player.getName() + " copies " + activateMessage);
|
||||
game.informPlayers(player.getLogName() + " copies " + activateMessage);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -148,7 +148,7 @@ class EnigmaSphinxEffect extends OneShotEffect {
|
|||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
if (owner != null && card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true)) {
|
||||
// Move Sphinx to third position
|
||||
game.informPlayers(card.getName() + " is put into " + owner.getName() +"'s library third from the top");
|
||||
game.informPlayers(card.getLogName() + " is put into " + owner.getLogName() +"'s library third from the top");
|
||||
Library lib = owner.getLibrary();
|
||||
if (lib != null) {
|
||||
Card card1 = lib.removeFromTop(game);
|
||||
|
|
|
@ -108,7 +108,7 @@ class EnlistmentOfficerEffect extends OneShotEffect {
|
|||
}
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 4));
|
||||
controller.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
for (Card card: cards.getCards(game)) {
|
||||
if (filter.match(card, game)) {
|
||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
|
|
|
@ -108,7 +108,7 @@ class GoblinRingleaderEffect extends OneShotEffect {
|
|||
}
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 4));
|
||||
controller.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
for (Card card: cards.getCards(game)) {
|
||||
if (filter.match(card, game)) {
|
||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
|
|
|
@ -106,7 +106,7 @@ class KavuHowlerEffect extends OneShotEffect {
|
|||
}
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 4));
|
||||
controller.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
for (Card card: cards.getCards(game)) {
|
||||
if (filter.match(card, game)) {
|
||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
|
|
|
@ -103,7 +103,7 @@ class SpiritmongerChangeColorEffect extends OneShotEffect {
|
|||
if (player != null && wildMongrel != null) {
|
||||
ChoiceColor colorChoice = new ChoiceColor();
|
||||
if (player.choose(Outcome.Neutral, colorChoice, game)) {
|
||||
game.informPlayers(wildMongrel.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.informPlayers(wildMongrel.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice());
|
||||
ContinuousEffect effect = new BecomesColorTargetEffect(colorChoice.getColor(), Duration.EndOfTurn, "is " + colorChoice.getChoice());
|
||||
effect.setTargetPointer(new FixedTarget(source.getSourceId()));
|
||||
game.addEffect(effect, source);
|
||||
|
|
|
@ -108,7 +108,7 @@ class SylvanMessengerEffect extends OneShotEffect {
|
|||
}
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 4));
|
||||
controller.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
for (Card card: cards.getCards(game)) {
|
||||
if (filter.match(card, game)) {
|
||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
|
|
|
@ -120,7 +120,7 @@ class CavernOfSoulsEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
|
||||
permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()), game);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ class CavernOfSoulsManaBuilder extends ConditionalManaBuilder {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
game.informPlayers(controller.getName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() +
|
||||
game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() +
|
||||
" (can only be spend to cast for creatures of type " + creatureType + " and that spell can't be countered)");
|
||||
}
|
||||
return super.setMana(mana, source, game);
|
||||
|
|
|
@ -114,7 +114,7 @@ class DescendantsPathEffect extends OneShotEffect {
|
|||
if (player.chooseUse(Outcome.Benefit, "Cast the card?", game)) {
|
||||
player.cast(card.getSpellAbility(), game, true);
|
||||
} else {
|
||||
game.informPlayers("DescendantsPath: " + player.getName() + " canceled casting the card.");
|
||||
game.informPlayers("DescendantsPath: " + player.getLogName() + " canceled casting the card.");
|
||||
player.getLibrary().putOnBottom(card, game);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -180,7 +180,7 @@ class DescentIntoMadnessEffect extends OneShotEffect {
|
|||
Permanent chosen = game.getPermanent(targetId);
|
||||
if (chosen != null) {
|
||||
amount--;
|
||||
game.informPlayers(player.getName() + " selects " + chosen.getLogName() + " from battlefield");
|
||||
game.informPlayers(player.getLogName() + " selects " + chosen.getLogName() + " from battlefield");
|
||||
selectedObjects.add(targetId);
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ class DescentIntoMadnessEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
if (cardsFromHand > 0) {
|
||||
game.informPlayers(player.getName() + " selects " + cardsFromHand + (cardsFromHand == 1?" card":" cards") + " from his or her hand");
|
||||
game.informPlayers(player.getLogName() + " selects " + cardsFromHand + (cardsFromHand == 1?" card":" cards") + " from his or her hand");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ class DivineDeflectionPreventDamageTargetEffect extends PreventionEffectImpl {
|
|||
}
|
||||
Player player = game.getPlayer(dealDamageTo);
|
||||
if (player != null) {
|
||||
game.informPlayers("Dealing " + prevented + " to " + player.getName() + " instead");
|
||||
game.informPlayers("Dealing " + prevented + " to " + player.getLogName() + " instead");
|
||||
player.damage(prevented, source.getSourceId(), game, false, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,10 +108,10 @@ class KillingWaveEffect extends OneShotEffect {
|
|||
for (Permanent creature : creatures) {
|
||||
String message = "Pay " + amount + " life? If you don't, " + creature.getName() + " will be sacrificed.";
|
||||
if (playerLife - amount - lifePaid >= 0 && player != null && player.chooseUse(Outcome.Neutral, message, game)) {
|
||||
game.informPlayers(player.getName() + " pays " + amount + " life. He will not sacrifice " + creature.getName());
|
||||
game.informPlayers(player.getLogName() + " pays " + amount + " life. He will not sacrifice " + creature.getName());
|
||||
lifePaid += amount;
|
||||
} else {
|
||||
game.informPlayers(player.getName() + " will sacrifice " + creature.getName());
|
||||
game.informPlayers(player.getLogName() + " will sacrifice " + creature.getName());
|
||||
sacrifices.add(creature);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ class RidersOfGavonyEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
if (typeChoice.getChoice() != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
|
||||
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>", game);
|
||||
}
|
||||
|
|
|
@ -90,14 +90,14 @@ class VexingDevilEffect extends OneShotEffect {
|
|||
if (controller != null && permanent != null) {
|
||||
for (UUID opponentUuid : game.getOpponents(source.getControllerId())) {
|
||||
Player opponent = game.getPlayer(opponentUuid);
|
||||
if (opponent != null && opponent.chooseUse(Outcome.LoseLife, "Make " + permanent.getName() + " deal 4 damage to you?", game)) {
|
||||
game.informPlayers(opponent.getName() + " has chosen to receive 4 damage from " + permanent.getName());
|
||||
if (opponent != null && opponent.chooseUse(Outcome.LoseLife, "Make " + permanent.getLogName() + " deal 4 damage to you?", game)) {
|
||||
game.informPlayers(opponent.getLogName() + " has chosen to receive 4 damage from " + permanent.getLogName());
|
||||
opponent.damage(4, permanent.getId(), game, false, true);
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
game.informPlayers("4 damage wasn't dealt so " + permanent.getName() + " won't be sacrificed.");
|
||||
game.informPlayers("4 damage wasn't dealt so " + permanent.getLogName() + " won't be sacrificed.");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -88,7 +88,7 @@ public class AuraBarbs extends CardImpl {
|
|||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
if (controller != null) {
|
||||
controller.damage(2, permanent.getId(), game, false, true);
|
||||
game.informPlayers("2 damage assigned to " + controller.getName() + " from " + permanent.getName());
|
||||
game.informPlayers("2 damage assigned to " + controller.getLogName() + " from " + permanent.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ class MinamosMeddlingCounterTargetEffect extends OneShotEffect {
|
|||
game.getStack().counter(targetId, source.getSourceId(), game);
|
||||
Player spellController = game.getPlayer(spell.getControllerId());
|
||||
if (spellController != null) {
|
||||
spellController.revealCards(sourceObject.getLogName(), spellController.getHand(), game);
|
||||
spellController.revealCards(sourceObject.getName(), spellController.getHand(), game);
|
||||
Cards cardsToDiscard = new CardsImpl();
|
||||
for (SpellAbility spellAbility : spell.getSpellAbilities()) {
|
||||
if (spellAbility.getSpellAbilityType().equals(SpellAbilityType.SPLICE)) {
|
||||
|
|
|
@ -99,7 +99,7 @@ class MistbladeShinobiTriggeredAbility extends TriggeredAbilityImpl {
|
|||
&& event.getSourceId().equals(sourceId)) {
|
||||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls");
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls");
|
||||
filter.add(new ControllerIdPredicate(opponent.getId()));
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
|
@ -140,7 +140,7 @@ class OpalEyeKondasYojimboRedirectionEffect extends ReplacementEffectImpl {
|
|||
else {
|
||||
Player targetPlayer = game.getPlayer(event.getTargetId());
|
||||
if (targetPlayer != null) {
|
||||
message.append(targetPlayer.getName());
|
||||
message.append(targetPlayer.getLogName());
|
||||
}
|
||||
else {
|
||||
message.append("unknown");
|
||||
|
|
|
@ -104,7 +104,7 @@ class OrnateKanzashiEffect extends OneShotEffect {
|
|||
Library library = opponent.getLibrary();
|
||||
Card card = library.getFromTop(game);
|
||||
if (card != null) {
|
||||
opponent.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
opponent.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getName(), source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
ContinuousEffect effect = new OrnateKanzashiCastFromExileEffect(card.getId());
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, source);
|
||||
|
|
|
@ -149,7 +149,7 @@ class ShiningShoalPreventDamageTargetEffect extends PreventionEffectImpl {
|
|||
}
|
||||
Player player = game.getPlayer(redirectTo);
|
||||
if (player != null) {
|
||||
game.informPlayers("Dealing " + prevented + " to " + player.getName() + " instead");
|
||||
game.informPlayers("Dealing " + prevented + " to " + player.getLogName() + " instead");
|
||||
// keep the original source id as it is redirecting
|
||||
player.damage(prevented, event.getSourceId(), game, true, false, event.getAppliedEffects());
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ class SkullsnatcherTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
FilterCard filter = new FilterCard("up to two target cards from that player's graveyard");
|
||||
filter.add(new OwnerIdPredicate(event.getPlayerId()));
|
||||
filter.setMessage("up to two cards in " + game.getPlayer(event.getTargetId()).getName() + "'s graveyard");
|
||||
filter.setMessage("up to two cards in " + game.getPlayer(event.getTargetId()).getLogName() + "'s graveyard");
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetCardInOpponentsGraveyard(0,2,filter));
|
||||
return true;
|
||||
|
|
|
@ -103,7 +103,7 @@ class ThroatSlitterTriggeredAbility extends TriggeredAbilityImpl {
|
|||
FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature that player controls");
|
||||
filter.add(new ControllerIdPredicate(event.getPlayerId()));
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
filter.setMessage("nonblack creature controlled by " + game.getPlayer(event.getTargetId()).getName());
|
||||
filter.setMessage("nonblack creature controlled by " + game.getPlayer(event.getTargetId()).getLogName());
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
return true;
|
||||
|
|
|
@ -119,7 +119,7 @@ class WardOfPietyPreventDamageTargetEffect extends PreventionEffectImpl {
|
|||
}
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player != null) {
|
||||
game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " damage to " + player.getName() + " instead");
|
||||
game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " damage to " + player.getLogName() + " instead");
|
||||
// keep the original source id as it is redirecting
|
||||
player.damage(preventionData.getPreventedDamage(), event.getSourceId(), game, false, true);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ class AcolytesRewardEffect extends PreventionEffectImpl {
|
|||
Player targetPlayer = game.getPlayer(source.getTargets().get(1).getFirstTarget());
|
||||
if (targetPlayer != null) {
|
||||
targetPlayer.damage(toPrevent, source.getSourceId(), game, false, true);
|
||||
game.informPlayers(new StringBuilder("Acolyte's Reward ").append("deals ").append(toPrevent).append(" damage to ").append(targetPlayer.getName()).toString());
|
||||
game.informPlayers(new StringBuilder("Acolyte's Reward ").append("deals ").append(toPrevent).append(" damage to ").append(targetPlayer.getLogName()).toString());
|
||||
} else {
|
||||
Permanent targetDamageCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (targetDamageCreature != null) {
|
||||
|
|
|
@ -87,9 +87,9 @@ class BileBlightEffect extends BoostAllEffect {
|
|||
if (target.getName().isEmpty()) { // face down creature
|
||||
affectedObjectList.add(new MageObjectReference(target, game));
|
||||
} else {
|
||||
String name = target.getLogName();
|
||||
String name = target.getName();
|
||||
for (Permanent perm : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
|
||||
if (perm.getLogName().equals(name)) {
|
||||
if (perm.getName().equals(name)) {
|
||||
affectedObjectList.add(new MageObjectReference(perm, game));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ class PerplexingChimeraControlExchangeEffect extends OneShotEffect {
|
|||
spell.setControllerId(controller.getId());
|
||||
// and chooses new targets
|
||||
spell.chooseNewTargets(game, controller.getId());
|
||||
game.informPlayers(new StringBuilder(controller.getName()).append(" got control of ").append(spell.getName()).append(" spell.").toString());
|
||||
game.informPlayers(new StringBuilder(controller.getLogName()).append(" got control of ").append(spell.getName()).append(" spell.").toString());
|
||||
// and spell controller get control of Perplexing Chimera
|
||||
if (spellCaster != null) {
|
||||
ContinuousEffect effect = new PerplexingChimeraControlEffect();
|
||||
|
|
|
@ -80,7 +80,7 @@ public class SatyrFiredancer extends CardImpl {
|
|||
if (ability instanceof SatyrFiredancerTriggeredAbility) {
|
||||
Player opponent = game.getPlayer(ability.getEffects().get(0).getTargetPointer().getFirst(game, ability));
|
||||
if (opponent != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(opponent.getName()).toString());
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature controlled by " + opponent.getLogName());
|
||||
filter.add(new ControllerIdPredicate(opponent.getId()));
|
||||
ability.getTargets().add(new TargetCreaturePermanent(filter));
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ class SatyrWayfinderEffect extends OneShotEffect {
|
|||
cards.addAll(player.getLibrary().getTopCards(game, 4));
|
||||
boolean properCardFound = cards.count(filterPutInHand, source.getControllerId(), source.getSourceId(), game) > 0;
|
||||
if (!cards.isEmpty()) {
|
||||
player.revealCards(sourceObject.getLogName(), cards, game);
|
||||
player.revealCards(sourceObject.getName(), cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, filterPutInHand);
|
||||
if (properCardFound &&
|
||||
player.chooseUse(outcome, "Put a land card into your hand?", game) &&
|
||||
|
|
|
@ -139,7 +139,7 @@ class WhimsOfTheFateEffect extends OneShotEffect {
|
|||
}
|
||||
target.setRequired(false);
|
||||
currentPlayer.chooseTarget(outcome, target, source, game);
|
||||
StringBuilder message = new StringBuilder(currentPlayer.getName()).append(" pile ").append(i).append(": ");
|
||||
StringBuilder message = new StringBuilder(currentPlayer.getLogName()).append(" pile ").append(i).append(": ");
|
||||
if (target.getTargets().isEmpty()) {
|
||||
message.append(" (empty)");
|
||||
} else {
|
||||
|
@ -155,7 +155,7 @@ class WhimsOfTheFateEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
// add all permanents not targeted yet to the third pile
|
||||
StringBuilder message = new StringBuilder(currentPlayer.getName()).append(" pile 3: ");
|
||||
StringBuilder message = new StringBuilder(currentPlayer.getLogName()).append(" pile 3: ");
|
||||
for (Permanent permanent : game.getState().getBattlefield().getAllActivePermanents(currentPlayer.getId())) {
|
||||
if (!playerPiles.get(1).contains(permanent.getId()) && !playerPiles.get(2).contains(permanent.getId())) {
|
||||
playerPiles.get(3).add(permanent.getId());
|
||||
|
@ -175,7 +175,7 @@ class WhimsOfTheFateEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
// decide which pile to sacrifice
|
||||
int sacrificePile = rnd.nextInt(3) + 1; // random number from 1 - 3
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" sacrifices pile number ").append(sacrificePile).toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" sacrifices pile number ").append(sacrificePile).toString());
|
||||
for (UUID permanentId : playerPiles.getValue().get(sacrificePile)) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
if (permanent != null) {
|
||||
|
|
|
@ -119,7 +119,7 @@ class CandlesGlowPreventDamageTargetEffect extends PreventionEffectImpl {
|
|||
if (controller != null) {
|
||||
controller.gainLife(prevented, game);
|
||||
game.informPlayers(new StringBuilder("Candles' Glow: Prevented ").append(prevented).append(" damage ").toString());
|
||||
game.informPlayers(new StringBuilder("Candles' Glow: ").append(controller.getName()).append(" gained ").append(prevented).append("life").toString());
|
||||
game.informPlayers(new StringBuilder("Candles' Glow: ").append(controller.getLogName()).append(" gained ").append(prevented).append("life").toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,8 +118,8 @@ class CranialExtractionEffect extends OneShotEffect {
|
|||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
}
|
||||
}
|
||||
controller.lookAtCards(sourceObject.getLogName() + " Hand", player.getHand(), game);
|
||||
controller.lookAtCards(sourceObject.getLogName() + " Library", new CardsImpl(Zone.PICK, player.getLibrary().getCards(game)), game);
|
||||
controller.lookAtCards(sourceObject.getName() + " Hand", player.getHand(), game);
|
||||
controller.lookAtCards(sourceObject.getName() + " Library", new CardsImpl(Zone.PICK, player.getLibrary().getCards(game)), game);
|
||||
player.shuffleLibrary(game);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -172,7 +172,7 @@ class HinderReplacementEffect extends ReplacementEffectImpl {
|
|||
if (player != null) {
|
||||
boolean top = player.chooseUse(Outcome.Neutral, "Put " + card.getName() + " on top of the library? Otherwise it will be put on the bottom.", game);
|
||||
if (card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, top, event.getAppliedEffects())) {
|
||||
game.informPlayers(player.getName() + " has put " + card.getName() + " on " + (top ? "top" : "the bottom") + " of the library.");
|
||||
game.informPlayers(player.getLogName() + " has put " + card.getName() + " on " + (top ? "top" : "the bottom") + " of the library.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ public class NightDealings extends CardImpl {
|
|||
name = sourceCard.getName();
|
||||
}
|
||||
player.revealCards(name, cards, game);
|
||||
game.informPlayers(player.getName() + " reveals " + card.getName());
|
||||
game.informPlayers(player.getLogName() + " reveals " + card.getName());
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
|
|
|
@ -92,7 +92,7 @@ class ReverseTheSandsEffect extends OneShotEffect {
|
|||
for (UUID playerId : controller.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
choices.add(new StringBuilder(Integer.toString(player.getLife())).append(" life of ").append(player.getName()).toString());
|
||||
choices.add(new StringBuilder(Integer.toString(player.getLife())).append(" life of ").append(player.getLogName()).toString());
|
||||
}
|
||||
}
|
||||
lifeChoice.setChoices(choices);
|
||||
|
@ -101,7 +101,7 @@ class ReverseTheSandsEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
String selectedChoice;
|
||||
if (choices.size() > 1) {
|
||||
lifeChoice.setMessage("Which players life should get player " + player.getName());
|
||||
lifeChoice.setMessage("Which players life should get player " + player.getLogName());
|
||||
controller.choose(Outcome.Detriment, lifeChoice, game);
|
||||
selectedChoice = lifeChoice.getChoice();
|
||||
} else {
|
||||
|
@ -113,7 +113,7 @@ class ReverseTheSandsEffect extends OneShotEffect {
|
|||
int life = Integer.parseInt(lifeString);
|
||||
player.setLife(life, game);
|
||||
choices.remove(selectedChoice);
|
||||
game.informPlayers(new StringBuilder("Player ").append(player.getName()).append(" life set to ").append(life).toString());
|
||||
game.informPlayers(new StringBuilder("Player ").append(player.getLogName()).append(" life set to ").append(life).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ class ShimatsuTheBloodcloakedEffect extends ReplacementEffectImpl {
|
|||
controller.chooseTarget(Outcome.Detriment, target, source, game);
|
||||
if (target.getTargets().size() > 0) {
|
||||
int sacrificedCreatures = target.getTargets().size();
|
||||
game.informPlayers(new StringBuilder(controller.getName()).append(" sacrifices ").append(sacrificedCreatures).append(" creatures for ").append(creature.getName()).toString());
|
||||
game.informPlayers(new StringBuilder(controller.getLogName()).append(" sacrifices ").append(sacrificedCreatures).append(" creatures for ").append(creature.getName()).toString());
|
||||
for (UUID targetId: target.getTargets()) {
|
||||
Permanent targetCreature = game.getPermanent(targetId);
|
||||
if (targetCreature == null || !targetCreature.sacrifice(source.getSourceId(), game)) {
|
||||
|
|
|
@ -148,7 +148,7 @@ class TideOfWarEffect extends OneShotEffect {
|
|||
creature.sacrifice(source.getSourceId(), game);
|
||||
Player player = game.getPlayer(creature.getControllerId());
|
||||
if (player != null) {
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" sacrifices ").append(creature.getName()).toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" sacrifices ").append(creature.getName()).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class VassalsDutyPreventDamageTargetEffect extends PreventionEffectImpl {
|
|||
UUID redirectTo = source.getControllerId();
|
||||
Player player = game.getPlayer(redirectTo);
|
||||
if (player != null) {
|
||||
game.informPlayers("Dealing " + preventionResult.getPreventedDamage() + " to " + player.getName() + " instead");
|
||||
game.informPlayers("Dealing " + preventionResult.getPreventedDamage() + " to " + player.getLogName() + " instead");
|
||||
// keep the original source id as it is redirecting
|
||||
player.damage(preventionResult.getPreventedDamage(), event.getSourceId(), game, false, true);
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ class AllianceOfArmsEffect extends OneShotEffect {
|
|||
payed = true;
|
||||
}
|
||||
}
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
return xValue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl {
|
|||
payed = true;
|
||||
}
|
||||
}
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
return xValue;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ class CollectiveVoyageEffect extends OneShotEffect {
|
|||
payed = true;
|
||||
}
|
||||
}
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
return xValue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class HydraOmnivoreEffect extends OneShotEffect {
|
|||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent != null) {
|
||||
int dealtDamage = opponent.damage(amount, source.getSourceId(), game, false, true);
|
||||
game.informPlayers(new StringBuilder(object.getName()).append(" deals ").append(dealtDamage).append(" damage to ").append(opponent.getName()).toString());
|
||||
game.informPlayers(object.getLogName() + " deals " + dealtDamage + " damage to " + opponent.getLogName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ class ManaChargedDragonEffect extends OneShotEffect {
|
|||
payed = true;
|
||||
}
|
||||
}
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
return xValue;
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ class MindsAglowEffect extends OneShotEffect {
|
|||
payed = true;
|
||||
}
|
||||
}
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
return xValue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ class RikuOfTwoReflectionsCopyEffect extends OneShotEffect {
|
|||
if (activateMessage.startsWith(" casts ")) {
|
||||
activateMessage = activateMessage.substring(6);
|
||||
}
|
||||
game.informPlayers(player.getName() + " copies " + activateMessage);
|
||||
game.informPlayers(player.getLogName() + " copies " + activateMessage);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -107,7 +107,7 @@ class SewerNemesisChoosePlayerEffect extends OneShotEffect {
|
|||
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
|
||||
Player chosenPlayer = game.getPlayer(target.getFirstTarget());
|
||||
if (chosenPlayer != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
|
||||
game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ class SharedTraumaEffect extends OneShotEffect {
|
|||
payed = true;
|
||||
}
|
||||
}
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
return xValue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ class SpellCrumpleReplacementEffect extends ReplacementEffectImpl {
|
|||
if (card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false, event.getAppliedEffects())) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
game.informPlayers(controller.getName() + " has put " + card.getName() + " on the bottom of the library.");
|
||||
game.informPlayers(controller.getLogName() + " has put " + card.getName() + " on the bottom of the library.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ class StrangleholdSkipExtraTurnsEffect extends ReplacementEffectImpl {
|
|||
Player player = game.getPlayer(event.getPlayerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (player != null && sourceObject != null) {
|
||||
game.informPlayers(sourceObject.getLogName() + ": Extra turn of " + player.getName() + " skipped");
|
||||
game.informPlayers(sourceObject.getLogName() + ": Extra turn of " + player.getLogName() + " skipped");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ class EyeOfDoomEffect extends OneShotEffect {
|
|||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanents.add(permanent);
|
||||
game.informPlayers((new StringBuilder(player.getName()).append(" chooses ").append(permanent.getName()).toString()));
|
||||
game.informPlayers((new StringBuilder(player.getLogName()).append(" chooses ").append(permanent.getName()).toString()));
|
||||
}
|
||||
}
|
||||
player = playerList.getNext(game);
|
||||
|
|
|
@ -29,6 +29,7 @@ package mage.sets.commander2013;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -101,7 +102,8 @@ class NayaSoulbeastCastEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null) {
|
||||
int cmc = 0;
|
||||
for (UUID playerId :controller.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
@ -109,13 +111,13 @@ class NayaSoulbeastCastEffect extends OneShotEffect {
|
|||
if (player.getLibrary().size() > 0) {
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
cmc += card.getManaCost().convertedManaCost();
|
||||
player.revealCards(new StringBuilder("Naya Soulbeast (").append(player.getName()).append(")").toString(), new CardsImpl(card), game);
|
||||
player.revealCards(sourceObject.getName() + " " + player.getName() + ")", new CardsImpl(card), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Effect effect : source.getEffects()) {
|
||||
if (effect instanceof NayaSoulbeastReplacementEffect) {
|
||||
effect.setValue("NayaSoulbeastCounters", new Integer(cmc));
|
||||
effect.setValue("NayaSoulbeastCounters", cmc);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -122,7 +122,7 @@ class OrderOfSuccessionEffect extends OneShotEffect {
|
|||
}
|
||||
// if player is in range he chooses a creature to control
|
||||
if (currentPlayer != null && controller.getInRange().contains(currentPlayer.getId())) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(nextPlayer.getName()).toString());
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(nextPlayer.getLogName()).toString());
|
||||
filter.add(new ControllerIdPredicate(nextPlayer.getId()));
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
target.setNotTarget(false);
|
||||
|
@ -143,7 +143,7 @@ class OrderOfSuccessionEffect extends OneShotEffect {
|
|||
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, player.getId());
|
||||
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
||||
game.addEffect(effect, source);
|
||||
game.informPlayers(new StringBuilder(player.getName()).append(" gains control of ").append(creature.getName()).toString());
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" gains control of ").append(creature.getName()).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ class ReincarnationDelayedEffect extends OneShotEffect {
|
|||
if (permanent != null && controller != null) {
|
||||
Player player = game.getPlayer(permanent.getOwnerId());
|
||||
if (player != null) {
|
||||
FilterCreatureCard filter = new FilterCreatureCard(new StringBuilder("a creature card from ").append(player.getName()).append("'s graveyard").toString());
|
||||
FilterCreatureCard filter = new FilterCreatureCard(new StringBuilder("a creature card from ").append(player.getLogName()).append("'s graveyard").toString());
|
||||
filter.add(new OwnerIdPredicate(player.getId()));
|
||||
Target targetCreature = new TargetCardInGraveyard(filter);
|
||||
if (targetCreature.canChoose(source.getSourceId(), controller.getId(), game)
|
||||
|
|
|
@ -95,10 +95,10 @@ class TemptWithGloryEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getOpponents(controller.getId())) {
|
||||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent != null) {
|
||||
if (opponent.chooseUse(outcome, new StringBuilder("Put a +1/+1 counter on each creature you control?").toString(), game)) {
|
||||
if (opponent.chooseUse(outcome, "Put a +1/+1 counter on each creature you control?", game)) {
|
||||
opponentsAddedCounters++;
|
||||
addCounterToEachCreature(playerId, counter, game);
|
||||
game.informPlayers(new StringBuilder(opponent.getName()).append(" added a +1/+1 counter on each of its creatures").toString());
|
||||
game.informPlayers(opponent.getLogName() + " added a +1/+1 counter on each of its creatures");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ class TemptWithReflectionsEffect extends OneShotEffect {
|
|||
} else {
|
||||
decision = " won't copy ";
|
||||
}
|
||||
game.informPlayers((new StringBuilder(player.getName()).append(decision).append(permanent.getName()).toString()));
|
||||
game.informPlayers((new StringBuilder(player.getLogName()).append(decision).append(permanent.getName()).toString()));
|
||||
}
|
||||
player = playerList.getNext(game);
|
||||
} while (!player.getId().equals(game.getActivePlayerId()));
|
||||
|
|
|
@ -111,9 +111,9 @@ class TrueNameNemesisChoosePlayerEffect extends OneShotEffect {
|
|||
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
|
||||
Player chosenPlayer = game.getPlayer(target.getFirstTarget());
|
||||
if (chosenPlayer != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
|
||||
game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
|
||||
permanent.addInfo("chosen player", "<i>Chosen player: " + chosenPlayer.getName() + "</i>", game);
|
||||
permanent.addInfo("chosen player", "<i>Chosen player: " + chosenPlayer.getLogName() + "</i>", game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,10 +117,10 @@ class UnexpectedlyAbsentEffect extends OneShotEffect {
|
|||
cardIds.push(card.getId());
|
||||
}
|
||||
// return cards back to library
|
||||
game.informPlayers(new StringBuilder(controller.getName())
|
||||
game.informPlayers(new StringBuilder(controller.getLogName())
|
||||
.append(" puts ").append(permanent.getName())
|
||||
.append(" beneath the top ").append(xValue)
|
||||
.append(" cards of ").append(owner.getName()).append("'s library").toString());
|
||||
.append(" cards of ").append(owner.getLogName()).append("'s library").toString());
|
||||
permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
while(!cardIds.isEmpty()) {
|
||||
UUID cardId = cardIds.poll();
|
||||
|
|
|
@ -88,7 +88,7 @@ class WellOfLostDreamsEffect extends OneShotEffect {
|
|||
int xValue = controller.announceXMana(0, amount, "Announce X Value", game, source);
|
||||
if (xValue > 0) {
|
||||
if (new GenericManaCost(xValue).pay(source, game, source.getSourceId(), controller.getId(), false)) {
|
||||
game.informPlayers(new StringBuilder(controller.getName()).append(" payed {").append(xValue).append("}").toString());
|
||||
game.informPlayers(new StringBuilder(controller.getLogName()).append(" payed {").append(xValue).append("}").toString());
|
||||
controller.drawCards(xValue, game);
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -160,7 +160,7 @@ class AssaultSuitGainControlEffect extends OneShotEffect {
|
|||
if (equipment.getAttachedTo() != null) {
|
||||
Permanent equippedCreature = game.getPermanent(equipment.getAttachedTo());
|
||||
if (equippedCreature != null && controller.chooseUse(outcome,
|
||||
"Let have " + activePlayer.getName() + " gain control of " + equippedCreature.getLogName() + "?", game)) {
|
||||
"Let have " + activePlayer.getLogName() + " gain control of " + equippedCreature.getLogName() + "?", game)) {
|
||||
equippedCreature.untap(game);
|
||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn, activePlayer.getId());
|
||||
effect.setTargetPointer(new FixedTarget(equipment.getAttachedTo()));
|
||||
|
|
|
@ -102,7 +102,7 @@ class BitterFeudEntersBattlefieldEffect extends OneShotEffect {
|
|||
if (player1 != null && player2 != null) {
|
||||
game.getState().setValue(source.getSourceId() + "_player1", player1);
|
||||
game.getState().setValue(source.getSourceId() + "_player2", player2);
|
||||
game.informPlayers(permanent.getName() + ": " + controller.getName() + " has chosen " + player1.getName() + " and " + player2.getName());
|
||||
game.informPlayers(permanent.getLogName() + ": " + controller.getLogName() + " has chosen " + player1.getLogName() + " and " + player2.getLogName());
|
||||
permanent.addInfo("chosen players", "<font color = 'blue'>Chosen players: " + player1.getName() +", " + player2.getName() + "</font>", game);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class GraveSifterEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
typeChoice.clearChoice();
|
||||
if (player.choose(outcome, typeChoice, game)) {
|
||||
game.informPlayers(player.getName() + " has chosen: " + typeChoice.getChoice());
|
||||
game.informPlayers(player.getLogName() + " has chosen: " + typeChoice.getChoice());
|
||||
FilterCard filter = new FilterCreatureCard("creature cards with creature type " + typeChoice.getChoice()+ " from your graveyard");
|
||||
filter.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
Target target = new TargetCardInYourGraveyard(0,Integer.MAX_VALUE, filter);
|
||||
|
|
|
@ -122,7 +122,7 @@ class CopySourceSpellEffect extends OneShotEffect {
|
|||
if (activateMessage.startsWith(" casts ")) {
|
||||
activateMessage = activateMessage.substring(6);
|
||||
}
|
||||
game.informPlayers(controller.getName() + " copies " + activateMessage);
|
||||
game.informPlayers(controller.getLogName() + " copies " + activateMessage);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,13 +86,13 @@ public class VolcanicOffering extends CardImpl {
|
|||
if (controller != null && (ability instanceof SpellAbility)) {
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetPermanent(filterLand));
|
||||
FilterLandPermanent filterLandForOpponent = new FilterLandPermanent("nonbasic land not controlled by " + controller.getName());
|
||||
FilterLandPermanent filterLandForOpponent = new FilterLandPermanent("nonbasic land not controlled by " + controller.getLogName());
|
||||
filterLandForOpponent.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
filterLandForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId())));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(filterLandForOpponent));
|
||||
|
||||
ability.addTarget(new TargetPermanent(filterCreature));
|
||||
FilterCreaturePermanent filterCreatureForOpponent = new FilterCreaturePermanent("creature not controlled by " + controller.getName());
|
||||
FilterCreaturePermanent filterCreatureForOpponent = new FilterCreaturePermanent("creature not controlled by " + controller.getLogName());
|
||||
filterCreatureForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId())));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(filterCreatureForOpponent));
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ class ChooseOpponent extends OneShotEffect {
|
|||
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
|
||||
Player chosenPlayer = game.getPlayer(target.getFirstTarget());
|
||||
if (chosenPlayer != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
|
||||
game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public class SkywardEyeProphets extends CardImpl {
|
|||
return false;
|
||||
}
|
||||
cards.add(card);
|
||||
controller.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
if (card.getCardType().contains(CardType.LAND)) {
|
||||
return controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
} else {
|
||||
|
|
|
@ -101,7 +101,7 @@ class HauntedFengrafEffect extends OneShotEffect {
|
|||
Random rnd = new Random();
|
||||
Card card = cards[rnd.nextInt(cards.length)];
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
game.informPlayers(card.getName() + " returned to the hand of " + player.getName());
|
||||
game.informPlayers(card.getName() + " returned to the hand of " + player.getLogName());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class IncreasingVengeanceEffect extends OneShotEffect {
|
|||
copy.setCopiedSpell(true);
|
||||
game.getStack().push(copy);
|
||||
copy.chooseNewTargets(game, source.getControllerId());
|
||||
game.informPlayers(new StringBuilder(controller.getName()).append(copy.getActivatedMessage(game)).toString());
|
||||
game.informPlayers(new StringBuilder(controller.getLogName()).append(copy.getActivatedMessage(game)).toString());
|
||||
Spell sourceSpell = (Spell) game.getStack().getStackObject(source.getSourceId());
|
||||
if (sourceSpell != null) {
|
||||
if (sourceSpell.getFromZone() == Zone.GRAVEYARD) {
|
||||
|
@ -116,7 +116,7 @@ class IncreasingVengeanceEffect extends OneShotEffect {
|
|||
copy.setCopiedSpell(true);
|
||||
game.getStack().push(copy);
|
||||
copy.chooseNewTargets(game, source.getControllerId());
|
||||
game.informPlayers(new StringBuilder(controller.getName()).append(copy.getActivatedMessage(game)).toString());
|
||||
game.informPlayers(new StringBuilder(controller.getLogName()).append(copy.getActivatedMessage(game)).toString());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -94,7 +94,7 @@ class LostInTheWoodsEffect extends OneShotEffect {
|
|||
Card card = controller.getLibrary().getFromTop(game);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
controller.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
|
||||
if (card != null) {
|
||||
if (card.getSubtype().contains("Forest")) {
|
||||
|
|
|
@ -106,7 +106,7 @@ class SoulSeizerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) {
|
||||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls");
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls");
|
||||
filter.add(new ControllerIdPredicate(opponent.getId()));
|
||||
|
||||
this.getTargets().clear();
|
||||
|
|
|
@ -98,7 +98,7 @@ class SerumPowderReplaceEffect extends ReplacementEffectImpl {
|
|||
}
|
||||
controller.drawCards(cardsHand, game);
|
||||
}
|
||||
game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getName()).append(" exiles hand and draws ").append(cardsHand).append(" card(s)").toString());
|
||||
game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getLogName()).append(" exiles hand and draws ").append(cardsHand).append(" card(s)").toString());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -99,7 +99,7 @@ class NovijenHeartOfProgressEffect extends OneShotEffect {
|
|||
for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
|
||||
if (permanent.getTurnsOnBattlefield() == 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(), game);
|
||||
game.informPlayers(sourceObject.getLogName()+ ": " + controller.getName() + " puts a +1/+1 counter on " + permanent.getLogName());
|
||||
game.informPlayers(sourceObject.getLogName()+ ": " + controller.getLogName() + " puts a +1/+1 counter on " + permanent.getLogName());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -146,7 +146,7 @@ class ResearchEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
game.informPlayers(player.getName() + " has chosen " + count + " card(s) to shuffle into his or her library.");
|
||||
game.informPlayers(player.getLogName() + " has chosen " + count + " card(s) to shuffle into his or her library.");
|
||||
|
||||
if (count > 0) {
|
||||
player.shuffleLibrary(game);
|
||||
|
@ -175,14 +175,13 @@ class DevelopmentEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Allow ").append(player.getName()).append(" to draw a card instead? (" + Integer.toString(i+1) + ")");
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
boolean putToken = true;
|
||||
for (UUID opponentUuid : opponents) {
|
||||
Player opponent = game.getPlayer(opponentUuid);
|
||||
if (opponent != null && opponent.chooseUse(Outcome.Detriment, sb.toString(), game)) {
|
||||
game.informPlayers(opponent.getName() + " had chosen to let " + player.getName() + " draw a card.");
|
||||
if (opponent != null && opponent.chooseUse(Outcome.Detriment,
|
||||
"Allow " + player.getLogName() + " to draw a card instead? (" + Integer.toString(i+1) + ")", game)) {
|
||||
game.informPlayers(opponent.getLogName() + " had chosen to let " + player.getLogName() + " draw a card.");
|
||||
player.drawCards(1, game);
|
||||
putToken = false;
|
||||
break;
|
||||
|
|
|
@ -146,7 +146,7 @@ class FallEffect extends OneShotEffect {
|
|||
} while (cards.contains(card.getId()));
|
||||
cards.add(card);
|
||||
}
|
||||
targetPlayer.revealCards(sourceObject.getLogName(), cards, game);
|
||||
targetPlayer.revealCards(sourceObject.getName(), cards, game);
|
||||
for (Card cardToDiscard: cards.getCards(game)) {
|
||||
if (!cardToDiscard.getCardType().contains(CardType.LAND)) {
|
||||
targetPlayer.discard(cardToDiscard, source, game);
|
||||
|
|
|
@ -113,7 +113,7 @@ class ChooseColorEffect extends OneShotEffect {
|
|||
if (player != null && permanent != null) {
|
||||
ChoiceColor colorChoice = new ChoiceColor();
|
||||
if (player.choose(Outcome.Neutral, colorChoice, game)) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
||||
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>", game);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ class DeadbridgeChantEffect extends OneShotEffect {
|
|||
text = " put onto battlefield for ";
|
||||
}
|
||||
card.moveToZone(targetZone, source.getSourceId(), game, false);
|
||||
game.informPlayers(new StringBuilder("Deadbridge Chant: ").append(card.getName()).append(text).append(player.getName()).toString());
|
||||
game.informPlayers(new StringBuilder("Deadbridge Chant: ").append(card.getName()).append(text).append(player.getLogName()).toString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ class MirkoVoskMindDrinkerEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
player.revealCards(new StringBuilder("by ").append(sourceCard.getName()).append(" from ").append(player.getName()).toString(), cards, game);
|
||||
player.revealCards("by " + sourceCard.getName() + " from " + player.getName(), cards, game);
|
||||
for(Card card : cards.getCards(game)){
|
||||
if(card != null){
|
||||
card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, false);
|
||||
|
|
|
@ -105,7 +105,7 @@ class ReapIntellectEffect extends OneShotEffect {
|
|||
if (targetPlayer != null && sourceObject != null && controller != null) {
|
||||
|
||||
// reveal hand of target player
|
||||
targetPlayer.revealCards(sourceObject.getLogName(), targetPlayer.getHand(), game);
|
||||
targetPlayer.revealCards(sourceObject.getName(), targetPlayer.getHand(), game);
|
||||
|
||||
// Chose cards to exile from hand
|
||||
Cards exiledCards = new CardsImpl();
|
||||
|
|
|
@ -103,7 +103,7 @@ class GurmagDrownerEffect extends OneShotEffect {
|
|||
cards.addAll(controller.getLibrary().getTopCards(game, 4));
|
||||
|
||||
if (cards.size() > 0) {
|
||||
controller.lookAtCards(sourceObject.getLogName(), cards, game);
|
||||
controller.lookAtCards(sourceObject.getName(), cards, game);
|
||||
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand"));
|
||||
if (controller.choose(Outcome.Benefit, cards, target, game)) {
|
||||
|
|
|
@ -134,9 +134,9 @@ class KeeperOfTheLensLookFaceDownEffect extends OneShotEffect {
|
|||
Cards cards = new CardsImpl();
|
||||
cards.add(copyFaceDown);
|
||||
Player player = game.getPlayer(faceDownCreature.getControllerId());
|
||||
controller.lookAtCards("face down card - " + mageObject.getLogName(), cards, game);
|
||||
controller.lookAtCards("face down card - " + mageObject.getName(), cards, game);
|
||||
if (player != null) {
|
||||
game.informPlayers(controller.getName() + " looks at a face down creature of " + player.getName());
|
||||
game.informPlayers(controller.getLogName() + " looks at a face down creature of " + player.getLogName());
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -119,11 +119,11 @@ class NarsetTranscendentEffect1 extends OneShotEffect {
|
|||
if (card != null) {
|
||||
CardsImpl cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
controller.lookAtCards(sourceObject.getLogName(), cards, game);
|
||||
controller.lookAtCards(sourceObject.getName(), cards, game);
|
||||
if (!card.getCardType().contains(CardType.CREATURE) && !card.getCardType().contains(CardType.LAND)) {
|
||||
if (controller.chooseUse(outcome, "Reveal " + card.getName() + " and put it into your hand?", game)) {
|
||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
controller.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -112,7 +112,7 @@ class RevealingWindEffect extends OneShotEffect {
|
|||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
controller.lookAtCards(sourceObject.getName(), cards, game);
|
||||
game.informPlayers(controller.getName() + " look at a face-down attacking creature");
|
||||
game.informPlayers(controller.getLogName() + " look at a face-down attacking creature");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ class ShorecrasherElementalEffect extends OneShotEffect {
|
|||
if (shorecrasherElemental != null &&
|
||||
sourceObject != null &&
|
||||
new MageObjectReference(sourceObject, game).refersTo(shorecrasherElemental, game)) {
|
||||
if (shorecrasherElemental.moveToExile(source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game)) {
|
||||
if (shorecrasherElemental.moveToExile(source.getSourceId(), sourceObject.getName(), source.getSourceId(), game)) {
|
||||
Card card = game.getExile().getCard(source.getSourceId(), game);
|
||||
if (card != null) {
|
||||
game.addEffect(new BecomesFaceDownCreatureEffect(Duration.Custom, FaceDownType.MEGAMORPHED), source);
|
||||
|
|
|
@ -96,7 +96,7 @@ class ReturnToHandAllNamedPermanentsEffect extends OneShotEffect {
|
|||
if (permanent.getName().isEmpty()) {
|
||||
filter.add(new PermanentIdPredicate(permanent.getId())); // if no name (face down creature) only the creature itself is selected
|
||||
} else {
|
||||
filter.add(new NamePredicate(permanent.getLogName()));
|
||||
filter.add(new NamePredicate(permanent.getName()));
|
||||
}
|
||||
for (Permanent perm: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
controller.moveCardToHandWithInfo(perm, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||
|
|
|
@ -119,7 +119,7 @@ class SkirkDrillSergeantEffect extends OneShotEffect {
|
|||
Card card = player.getLibrary().getFromTop(game);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
player.revealCards(sourceObject.getLogName(), cards, game);
|
||||
player.revealCards(sourceObject.getName(), cards, game);
|
||||
|
||||
if (card != null) {
|
||||
if (filter.match(card, game)) {
|
||||
|
|
|
@ -96,7 +96,7 @@ class AshlingTheExtinguisherTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) {
|
||||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls");
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls");
|
||||
filter.add(new ControllerIdPredicate(opponent.getId()));
|
||||
|
||||
this.getTargets().clear();
|
||||
|
|
|
@ -104,7 +104,7 @@ class CankerAbominationEffect extends OneShotEffect {
|
|||
if (player != null && CankerAbomination != null) {
|
||||
Player chosenPlayer = game.getPlayer(source.getFirstTarget());
|
||||
if (chosenPlayer != null) {
|
||||
game.informPlayers(CankerAbomination.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
|
||||
game.informPlayers(CankerAbomination.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
|
||||
int amount = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), chosenPlayer.getId(), game).size();
|
||||
CankerAbomination.addCounters(CounterType.M1M1.createInstance(amount), game);
|
||||
return true;
|
||||
|
|
|
@ -111,7 +111,7 @@ class MirrorSheenEffect extends OneShotEffect {
|
|||
if (activateMessage.startsWith(" casts ")) {
|
||||
activateMessage = activateMessage.substring(6);
|
||||
}
|
||||
game.informPlayers(player.getName() + " copies " + activateMessage);
|
||||
game.informPlayers(player.getLogName() + " copies " + activateMessage);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -99,7 +99,7 @@ class NeedleSpecterEffect extends OneShotEffect {
|
|||
if (targetPlayer != null) {
|
||||
int damage = (Integer)getValue("damage");
|
||||
targetPlayer.discard(damage, source, game);
|
||||
game.informPlayers(targetPlayer.getName() + "discards " + damage + " card(s)");
|
||||
game.informPlayers(targetPlayer.getLogName() + "discards " + damage + " card(s)");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -112,7 +112,7 @@ class ChooseOpponent extends OneShotEffect {
|
|||
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
|
||||
Player chosenPlayer = game.getPlayer(target.getFirstTarget());
|
||||
if (chosenPlayer != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
|
||||
game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ class SoltariVisionaryTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (soltari != null && soltari.getId() == this.getSourceId()) {
|
||||
FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("enchantment that player controls.");
|
||||
filter.add(new ControllerIdPredicate(event.getPlayerId()));
|
||||
filter.setMessage("enchantment controlled by " + game.getPlayer(event.getTargetId()).getName());
|
||||
filter.setMessage("enchantment controlled by " + game.getPlayer(event.getTargetId()).getLogName());
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
return true;
|
||||
|
|
|
@ -98,7 +98,7 @@ class FriendlyFireEffect extends OneShotEffect {
|
|||
Cards cards = new CardsImpl();
|
||||
Card card = controllerOfTargetCreature.getHand().getRandom(game);
|
||||
cards.add(card);
|
||||
controllerOfTargetCreature.revealCards(sourceObject.getLogName(), cards, game);
|
||||
controllerOfTargetCreature.revealCards(sourceObject.getName(), cards, game);
|
||||
int damage = card.getManaCost().convertedManaCost();
|
||||
targetCreature.damage(damage, source.getSourceId(), game, false, true);
|
||||
controllerOfTargetCreature.damage(damage, source.getSourceId(), game, false, true);
|
||||
|
|
|
@ -101,7 +101,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
|||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);
|
||||
}
|
||||
Collections.shuffle(cardsToManifest);
|
||||
game.informPlayers(controller.getName() + " shuffles the face-down pile");
|
||||
game.informPlayers(controller.getLogName() + " shuffles the face-down pile");
|
||||
Ability newSource = source.copy();
|
||||
newSource.setWorksFaceDown(true);
|
||||
for (Card card: cardsToManifest) {
|
||||
|
@ -115,7 +115,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
|||
MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter(game) +1, game);
|
||||
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
|
||||
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId(), false, true)) {
|
||||
game.informPlayers(new StringBuilder(controller.getName())
|
||||
game.informPlayers(new StringBuilder(controller.getLogName())
|
||||
.append(" puts facedown card from exile onto the battlefield").toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class HumbleDefectorEffect extends OneShotEffect {
|
|||
if (targetOpponent != null && humbleDefector != null) {
|
||||
ContinuousEffect effect = new HumbleDefectorControlSourceEffect();
|
||||
game.addEffect(effect, source);
|
||||
game.informPlayers(humbleDefector.getName() + " is now controlled by " + targetOpponent.getName());
|
||||
game.informPlayers(humbleDefector.getName() + " is now controlled by " + targetOpponent.getLogName());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -136,7 +136,7 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
|
|||
MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter(game) +1, game);
|
||||
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
|
||||
if (player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId(), false, true)) {
|
||||
game.informPlayers(new StringBuilder(player.getName())
|
||||
game.informPlayers(new StringBuilder(player.getLogName())
|
||||
.append(" puts facedown card from exile onto the battlefield").toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ class RenownedWeaponsmithEffect extends OneShotEffect {
|
|||
Card card = game.getCard(target.getFirstTarget());
|
||||
Cards revealed = new CardsImpl();
|
||||
revealed.add(card);
|
||||
controller.revealCards(sourceObject.getLogName(), revealed, game);
|
||||
controller.revealCards(sourceObject.getName(), revealed, game);
|
||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ class TasigurTheGoldenFangEffect extends OneShotEffect {
|
|||
if (opponentId != null) {
|
||||
Player opponent = game.getPlayer(opponentId);
|
||||
if (opponent != null) {
|
||||
FilterNonlandCard filter = new FilterNonlandCard("nonland card from " + controller.getName() + " graveyard");
|
||||
FilterNonlandCard filter = new FilterNonlandCard("nonland card from " + controller.getLogName() + " graveyard");
|
||||
filter.add(new OwnerIdPredicate(controller.getId()));
|
||||
Target target = new TargetCardInGraveyard(filter);
|
||||
opponent.chooseTarget(outcome, target, source, game);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue