* Plow Under - Fixed tooltip text.

This commit is contained in:
LevelX2 2014-08-21 08:35:43 +02:00
parent 2aad58b04a
commit af8c5880a1
2 changed files with 13 additions and 4 deletions

View file

@ -28,10 +28,11 @@
package mage.sets.urzasdestiny;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetLandPermanent;
/**
@ -48,7 +49,7 @@ public class PlowUnder extends CardImpl {
// Put two target lands on top of their owners' libraries.
this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true));
this.getSpellAbility().addTarget(new TargetLandPermanent(2));
this.getSpellAbility().addTarget(new TargetLandPermanent(2,2, new FilterLandPermanent("lands"), false));
}
public PlowUnder(final PlowUnder card) {

View file

@ -38,6 +38,8 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.UUID;
import mage.target.Target;
import mage.util.CardUtil;
/**
* @author BetaSteward_at_googlemail.com
@ -97,9 +99,15 @@ public class PutOnLibraryTargetEffect extends OneShotEffect {
if (this.staticText != null && !this.staticText.isEmpty()) {
sb.append(staticText);
} else {
Target target = mode.getTargets().get(0);
sb.append("Put ");
if (mode.getTargets().get(0).getMaxNumberOfTargets() == 0) {
if (target.getMaxNumberOfTargets() == 0) {
sb.append("any number of ");
} else {
if (target.getMaxNumberOfTargets() > target.getNumberOfTargets()) {
sb.append("up to ");
}
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets(), "a")).append(" ");
}
sb.append("target ").append(mode.getTargets().get(0).getTargetName()).append(" on ");
sb.append(onTop ? "top" : "the bottom").append(" of it's owner's library");