-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interaction of blocking requirements and restrictions prevents game from proceeding #11661
Comments
Grand Melee - (Gatherer) (Scryfall) (EDHREC)
Loyal Pegasus - (Gatherer) (Scryfall) (EDHREC)
|
The main issue is that solving this correctly is computationally infeasible. Right now we're trying to do it in a single pass, which means that sometimes the rules system assumes you can do something impossible and then doesn't let you continue the game. I've looked into this some a few months ago, but it was getting messy enough that I would definitely want to rewrite the whole thing before doing a PR of it and I decided to focus on easier issues instead. My idea was that rather than doing a single pass, we have a few different "blocking strategy" engines which create possible blocks that follow the requirements but not necessarily all restrictions. We then see which of those satisfies the most restrictions, and then only allow blocks if the number of restrictions satisfied is at least as many as the best of those strategies. This would always allow play to proceed, the failure case would be allowing some illegal blocks when none of the engines are able to find any of the legal blocks. If the engines are reasonably comprehensive, this would only happen in extremely rare cases. |
That fixed the most common cause of the problem ("can't be blocked except by X or more"+must block) but there are a wide range of more complex situations that could cause the same basic issue. |
If you find bad use cases then report it here (if human players can't continue game due bad blocking restrictions). |
Another bad use case we ran into in my Commander games: There were only flying attackers and a blocker that must block but didn't have reach or flying. |
One example from an XDHS game today: [[Grand Melee]] and [[Loyal Pegasus]]
This is a deep bug in the combat engine. It's a major problem because it's not just incorrect rules enforcement, but prevents the game from continuing. Does anyone have ideas on how to go about fixing it? Failing that, any ideas on workarounds to alleviate it?
Related issues (presumably same root cause but variations on the general theme):
The text was updated successfully, but these errors were encountered: