Play computer move in webworker to not freeze interface
[vchess.git] / views / rules / Ultima.pug
index 77bfd09..8255a5e 100644 (file)
@@ -1,7 +1,7 @@
 p.boxed
-       | Pieces look the same but behave very differently.
+       | Most pieces look the same but behave very differently.
        | They generally move like an orthodox queen,
-       | but capturing rules are complex: you need to read on :)
+       | but capturing rules are complex.
 
 h3 Specifications
 
@@ -13,17 +13,145 @@ ul
        li Captures: very special.
        li End of game: standard; see below.
 
+h4 Pieces names
+
+p Pieces names refer to the way they capture, which is described later.
+ul
+       li Pawn : pawn or pincer
+       li Rook : coordinator
+       li Knight : long leaper
+       li Bishop : chameleon
+       li Queen : withdrawer
+       li King : king (same behavior as in standard chess)
+p.
+       Besides, a new piece is introduced: the immobilizer, represented by the letter 'm'
+       in FEN diagrams and PGN games. It is represented by an upside-down rook:
+
+figure.diagram-container
+       .diagram
+               | fen:8/8/4m3/8/8/8/3M4/8:
+       figcaption Immobilizers on d2 and e6.
+
 h3 Non-capturing moves
 
-// TODO: short paragraph, only the king moves like an orthodox king
+p
+       | Pawns move as orthodox rooks, and the king moves as usual,
+       | one square in any direction.
+       | All other pieces move like an orthodox queen.
+
+p.
+       When a piece is adjacent to an enemy immobilizer, it cannot move unless
+       the enemy immobilizer is adjacent to a friendly immobilizer or chameleon
+       (cancelling the powers of the opponent's immobilizer).
+p
+       | Note : this corresponds to the "pure rules" described on 
+       a(href="http://www.inference.org.uk/mackay/ultima/ultima.html") this page
+       | , which slightly differ from the initial rules.
+       | The aim is to get rid of the weird suicide rule by weakening the immobilizers lock.
+       | In particular, in the original rules two adjacent immobilizer are stuck forever
+       | until one is captured. Note that it's still the case if all chameleons disappeared.
 
 h3 Capturing moves
 
-// TODO...
+p
+       | Easy case first: the king captures as usual, by moving onto an adjacent square
+       | occupied by an enemy piece. But this is the only piece following orthodox rules,
+       | and also the only one which captures by moving onto an occupied square.
+       | All other pieces capture passively: they land on a free square and captured
+       | units are determined by some characteristics of the movement.
+
+p Note 1: the immobilizer does not capture.
+
+p.
+       Note 2: for passive captures, a 'X' is added at the end of the move notation,
+       to indicate that something was taken (replaying the game is necessary to know where).
+
+h4 Pawns/Pincers
+
+p.
+       If at the end of its movement a pawn is horizontally or vertically adjacent to an
+       enemy piece, which itself is next to a friendly piece (in the same direction),
+       the "pinced" unit is removed from the board.
+
+figure.diagram-container
+       .diagram
+               | fen:7k/5ppp/2N5/2n5/3rB3/8/PPP5/K7:
+       figcaption 1.Pc2c4 captures both coordinator and long leaper.
+
+h4 Coordinators (rooks)
+
+p.
+       Imagine that rook and king are two corners of a rectangle (this works if these
+       two pieces are unaligned).
+       If at the end of a rook move an enemy piece stands in any of the two remaining
+       corners, it is captured.
+
+figure.diagram-container
+       .diagram
+               | fen:8/2b4K/2q5/3p1N1p/8/8/2R5/k7:
+       figcaption 1.Rc5 captures on c7 and h5.
+
+h4 Long leapers (knights)
+
+p.
+       A knight captures exactly as a queen in international draughts game: by jumping
+       over its enemies, as many times as it can/want but always in the same direction.
+       In this respect it is less powerful than a draughts' queen:
+       on the following diagram c8 or f6 cannot be captured.
+       However, the knight does not have to maximize the number of captured units
+       (as is the case in draughts).
+
+figure.diagram-container
+       .diagram
+               | fen:2n4k/3r4/5b2/3p4/1m6/3b4/3N4/K7 d4,d6,d8,a5:
+       figcaption All marked squares captures are playable from d2.
+
+h4 Withdrawer (queen)
+
+p.
+       The queen captures by moving away from an adjacent enemy piece, in the opposite
+       direction (only the long leaper can jump).
+
+figure.diagram-container
+       .diagram
+               | fen:7k/8/8/3Qr3/8/8/8/K7 a5,b5,c5:
+       figcaption 1.Qa5, 1.Qb5 or 1.Qc5 captures the black rook.
+
+h4 Chameleon (bishop)
+
+p The chameleon captures pieces in the way they would capture. So, it
+ul
+       li pinces pawns,
+       li withdraws from withdrawers,
+       li leaps over long leapers,
+       li coordinates coordinators.
+p ...and these captures can be combined.
+
+figure.diagram-container
+       .diagram
+               | fen:7k/8/8/r3pP2/2n5/8/B7/K7 a5,c4,e5:
+       figcaption 1.Bd5 captures all marked pieces.
+
+p.
+       Besides, chameleon immobilizes immobilizers (but cannot capture them since they
+       do not capture).
+
+p.
+       A chameleon captures the king in the same way the king captures, which means that
+       a chameleon adjacent to a king gives check.
 
 h3 End of the game
 
-// TODO: show the situation from Wikipedia page
+p.
+       Checkmate or stalemate as in standard chess. Note however that checks are more
+       difficult to see, because of the exotic capturing rules. For example, on the
+       following diagram the white king cannot move to the marked squares because then
+       the black pawn could capture by moving next to it.
+
+figure.diagram-container
+       .diagram
+               | fen:7k/8/8/p4r/4K3/8/8/8 e5:
+       figcaption 1.Ke5 is impossible
 
 h3 Credits