Some minor changes to framework classes.

This commit is contained in:
LevelX2 2014-09-14 23:57:55 +02:00
parent a407ec6fd9
commit d498df6a54
3 changed files with 23 additions and 1 deletions

View file

@ -45,6 +45,7 @@ import mage.target.TargetCard;
import java.util.List;
import java.util.UUID;
import mage.util.CardUtil;
/**
*
@ -216,7 +217,22 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff
}
sb.append("put ").append(filter.getMessage()).append(" from among them onto the ");
} else {
sb.append(". Put one of them into your ");
sb.append(". Put ");
if (numberToPick.calculate(null, null, this) > 1 ) {
if (upTo) {
if (numberToPick.calculate(null, null, this) == (numberOfCards.calculate(null, null, this))) {
sb.append("any number");
} else {
sb.append("up to ").append(CardUtil.numberToText(numberToPick.calculate(null, null, this)));
}
} else{
sb.append(CardUtil.numberToText(numberToPick.calculate(null, null, this)));
}
} else {
sb.append("one");
}
sb.append(" of them into your ");
}
}
sb.append(targetPickedCards.toString().toLowerCase());

View file

@ -70,6 +70,9 @@ public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect
if (creature != null && player != null) {
while (!choice.isChosen()) {
player.choose(Outcome.Protect, choice, game);
if (!player.isInGame()) {
return false;
}
}
FilterCard protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter();
protectionFilter.add(new ColorPredicate(choice.getColor()));

View file

@ -93,6 +93,9 @@ public class TargetSource extends TargetObject {
else {
addTarget(id, source, game, notTarget);
}
if (object != null) {
game.informPlayers("Selected " + object.getLogName() + " as source");
}
}
}