mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Some minor changes to framework classes.
This commit is contained in:
parent
a407ec6fd9
commit
d498df6a54
3 changed files with 23 additions and 1 deletions
|
@ -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());
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue