@@ -531,7 +531,7 @@ namespace {
531531 Depth extension, newDepth, predictedDepth;
532532 Value bestValue, value, ttValue, eval, nullValue, futilityValue;
533533 bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
534- bool captureOrPromotion, dangerous, doFullDepthSearch;
534+ bool captureOrPromotion, doFullDepthSearch;
535535 int moveCount, quietCount;
536536
537537 // Step 1. Initialize node
@@ -847,10 +847,6 @@ namespace {
847847 ? ci.checkSquares [type_of (pos.piece_on (from_sq (move)))] & to_sq (move)
848848 : pos.gives_check (move, ci);
849849
850- dangerous = givesCheck
851- || type_of (move) != NORMAL
852- || pos.advanced_pawn_push (move);
853-
854850 // Step 12. Extend checks
855851 if (givesCheck && pos.see_sign (move) >= VALUE_ZERO)
856852 extension = ONE_PLY;
@@ -883,7 +879,9 @@ namespace {
883879 if ( !RootNode
884880 && !captureOrPromotion
885881 && !inCheck
886- && !dangerous
882+ && !givesCheck
883+ && type_of (move) == NORMAL
884+ && !pos.advanced_pawn_push (move)
887885 && bestValue > VALUE_MATED_IN_MAX_PLY)
888886 {
889887 // Move count based pruning
0 commit comments