Can block any number of creatures - fixed that it can be broken with some of "can block an additional creature" effects

This commit is contained in:
Oleg Agafonov 2025-04-27 23:34:58 +04:00
parent db9bdc05c2
commit 49c28458ec
6 changed files with 24 additions and 24 deletions

View file

@ -2049,7 +2049,8 @@ public class TestPlayer implements Player {
int numBlocked = blocked.size();
// Can't block any more creatures
if (++numBlocked > blocker.getMaxBlocks()) {
// maxBlocks = 0 equals to "can block any number of creatures"
if (blocker.getMaxBlocks() > 0 && ++numBlocked > blocker.getMaxBlocks()) {
return false;
}