mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
- Fixed #8468
This commit is contained in:
parent
7da2985765
commit
cb6498e0d7
1 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
@ -33,7 +32,8 @@ public class ExileFromGraveCost extends CostImpl {
|
|||
this.addTarget(target);
|
||||
if (target.getMaxNumberOfTargets() > 1) {
|
||||
this.text = "exile "
|
||||
+ (target.getNumberOfTargets() == 1 && target.getMaxNumberOfTargets() == Integer.MAX_VALUE ? "one or more"
|
||||
+ (target.getNumberOfTargets() == 1
|
||||
&& target.getMaxNumberOfTargets() == Integer.MAX_VALUE ? "one or more"
|
||||
: ((target.getNumberOfTargets() < target.getMaxNumberOfTargets() ? "up to " : ""))
|
||||
+ CardUtil.numberToText(target.getMaxNumberOfTargets()))
|
||||
+ ' ' + target.getTargetName();
|
||||
|
@ -81,17 +81,19 @@ public class ExileFromGraveCost extends CostImpl {
|
|||
if (targets.choose(Outcome.Exile, controllerId, source.getSourceId(), game)) {
|
||||
for (UUID targetId : targets.get(0).getTargets()) {
|
||||
Card card = game.getCard(targetId);
|
||||
if (card == null || game.getState().getZone(targetId) != Zone.GRAVEYARD) {
|
||||
if (card == null
|
||||
|| game.getState().getZone(targetId) != Zone.GRAVEYARD) {
|
||||
return false;
|
||||
}
|
||||
exiledCards.add(card);
|
||||
}
|
||||
Cards cardsToExile = new CardsImpl();
|
||||
cardsToExile.addAll(exiledCards);
|
||||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
controller.moveCardsToExile(
|
||||
cardsToExile.getCards(game), source, game, true,
|
||||
CardUtil.getExileZoneId(game, source),
|
||||
CardUtil.getSourceLogName(game, source)
|
||||
sourceCard.getName()
|
||||
);
|
||||
if (setTargetPointer) {
|
||||
source.getEffects().setTargetPointer(new FixedTargets(cardsToExile, game));
|
||||
|
|
Loading…
Reference in a new issue