Here you find 7 Doublecheck.cql statements.

First All kinds, 2nd with knight and rook etc. Just copy the part you need to an .cql file.

 

Created by Peter Boll.

(match
:pgn heijden.pgn
:output DoublecheckAll.pgn
(position :flipcolor :variations :attackcount A k 2) ; any doublechecks
)
(match
:pgn heijden.pgn
:output DoublecheckNR.pgn
(position
:variations
:flipcolor
:and
(
(position :attackcount N k 1)
(position :attackcount R k 1) ; Rook and Knight give a Doublecheck
)
)
)
(match
:pgn heijden.pgn
:output DoublecheckBR.pgn
(position
:variations
:flipcolor
:and
(
(position :attackcount B k 1)
(position :attackcount R k 1) ; Rook and Bishop give a Doublecheck
)
)
)
(match
:pgn heijden.pgn
:output DoublecheckQR.pgn
(position
:variations
:flipcolor
:and
(
(position :attackcount Q k 1)
(position :attackcount R k 1) ; Rook and Queen give a Doublecheck
)
)
)
(match
:pgn heijden.pgn
:output DoublecheckQB.pgn
(position
:variations
:flipcolor
:and
(
(position :attackcount B k 1)
(position :attackcount Q k 1) ; Queen and Bishop give a Doublecheck
)
)
)
(match
:pgn heijden.pgn
:output DoublecheckBN.pgn
(position
:variations
:flipcolor
:and
(
(position :attackcount B k 1)
(position :attackcount N k 1) ; Knight and Bishop give a Doublecheck
)
)
)
(match
:pgn heijden.pgn
:output DoublecheckQN.pgn
(position
:variations
:flipcolor
:and
(
(position :attackcount Q k 1)
(position :attackcount N k 1) ; Queen and Knight give a Doublecheck
)
)
)
(match
:pgn heijden.pgn
:output DoublecheckPromotion.pgn
(position
:variations
:flipcolor
:sequence
((position :movefrom P?7 :moveto ??8) ; Last move is a promotion
; (position :attackcount A k 2) ; any promotion a doublecheck.

(position
:and
(
(position :attackcount Q k 1)
(position :attackcount N k 1) ; Queen and Knight give a Promotion Doublecheck
) ; end and
)
) ; end sequence
)
)

 Many examples can be found in the Harold van der Heijden V database 2015.

Here a few Promotion examples: