* Devouring Rage - Fixed that it was not possible to sacrifice 0 spirits.

This commit is contained in:
LevelX2 2013-10-12 02:05:18 +02:00
parent 7a3552433e
commit 3533c30591

View file

@ -68,11 +68,15 @@ public class SacrificeTargetCost extends CostImpl<SacrificeTargetCost> {
if (targets.choose(Outcome.Sacrifice, controllerId, sourceId, game)) { if (targets.choose(Outcome.Sacrifice, controllerId, sourceId, game)) {
for (UUID targetId: targets.get(0).getTargets()) { for (UUID targetId: targets.get(0).getTargets()) {
Permanent permanent = game.getPermanent(targetId); Permanent permanent = game.getPermanent(targetId);
if (permanent == null) if (permanent == null) {
return false; return false;
}
permanents.add(permanent.copy()); permanents.add(permanent.copy());
paid |= permanent.sacrifice(sourceId, game); paid |= permanent.sacrifice(sourceId, game);
} }
if (!paid && targets.get(0).getNumberOfTargets() == 0) {
paid = true; // e.g. for Devouring Rage
}
} }
return paid; return paid;
} }