%\card{Rule}{
%This is a test of card rule. This is supposed to contain lots of lines, and
%possibly icons. For example, this is a Mixed (Black or White) King \iMK which is blended with
%the rest of the rule. Note it bumps line heights.\\
%\iWK\iWQ\iWB\iWN\iWR\iWP\\
%\iBK\iBQ\iBB\iBN\iBR\iBP\\
%\iMK\iMQ\iMB\iMN\iMR\iMP\\
%\inoK\iBoard\iWA\iBA\iMA\\
%}{...}{...}

% Beginning of Turn
\newcommand{\BT}{Play this card at the beginning of your turn.}

% End of Turn
\newcommand{\ET}{Play this card at the end of your turn.}

% Turn Replacement
\newcommand{\TR}{Replace your turn by this card.}

% Continuous Effect
\newcommand{\CE}{$\circlearrowleft$}

% SWap
\newcommand{\SW}{$\leftrightarrow$}

\card{Jumper}{
One of your Rooks can, at the end of its move, continue on its line for two
more squares by jumping over one piece, be it yours or your opponent's. This
move can only happen if it takes a piece.
}{\ET}{\iWR}

\card{Regency}{
You are making your King disappear from the board for your othe next turn. Before
your next turn, you will have to place him back, by putting it on any square
on the side of the board.
}{\ET}{\iWK}

\card{Tango}{
Move any of your pieces by doing the same exact move you just did (same
direction, same distance), as long as the move is valid. For example, no
other piece should be in the path, except when reproducing Knight moves.
This move may take another piece.
}{\ET}{\iWA}

\card{Scrying}{
Write down on a piece of paper your guess of which piece your opponent is
going to play. If you are right, then his move is cancelled, and he will
forfeit his turn.
}{\ET}

\card{\CE Origins}{
Players can no longer play any card. The effect of this card lasts until one
King is in check.
}{\ET}

\card{Apartheid}{
Remove from the board all Black Pawns located on a white square, and all White
Pawns located on a black square.
}{\ET}{\iMP}

\card{\CE Trap}{
While playing this card, write down on a piece of paper the location of one
empty square, or occupied by one of your pieces. As soon as an opposite piece
lands on that square, a bomb explodes and the piece is removed from the
board. If it's the King, the bomb explodes but the King is unaffected.
}{\ET}{\iBoard\inoK}

\card{Stable}{
Swap one of your Knights with one of your Rooks.
}{\ET}{\iWN\SW\iWR}

\card{Rewind}{
Put a piece of your opponent back to a square it could've started at the
beginning of the game, as long as this square is empty.
}{\ET}{\iBA}

\card{Ambition}{
Replace one of your Pawns by any piece your opponent may have taken from you,
except the Queen.
}{\ET}{\iWP}

\card{\CE Black hole}{
Chose one empty square of the board to be removed permanently until the end of
the game. No piece will be able to stop on it or pass over it.
}{\ET}{\iBoard}

\card{\CE Ceasefire}{
It is now impossible for any player to take any piece. The effect of this card
lasts until one King is in check.
}{\ET}

\card{Shield}{
Your opponent cannot take the piece you just moved this turn.
}{\ET}

\card{\CE Stand-in}{
If the start square of your King is empty, you can spawn another King there.
From now on, you can end a turn with one of your King to be in check, and you
can even have it being taken. This card's effect lasts until you have only
one King left.
}{\ET}{\iWK}

\card{Chronometer}{
Your opponent has 15 seconds to play his next turn. Past this time, he will
forfeit his turn.
}{\ET}

\card{\CE Church}{
Chose an empty square of the board to become the Church. Until the end of the
game, any piece exitting this square can do so as a Bishop.
}{\ET}{\iBoard}

\card{Trash can}{
Discard any card marked with \CE that is currently in effect in the game. 
}{\ET}

\card{\CE Respect}{
As soon as this card starts its effect, any player making negative comments
about the card game immediately looses a Pawn, choosen by his opponent.
}{\ET}{\iMP}

\card{\CE Starving}{
The two players now have to take one piece every turn. The effect of this
card lasts until one of the players cannot take a piece.
}{\ET}

\card{Religulous}{
Swap a Knight of your opponent with one of his Bishop.
}{\ET}{\iBB\SW\iBN}

% 20
\card{Kangaroo}{
Transform one Knight on the board into a Kangaroo. The Kangaroo moves as a
Knight, but twice. The first move has to end up on an empty square. The
Kangaroo cannot stop after its first move.
}{\ET}{\iMN}

\card{Princess}{
If you no longer have a Queen, and its starting square is empty, spawn a
Princess there. A Princess moves in eight directions, as a Queen, but only for
one or two squares.
}{\ET}{\iWQ}

\card{\CE Magnetism}{
One of your pieces becomes a magnet. From now on, any piece located on one of
its eight surrounding squares will be stuck.
}{\ET}{\iWA}

\card{Schizophrenic}{
Swap one of your Bishops with one of your opponent's.
}{\ET}{\iWB\SW\iBB}

\card{Chivalry}{
Swap one of your Bishop with one of your Knights.
}{\ET}{\iWB\SW\iWN}

\card{Kidnapping}{
Your opponent turns his head for 10 seconds, and you take one of his pieces.
He then has 10 seconds to figure out which piece you took, and on which square
it was placed. If he is wrong, the piece will be forfeit.
}{\ET}{\iBA}

\card{Cheerleaders}{
Move two of your Pawns in the same diagonal move, without taking any opponent
piece.
}{\ET}{\iWP\iWP}

\card{Depression}{
Remove one of your opponent's Pawn whose all surrounding squares are empty.
}{\ET}{\iBP}

\card{Disintegrate}{
Remove one of your own pieces from the board.
}{\ET}{\iWA}

\card{Vampire}{
The piece you just moved and took another piece becomes a piece of that type.
}{\ET}{\iWA}

\card{Round Robin}{
Rotate the board 90 degrees in the direction you want. Pawns are still moving
towards their opponent. Any Pawn on the last row automatically gets promoted,
and any Pawn on the second row can now move two squares.
}{\ET}{\iBoard}

\card{\CE Barrier}{
Put a two squares-long barrier, straight or in square angle, between any square
on the board. This barrier cannot be crossed, except by pieces which moves are
already naturally jumping above obstacles.
}{\ET}{\iBoard}

\card{Schisme}{
Any Bishop which can freely move one square horizontally or vertically without
taking any piece has to do so. Your opponent moves his Bishops first.
}{\ET}{\iWB\iWB\iBB\iBB}

\card{Asylum}{
Swap one of your Bishops with one of your Rooks.
}{\ET}{\iWB\SW\iWR}

\card{Provocation}{
During his turn, your opponent has to take one of your pieces. If he cannot, he
will forfeit his turn.
}{\ET}

\card{\CE Inception}{
One of your opponent's pieces falls deep asleep, and cannot move anymore, until
it is taken, or your opponent's King is in check.
}{\ET}{\iBA}

\card{Boo!}{
Move a Pawn of your opponent one or two squares back.
}{\ET}{\iBP}

\card{Urbanism}{
Swap one of your Rooks with one of your opponent's Rooks.
}{\ET}{\iWR\SW\iBR}

\card{Carb}{
One of your Pawn becomes a Crab. The Crab moves in diagonal, forward or
backward, as a Bishop, but only one square. Should it arrive on the last row,
it will be promoted, as a normal Pawn.
}{\ET}{\iWP}

% 40
\card{\CE Coup d'État}{
Your King becomes a mere Prince. It will moves as usual, but becomes a normal
piece, able to be taken by your opponent. Another of your Pawns, Bishops or
Knights takes the throne. This piece is the one your opponent will have to
checkmate.
}{\ET}{\iWK\iWB\iWN\iWP}

\card{Official visit}{
Swap your Kig with your opponent's, as long as it doesn't cause any of them to
be in check.
}{\ET}{\iWK\SW\iBK}

\card{Zombies}{
Each opponent puts back two previously captured Pawns on the second row, one
after the other, starting with your opponent.
}{\ET}{\iWP\iWB\iBP\iBP}

\card{\CE Flood}{
The board is reduced to the smallest possible rectangle containing all of the
pieces currently on the board.
}{\ET}{\iBoard}

\card{\CE Diggers}{
Mark any two squares of the board. These are now connected, and any piece standing
on them can, instead of their normal move, go to the other one.
}{\ET}{\iBoard}

\card{\CE Poison}{
Mark one of your pieces to become poisoned. If an opponent piece takes it, both
are removed from the board.
}{\ET}{\iWA}

\card{A-Bomb}{
As long as it didn't take any piece, the piece you just moved explodes. It is
then removed from the board, as well as all the pieces located on its eight
surrounding squares.
}{\ET}{\inoK}

\card{Deserters}{
Swap one of your Knights with one of your opponent's.
}{\ET}{\iWN\SW\iBN}

\card{\CE Omertà}{
The next player to say the name of a piece, except the King, has to forfeit
a piece of this type. If he no longer has a piece of this type, the card
continues its effect. This card is discarded once its effect triggers.
}{\ET}{\iMA}

\card{Exile}{
You can put one of your opponent's piece (except the King) in one empty square
located at the four corners of the board. Your opponent won't be able to move
this piece next turn.
}{\ET}{\inoK\iBA}

\card{Quadrille}{
All pieces on the squares in all four corners of the board move 90 degrees in
the direction of your choice. Since the moves are simultaneous, no piece is
being taken.
}{\ET}{\iMA}

\card{\CE Peace}{
Mark one of your pieces, except the King, to become non violent until the end of the
game. This piece can no longer take any piece, nor be taken, but can still put
the King in check.
}{\ET}{\iWA\inoK}

\card{Rebuke}{
Swap one of your opponent's Bishops with one of his Rooks.
}{\ET}{\iBB\SW\iBR}

\card{Laser}{
One of your Queens, Bishops or Rooks shoots a laser in any of its usual moving
direction. Any piece on the path of the laser, friendy or not, is destoyed and
removed from the board. Kings are not affected, but they don't stop the ray.
}{\ET}{\iWQ\iWB\iWR\inoK}

\card{\CE Neutrality}{
Mark an opposing piece (except the King or Queens) to become a neutral one. A
neutral piece can be used by both players, and can take pieces from both
players.
}{\ET}{\iBA\inoK}

\card{\CE Camel}{
Mark any Knight to become a Camel. Like a Knight, a Camel can jump over any
obstacle. But instead of moving in a $2\uparrow 1\rightarrow$ pattern,
a Camel moves in a $3\uparrow 2\rightarrow$ pattern.
}{\ET}{\iMN}

\card{Diktat}{
Choose which kind of piece (except King or Queen) that your opponent will have
to move at his next turn.
}{\ET}{\iBA\inoK}

\card{Jenga}{
If you can keep this card balanced on your King for at least 5 seconds, you
will be able to either take a previously taken piece back, and put it on an
empty square of your choice, or play another turn.
}{\ET}

\card{\CE Attentat}{
While playing this card, write down on a piece of paper the location of one
empty square, or occupied by one of your pieces. As soon as an opposite piece
lands on that square, a bomb explodes and the piece is removed from the
board. If it's the King, the bomb explodes but the King is unaffected.
}{\ET}{\iBA\inoK}

\card{Stall}{
Swap one of your opponent's Knight with one of his Rooks.
}{\ET}{\iBN\SW\iBR}

\card{Paladin}{
Choose one Knight on the board to become religious. It will now move like a
Bishop.
}{\ET}{\iMN}

% 60
\card{Meritorious}{
If you have only one or two Pawns left on the board, you can use this card to
promote them into a piece of your choice, Queen excepted.
}{\ET}{\iWP}

\card{\CE Fair trade}{
For three turns, swap your seat with your opponent, but don't swap your decks.
During these three moves, a player is perfectly able to win using his
new color. Note that the notion of turn is tied to the player, and not to the
color on the board.
}{\ET}

\card{Encore}{
Take back one of your previously taken piece (except the Queen), and put it
on an empty square where it could've started at the beginning of the game.
}{\ET}

\card{Cannibalism}{
Take one of your pieces with another one of your own.
}{\TR}{\iWA}

\card{Modesty}{
Move any of your pieces as if it was a Pawn. If you move a piece this way on
the last row, you can promote it as a Pawn.
}{\TR}{\iWA}

\card{Trailer}{
Move a Pawn, without taking any piece, and pull the piece behind it, so it
stays immediately behind it.
}{\TR}{\iWP}

\card{Leapfrog}{
Move any your piece, following its usual movement rules, but only by hopping
over your own pieces. You cannot take a piece using this move.
}{\TR}{\iWA}

\card{\CE Fusion}{
Fuse any of your piece with any other (effectively removing one of them from
the game). The resulting piece can now move as any of the two pieces. The King
cannot fuse.
}{\TR}{\iWA}

\card{Good friends}{
Swap your Queen with your opponent's.
}{\TR}{\iWQ\SW\iBQ}

\card{Prayer}{
Move any of your piece as if it was a Bishop. You cannot take a piece with this
move.
}{\TR}{\iWA}

\card{Favorite}{
Move any of your pieces (except Pawns) the same way as a Queen. You cannot take
a piece using this move.
}{\TR}{\iWA}

\card{Double}{
Move simultaneously two pieces of the same type - two Bishops, two Knights,
two Rooks or two Pawns - using their normal moving rule.
}{\TR}{\iWB\iWN\iWR\iWP}

\card{Traitor}{
Move a piece of your opponent using its normal movement rules. You cannot take
a piece of your opponent while doing this move.
}{\TR}{\iBA}

\card{Courting}{
Move one of your Knights on an empty square surrounding your Queen.
}{\TR}{\iBN}

\card{Vendetta}{
Swap one of your Pawns with one of your Bishops, Knights or Rooks.
}{\TR}{\iWB\iWN\iWR\iWP}

\card{Back up}{
One of your Pawns takes an opponent's piece by moving backwards, but still on
one diagonal square.
}{\TR}{\iWP}

\card{Checkers}{
Move one of your Pawns as if you were playing checkers, by jumping over any
pieces in diagonal. However, you don't take the pieces you have jumped over.
}{\TR}{\iWP}

\card{Cohabitation}{
Move one of your pieces on the same square of one of your other pieces. If your
opponent lands on this square, both pieces are taken.
}{\TR}{\iWA}

\card{Mortar}{
If you take a piece during your turn, you may play this card and put your piece
back where it was at the beginning of your turn.
}{\ET}{\iWA}

\newcommand{\sN}{
\begin{tikzpicture}[y=0.80pt, x=0.80pt, xscale=0.2, yscale=-0.2, inner sep=0pt, outer sep=0pt]
\input{icons/sBN}
\end{tikzpicture}
}
\card{Cylinder}{
For this move, the board becomes a cylinder, and the left and right sides are
linked.\\
\vspace{0.10in}
\begin{tikzpicture}[remember picture, x=0.15in, y=0.15in, text ragged]
    \node [inner sep=0pt, outer sep=0pt, minimum size=0pt, text width=0pt] (CylinderBoard) {};
    \foreach \i in {1,...,12}{
        \foreach \j in {1,...,8}{
            \pgfmathsetmacro{\sq}{max(0, (-1)^(\i+\j))};
            \pgfmathsetmacro{\weight}{(\sq + 2 * max(0, \sq * (-1)^(floor((\i - 3) / 8) + floor((\j - 1) / 8)))) * 30};
            \pgfmathsetmacro{\rx}{\i+1};
            \pgfmathsetmacro{\ry}{\j+1};
            \fill [gray!\weight] (\i, \j) rectangle (\rx, \ry);
        }
    }
    \draw [cap = rect] (3, 1) -- (11, 1) (3, 9) -- (11, 9);
    \draw [style = dashed, opacity = 0.5] (3, 1) -- (3, 9) (11, 1) -- (11, 9);
\end{tikzpicture}
\begin{tikzpicture}[remember picture, overlay, x=0.15in, y=0.15in, text ragged]
    \node [xshift=96.5, yshift=34] at (CylinderBoard.south) { \sN };
    \begin{scope}[gray!50, opacity=0.2]
        \node [xshift=116.2, yshift=44] at (CylinderBoard.south) { \sN };
    \end{scope}
    \begin{scope}[gray, opacity=0.2]
        \node [xshift=117.2, yshift=44.5] at (CylinderBoard.south) { \sN };
    \end{scope}
    \begin{scope}[black!50]
        \node [xshift=118.2, yshift=45] at (CylinderBoard.south) { \sN };
    \end{scope}

    \begin{scope}[black!50]
        \node [xshift=9.8, yshift=34] at (CylinderBoard.south) { \sN };
    \end{scope}
    \begin{scope}[gray!50, opacity=0.5]
        \node [xshift=29.5, yshift=44] at (CylinderBoard.south) { \sN };
    \end{scope}
    \begin{scope}[gray, opacity=0.5]
        \node [xshift=30.5, yshift=44.5] at (CylinderBoard.south) { \sN };
    \end{scope}
    \node [xshift=31.5, yshift=45] at (CylinderBoard.south) { \sN };

    \node [xshift=17, yshift=40] at (CylinderBoard.south) [black!50] {
        \begin{tikzpicture}[y=0.80pt, x=0.80pt, xscale=0.2, yscale=-0.2, inner sep=0pt, outer sep=0pt]
            \draw [->, line cap = round, double] (0, 35) -- (70, 0);
        \end{tikzpicture}
    };
    \node [xshift=103.7, yshift=40] at (CylinderBoard.south) [black!80] {
        \begin{tikzpicture}[y=0.80pt, x=0.80pt, xscale=0.2, yscale=-0.2, inner sep=0pt, outer sep=0pt]
            \draw [->, line cap = round, double] (0, 35) -- (70, 0);
        \end{tikzpicture}
    };
\end{tikzpicture}
}{\BT}{\iBoard}


% 80
\card{Airborne}{
Put back one of your previously taken Pawns into one of the four squares in
the middle of the board, as long as it is empty.
}{\TR}{\iWN}

\card{Chameleon}{
Move one of your pieces (except a Pawn) in the same manner than the piece
your opponent just moved. This move cannot take a piece of your opponent.
}{\TR}{\iWA}

\card{Push}{
One of your Pawn moves into the occupied square in front of it, effectivelly
pushing that piece into the next square. If that square is also occupied,
that piece is also pushed, and so on and so forth. If a piece is pushed
outside the boundaries of the board, it is removed from the game.
}{\TR}{\iWP}

\card{Zealot}{
If one of your Bishops is able to take more than one piece of your opponent,
you may play this card. Your Bishop will make itself explode in four parts,
each of them going in diagonal, to take pieces from your opponent. Your Bishop
is then removed from the game.
}{\TR}{\iWB}

\card{Charge!}{
Move any number of your Pawns one square forward, as long as they have a free
square in front of them.
}{\TR}{\iWP\iWP\iWP\iWP}

\card{Sacrifice}{
If one of your Knights is able to take more than one piece of your opponent,
you may play this card. Your Knight will make itself explode in eight parts,
each of them landing in its potential movement destination, to take pieces
from your opponent. Your Knight is then removed from the game.
}{\TR}{\iWN}

\card{Periphery}{
Move one of your pieces (except a Pawn) from a square on the side of the board
to an empty square on the side of the board.
}{\TR}{\iWA}

\card{Fantoche}{
If your King is in check, you can play this card. Swap one of your King with
one of your Pawns.
}{\TR}{\iWK\SW\iWP}

\card{Scouts}{
Move two of your Pawns two squares in front of them.
}{\TR}{\iWP\iWP}

\card{Breakthrough}{
One of your Pawns takes a piece by moving straight forward.
}{\TR}{\iWP}

\card{Pomppufiilis}{
Move one of your Bishops by making it bounce on the sides of the board.
}{\TR}{\iWB}

\card{Bulldozer}{
Move one of your Queens, Bishops or Rooks using its natural movement rules, but
by taking all the opponent's pieces in its path. Your piece only stops when
it reached the side of the board, or one of your pieces.
}{\TR}{\iWQ\iWB\iWR}

\card{Voodoo}{
If your King is in check, or even checkmate, then you may play this card. Take
one piece your opponent previously took, and put it between your King and the
menacing piece.
}{\TR}{\iWK}

\card{Foursquare}{
If three of the four corners of the board are occupied by a piece, then you may
play this card. Move one of your piece in the remaining free corner.
}{\TR}{\iWA}

\card{Home}{
Move one of your pieces (except Pawns) on a square it could've been at the
beginning of the game. This move may take a piece of your opponent.
}{\TR}{\iWA}

\card{Private jet}{
Move your King to any free square of the board.
}{\TR}{\iWK}

\card{Darling}{
Either move your King on a free square surrounding your Queen, or move your
Queen on a free square surrounding your King.
}{\TR}{\iWK\iWQ}

\card{Castlerock}{
If your King and one of your Rooks are on the same line, and there's only empty
squares between them, you may play this card. Move your King and your Rook as
if you were castling them: first move your King next to the Rook, then move
the Rook on the opposite side of the King.
}{\TR}{\iWK\iWR}

\card{Inquisition}{
Instead of moving one of your pieces, move one of your opponent's Bishops, and
take one of his own pieces.
}{\TR}{\iBB}

\card{Pegasus}{
Move one of your Knights on any free square of the board of opposite color of
the one it is currently standing on.
}{\TR}{\iWN}
