givesCheck = pos.move_gives_check(move, ci);
dangerous = givesCheck
|| pos.is_passed_pawn_push(move)
- || type_of(move) == CASTLE
- || ( captureOrPromotion // Entering a pawn endgame?
- && type_of(pos.piece_on(to_sq(move))) != PAWN
- && type_of(move) == NORMAL
- && ( pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
- - PieceValue[MG][pos.piece_on(to_sq(move))] == VALUE_ZERO));
+ || type_of(move) == CASTLE;
// Step 12. Extend checks and, in PV nodes, also dangerous moves
if (PvNode && dangerous)
ttDepth = InCheck || depth >= DEPTH_QS_CHECKS ? DEPTH_QS_CHECKS
: DEPTH_QS_NO_CHECKS;
- // Transposition table lookup. At PV nodes, we don't use the TT for
- // pruning, but only for move ordering.
+ // Transposition table lookup
posKey = pos.key();
tte = TT.probe(posKey);
ttMove = tte ? tte->move() : MOVE_NONE;