mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
* Devouring Rage - Fixed that it was not possible to sacrifice 0 spirits.
This commit is contained in:
parent
7a3552433e
commit
3533c30591
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue