* Game: fixed that declare blocker step skips all the time on disabled "STOP skip on any/zero blockers" preferences (#6308);

This commit is contained in:
Oleg Agafonov 2020-02-29 23:27:11 +04:00
parent 6769b1d536
commit ca9542d3de

View file

@ -1633,7 +1633,15 @@ public class HumanPlayer extends PlayerImpl {
int possibleBlockersCount = game.getBattlefield().count(filter, null, playerId, game);
boolean canStopOnAny = possibleBlockersCount != 0 && getControllingPlayersUserData(game).getUserSkipPrioritySteps().isStopOnDeclareBlockersWithAnyPermanents();
boolean canStopOnZero = possibleBlockersCount == 0 && getControllingPlayersUserData(game).getUserSkipPrioritySteps().isStopOnDeclareBlockersWithZeroPermanents();
if (!canStopOnAny && !canStopOnZero) {
// skip declare blocker step
// as opposed to declare attacker - it can be skipped by ANY skip button TODO: make same for declare attackers and rework skip buttons (normal and forced)
boolean skipButtonActivated = passedAllTurns
|| passedUntilEndStepBeforeMyTurn
|| passedTurn
|| passedUntilEndOfTurn
|| passedUntilNextMain;
if (skipButtonActivated && !canStopOnAny && !canStopOnZero) {
return;
}