Improved message for DredgeAbility

This commit is contained in:
North 2012-08-29 23:12:36 +03:00
parent 545a93ed6d
commit 7610013628

View file

@ -92,9 +92,13 @@ class DredgeEffect extends ReplacementEffectImpl<DredgeEffect> {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Card sourceCard = game.getCard(source.getSourceId());
if (sourceCard == null) {
return false;
}
StringBuilder sb = new StringBuilder();
sb.append("Put exactly ").append(amount).append(" cards from the top of your library into your graveyard?");
sb.append(" If you do, return this card from your graveyard to your hand. Otherwise, draw a card.");
sb.append(" If you do, return ").append(sourceCard.getName()).append(" from your graveyard to your hand. Otherwise, draw a card.");
Player player = game.getPlayer(source.getControllerId());
if (player != null && player.getLibrary().size() >= amount && player.chooseUse(outcome, sb.toString(), game)) {