Added test.

This commit is contained in:
LevelX2 2016-03-07 18:30:58 +01:00
parent 0a31a8b479
commit d7ae1c51c9
4 changed files with 126 additions and 57 deletions

View file

@ -27,7 +27,6 @@
*/
package mage.abilities.costs.common;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.Cost;
@ -52,7 +51,7 @@ public class TapTargetCost extends CostImpl {
this.text
= new StringBuilder("Tap ")
.append((target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") || target.getTargetName().startsWith("another"))
? "" : CardUtil.numberToText(target.getMaxNumberOfTargets()) + " ")
? "" : CardUtil.numberToText(target.getMaxNumberOfTargets()) + " ")
.append(target.getTargetName()).toString();
}
@ -64,7 +63,7 @@ public class TapTargetCost extends CostImpl {
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
if (target.choose(Outcome.Tap, controllerId, sourceId, game)) {
for (UUID targetId : (List<UUID>) target.getTargets()) {
for (UUID targetId : target.getTargets()) {
Permanent permanent = game.getPermanent(targetId);
if (permanent == null) {
return false;