- Fixed Lotus Vale and Scorched Ruins allowing to sacrifice one land when resolving the spell (before going to graveyard).

This commit is contained in:
Agetian
2015-12-06 15:19:45 +00:00
parent df7b6716f2
commit 088e05ae96
3 changed files with 13 additions and 5 deletions

View File

@@ -91,9 +91,17 @@ public class SacrificeEffect extends SpellAbilityEffect {
}
else {
boolean isOptional = sa.hasParam("Optional");
choosenToSacrifice = destroy ?
p.getController().choosePermanentsToDestroy(sa, isOptional ? 0 : amount, amount, validTargets, msg) :
p.getController().choosePermanentsToSacrifice(sa, isOptional ? 0 : amount, amount, validTargets, msg);
boolean isStrict = sa.hasParam("StrictAmount");
int minTargets = isOptional ? 0 : amount;
boolean notEnoughTargets = isStrict && validTargets.size() < minTargets;
if (!notEnoughTargets) {
choosenToSacrifice = destroy ?
p.getController().choosePermanentsToDestroy(sa, minTargets, amount, validTargets, msg) :
p.getController().choosePermanentsToSacrifice(sa, minTargets, amount, validTargets, msg);
} else {
choosenToSacrifice = CardCollection.EMPTY;
}
}
for (Card sac : choosenToSacrifice) {