the sacrifice target cost was optional, but SacrificeCost.canPay first checks if there are valid targets. In this scenario there were none, but the spell should still be playable
This commit is contained in:
Ingmar Goudt 2021-08-22 12:01:10 +02:00
parent 6c837e733b
commit 271f7b812f
2 changed files with 21 additions and 0 deletions

View file

@ -87,6 +87,10 @@ public class SacrificeTargetCost extends CostImpl {
}
}
}
// solves issue #8097, if a sacrifice cost is optional and you don't have valid targets, then the cost can be paid
if(validTargets == 0 && targets.get(0).getMinNumberOfTargets() == 0){
return true;
}
return false;
}