mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
fix #8097,
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:
parent
6c837e733b
commit
271f7b812f
2 changed files with 21 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue