"Reach the last rank (v2)": "Reach the last rank (v2)",
"Rearrange enemy pieces": "Rearrange enemy pieces",
"Replace pieces": "Replace pieces",
- "Reposition pieces": "Reposition pieces",
+ "Reposition pieces (v1)": "Reposition pieces (v1)",
+ "Reposition pieces (v2)": "Reposition pieces (v2)",
"Reuse pieces": "Reuse pieces",
"Reverse captures": "Reverse captures",
"Roll the dice": "Roll the dice",
"Reach the last rank (v2)": "Llegar a la última fila (v2)",
"Rearrange enemy pieces": "Reorganizar piezas opuestas",
"Replace pieces": "Reemplazar piezas",
- "Reposition pieces": "Reposicionar las piezas",
+ "Reposition pieces (v1)": "Reposicionar las piezas (v1)",
+ "Reposition pieces (v2)": "Reposicionar las piezas (v2)",
"Reuse pieces": "Reutilizar piezas",
"Reverse captures": "Capturas invertidas",
"Roll the dice": "Tirar los dados",
"Reach the last rank (v2)": "Atteignez la dernière rangée (v2)",
"Rearrange enemy pieces": "Réorganisez les pièces adverses",
"Replace pieces": "Remplacer les pièces",
- "Reposition pieces": "Replacer les pièces",
+ "Reposition pieces (v1)": "Replacer les pièces (v1)",
+ "Reposition pieces (v2)": "Replacer les pièces (v2)",
"Reuse pieces": "Réutiliser les pièces",
"Reverse captures": "Captures inversées",
"Roll the dice": "Lancez le dé",
A king may remain under check while the move isn't complete.
A repositioned piece can give checkmate.
A pawn cannot be placed on the last rank.
+
+p.
A king can reposition a piece or be repositioned,
possibly to escape from a check.
Un rey puede quedarse en jaque durante esta acción.
Una pieza movida en el tablero puede dar jaque mate.
Un peón no se puede mover a la última fila.
- Un rey puede moverse y ser movido, incluso para evitar jaques.
+
+p Un rey puede moverse y ser movido, incluso para evitar jaques.
figure.diagram-container
.diagram.diag12
en échec durant cette action.
Une pièce déplacée sur l'échiquier peut mater.
Un pion ne peut pas être déplacé en dernière rangée.
+
+p.
Un roi peut déplacer et être déplacé,
y compris pour se soustraire à un échec.
--- /dev/null
+p.boxed.
+ You can capture your pieces to teleport them instead of a regular move.
+
+p
+ a(href="/#/variants/Teleport1") Teleport1
+ | , but the king cannot be repositioned.
+ | This removes some unusual defensive options.
--- /dev/null
+p.boxed.
+ Puedes capturar tus piezas para teletransportarlas en lugar de jugar
+ un movimiento normal.
+
+p
+ a(href="/#/variants/Teleport1") Teleport1
+ | , pero el rey no se puede reposicionar.
+ | Esto evita algunas posibilidades defensivas inusuales.
--- /dev/null
+p.boxed.
+ Vous pouvez capturer vos pièces pour les téléporter au lieu de jouer
+ un coup normal.
+
+p
+ a(href="/#/variants/Teleport1") Teleport1
+ | , mais le roi ne peut pas être repositionné.
+ | Cela empêche quelques possibilités défensives inhabituelles.
"Rampage",
"Recycle",
"Shogun",
- "Teleport"
+ "Teleport1",
+ "Teleport2"
]
ul
for v in varlist
"Rampage",
"Recycle",
"Shogun",
- "Teleport"
+ "Teleport1",
+ "Teleport2"
]
ul
for v in varlist
"Rampage",
"Recycle",
"Shogun",
- "Teleport"
+ "Teleport1",
+ "Teleport2"
]
ul
for v in varlist
this.kingPos[move.vanish[1].c] = [-1, -1];
else if (move.appear[0].p == V.KING)
this.kingPos[move.appear[0].c] = [move.appear[0].x, move.appear[0].y];
- this.updateCastleFlags(move);
+ if (move.vanish.length > 0) this.updateCastleFlags(move);
}
// NOTE: no need to update if castleFlags already off
--- /dev/null
+import { Teleport1Rules } from "@/variants/Teleport1";
+
+export class Teleport2Rules extends Teleport1Rules {
+
+ canTake([x1, y1], [x2, y2]) {
+ // Cannot teleport king:
+ return (this.subTurn == 1 && this.getPiece(x2, y2) != V.KING);
+ }
+
+ underCheck(color) {
+ // Standard method:
+ return this.isAttacked(this.kingPos[color], V.GetOppCol(color));
+ }
+
+ postPlay(move) {
+ if (move.vaish.length > 0) {
+ // Standard method:
+ if (move.appear[0].p == V.KING)
+ this.kingPos[move.appear[0].c] = [move.appear[0].x, move.appear[0].y];
+ this.updateCastleFlags(move);
+ }
+ }
+
+ updateCastleFlags(move) {
+ // Standard method: TODO = find a better way... (not rewriting)
+ const c = color || V.GetOppCol(this.turn);
+ const firstRank = (c == "w" ? V.size.x - 1 : 0);
+ const oppCol = this.turn;
+ const oppFirstRank = V.size.x - 1 - firstRank;
+ if (piece == V.KING && move.appear.length > 0)
+ this.castleFlags[c] = [V.size.y, V.size.y];
+ else if (
+ move.start.x == firstRank &&
+ this.castleFlags[c].includes(move.start.y)
+ ) {
+ const flagIdx = (move.start.y == this.castleFlags[c][0] ? 0 : 1);
+ this.castleFlags[c][flagIdx] = V.size.y;
+ }
+ if (
+ move.end.x == oppFirstRank &&
+ this.castleFlags[oppCol].includes(move.end.y)
+ ) {
+ const flagIdx = (move.end.y == this.castleFlags[oppCol][0] ? 0 : 1);
+ this.castleFlags[oppCol][flagIdx] = V.size.y;
+ }
+ }
+
+ postUndo(move) {
+ if (move.vanish.length > 0) {
+ // Standard method:
+ const c = this.getColor(move.start.x, move.start.y);
+ if (this.getPiece(move.start.x, move.start.y) == V.KING)
+ this.kingPos[c] = [move.start.x, move.start.y];
+ }
+ }
+
+};
('Switching', 'Exchange pieces'' positions'),
('Synochess', 'Dynasty versus Kingdom'),
('Takenmake', 'Prolongated captures'),
- ('Teleport', 'Reposition pieces'),
+ ('Teleport (v1)', 'Reposition pieces (v1)'),
+ ('Teleport (v2)', 'Reposition pieces (v2)'),
('Tencubed', 'Four new pieces'),
('Threechecks', 'Give three checks'),
('Titan', 'Extra bishops and knights'),
// "newgame" message can provide a page (corr Game --> Hall)
notifyRoom(
obj.page || page, obj.code, {data: obj.data}, obj.excluded);
- if (!!discordChannel && obj.code == "newchallenge") {
- discordChannel.send("New challenge: **" +
- obj.data.vname +
- "** [" + obj.data.cadence + "]");
+ if (
+ obj.code == "newchallenge" &&
+ !obj.data.to && //filter out targeted challenges
+ obj.data.cadence.indexOf('d') < 0 //and correspondance games
+ ) {
+ const challMsg = (
+ "New challenge: **" + obj.data.vname + "** " +
+ "[" + obj.data.cadence + "]"
+ );
+ if (!!discordChannel) discordChannel.send(challMsg);
+ else
+ // Log when running locally (dev, debug):
+ console.log(challMsg);
}
break;