11-30-2019, 10:25 PM
(This post was last modified: 11-30-2019, 10:37 PM by unhandyandy.)
1. In all variations of Brandub, the thralls cannot move to the corners.
2. In most variations of Brandub, the king can return to the center.
Here's a modified lud, see if I did it right.
2. In most variations of Brandub, the king can return to the center.
Here's a modified lud, see if I did it right.
Code:
(game "Brandub"
(players 2)
(equipment {
(taflBoard 7)
(define "custodial" (custodial (lastToMove) Orthogonal limit:1 of:(isPiece (to) #1) by:(or {(isFriend (who (step))) (in (step) (corners)) (and (in (step) (centre)) (isZero (what (step))))}) effect:(remove (to))))
(piece "Thrall" P1 (slide Orthogonal along:(in (step) (empty))
toRule:(not (in (to) (union (centre) (corners))))
(then
(or {
("custodial" "Thrall2")
(surrounded (lastToMove) Orthogonal
of:(and (isPiece (to) "Jarl2") (in (to) (expand origin:(middle) 1 Orthogonal)))
by:(or (isFriend (who (step))) (in (step) (centre)))
effect:(checkmate P2)
)
(custodial (lastToMove) Orthogonal limit:1
of:(and (isPiece (to) "Jarl2") (not (in (to) (expand origin:(middle) 1 Orthogonal))))
by:(or (isFriend (who (step))) (in (step) (corners)))
effect:(checkmate P2)
)
}
)
)
)
)
(piece "Thrall" P2 (slide Orthogonal along:(in (step) (empty))
toRule:(not (in (to) (union (centre) (corners))))
(then ("custodial" "Thrall1") ) ) )
(piece "Jarl" P2 (slide Orthogonal along:(in (step) (empty)) (then ("custodial" "Thrall1") ) ))
}
)
(rules
(start
{
(fill "Thrall1" {"D1" "D2" "A4" "B4" "F4" "G4" "D6" "D7"})
(fill "Thrall2" {"D3" "C4" "E4" "D5"})
(place "Jarl2" (middle))
}
)
(play (byPiece))
(end
{
(if (reachedRegion (indexOf "Jarl2") (corners) ) (result P2 Win))
(if (isCheckmate P2) (result P1 Win))
}
)
)
)
(option <1> "Rules/ReturnToThrone" <>)
(option <1> "Rules/NoReturnToThrone" <toRule:(not (= (to) (middle)))>)
(metadata
{ "rules" "The rules of Brandub are described in http://tafl.cyningstan.com/page/171/brandub."}
{ "source" "http://tafl.cyningstan.com/page/171/brandub"}
{ "P1Colour" "Black" }
{ "P2Colour" "White" }
)