* Game log - Added text of activated ability to the game log message if activated.

This commit is contained in:
LevelX2 2013-10-15 00:48:21 +02:00
parent 51b93600e6
commit 296af6cf8b
2 changed files with 7 additions and 2 deletions

View file

@ -210,7 +210,11 @@ public abstract class ActivatedAbilityImpl<T extends ActivatedAbilityImpl<T>> ex
if (game.isSimulation()) {
return "";
}
return " activates ability from " + getMessageText(game);
MageObject object = game.getObject(this.sourceId);
return new StringBuilder(" activates ")
.append(object != null ? this.getRule(object.getName()) :this.getRule())
.append(" from ")
.append(getMessageText(game)).toString();
}
protected String getMessageText(Game game) {

View file

@ -51,8 +51,9 @@ public class PlayLandAbility extends ActivatedAbilityImpl<PlayLandAbility> {
@Override
public boolean canActivate(UUID playerId, Game game) {
if (!controlsAbility(playerId, game))
if (!controlsAbility(playerId, game)) {
return false;
}
//20091005 - 114.2a
if (game.canPlaySorcery(playerId)) {
return game.getPlayer(playerId).canPlayLand();