Pay {0} - fixed that it doesn't work for alternative cost (related to b6a3f7edc1);

This commit is contained in:
Oleg Agafonov 2021-08-06 18:17:13 +04:00
parent 9d27f130bb
commit b073ff8617

View file

@ -610,6 +610,13 @@ public class ManaOptions extends ArrayList<Mana> {
* @return
*/
public boolean enough(Mana mana) {
// 117.5. Some costs are represented by {0}, or are reduced to {0}. The action necessary for a player to pay
// such a cost is the players acknowledgment that he or she is paying it. Even though such a cost requires
// no resources, its not automatically paid.
if (mana.count() == 0) {
return true;
}
for (Mana avail : this) {
if (mana.enough(avail)) {
return true;