실용적인 ChessLang 변형 예제
ChessLang 예제
ChessLang으로 만들 수 있는 다양한 체스 변형 예제입니다.
기본 변형 (레벨 1)
💡 조건 결합 규칙: 여러 승리 조건은 OR로 결합됩니다.
add로 추가된 조건 중 하나라도 만족하면 게임이 종료됩니다.
King of the Hill
중앙을 장악하면 승리합니다.
chesslang
game: "King of the Hill"
extends: "Standard Chess"
board:
zones:
hill: [d4, d5, e4, e5]
# OR 결합: checkmate OR hill
# 체크메이트 또는 킹이 중앙에 도달하면 승리
victory:
add:
hill: King in zone.hillThree-Check
3회 체크하면 승리합니다.
chesslang
game: "Three-Check"
extends: "Standard Chess"
# OR 결합: checkmate OR three_checks
# 체크메이트 또는 3회 체크로 승리
victory:
add:
three_checks: checks >= 3Racing Kings
체크 없이 8랭크에 먼저 도달하면 승리합니다.
chesslang
game: "Racing Kings"
extends: "Standard Chess"
setup:
White:
King: [a1]
Queen: [b1]
Rook: [c1, d1]
Bishop: [e1, f1]
Knight: [g1, h1]
Black:
King: [a2]
Queen: [b2]
Rook: [c2, d2]
Bishop: [e2, f2]
Knight: [g2, h2]
# replace: checkmate 조건을 racing으로 교체
# 결과: racing 조건만 적용 (체크메이트 무효)
victory:
replace:
checkmate: King on rank 8
rules:
check:
cannot_give: trueHorde Chess
백은 폰 대군, 흑은 표준 세트입니다.
chesslang
game: "Horde Chess"
extends: "Standard Chess"
setup:
White:
Pawn: [a1, b1, c1, d1, e1, f1, g1, h1,
a2, b2, c2, d2, e2, f2, g2, h2,
a3, b3, c3, d3, e3, f3, g3, h3,
a4, b4, c4, d4, e4, f4, g4, h4,
f5, g5]
Black:
King: [e8]
Queen: [d8]
Rook: [a8, h8]
Bishop: [c8, f8]
Knight: [b8, g8]
Pawn: [a7, b7, c7, d7, e7, f7, g7, h7]
# 비대칭 승리 조건
# 백: 모든 흑 기물 제거시 승리
# 흑: 체크메이트로 승리
victory:
remove:
- checkmate # 기본 체크메이트 제거
add:
white_wins: opponent.pieces == 0 # 백 승리 조건
black_wins: checkmate # 흑 승리 조건커스텀 기물 (레벨 2)
Amazon (아마존)
퀸과 나이트의 조합입니다.
chesslang
game: "Amazon Chess"
extends: "Standard Chess"
piece Amazon {
move: slide(orthogonal) | slide(diagonal) | leap(2, 1)
capture: =move
value: 12
}
setup:
replace:
White:
Queen: []
Amazon: [d1]
Black:
Queen: []
Amazon: [d8]Chancellor (챈슬러)
룩과 나이트의 조합입니다.
chesslang
piece Chancellor {
move: slide(orthogonal) | leap(2, 1)
capture: =move
value: 9
}Archbishop (대주교)
비숍과 나이트의 조합입니다.
chesslang
piece Archbishop {
move: slide(diagonal) | leap(2, 1)
capture: =move
value: 8
}Cannon (포)
중국 장기의 포처럼 잡기 위해 기물을 뛰어넘어야 합니다.
chesslang
piece Cannon {
move: slide(orthogonal)
capture: hop(orthogonal)
value: 5
}고급 커스텀 기물
복잡한 동작과 상태를 가진 고급 기물들입니다.
Vampire (뱀파이어)
잡은 기물을 아군으로 변환합니다.
chesslang
game: "Vampire Chess"
extends: "Standard Chess"
piece Vampire {
move: step(any) | leap(2, 0)
capture: =move
traits: [jump]
state: { thralls: 0 }
value: 6
}
# 잡은 기물을 아군으로 변환
trigger vampiric_conversion {
on: capture
when: piece.type == Vampire and captured.type != King
do: {
transform captured to captured.type
set captured.owner = piece.owner
set piece.state.thralls = piece.state.thralls + 1
}
}
setup:
replace:
Queen: VampireNecromancer (강령술사)
영혼을 모아 좀비를 소환합니다.
chesslang
game: "Necromancer Chess"
extends: "Standard Chess"
piece Necromancer {
move: step(diagonal)
capture: =move
state: { souls: 0 }
value: 6
}
piece Zombie {
move: step(forward) | step(orthogonal)
capture: step(any) where enemy
value: 1
}
# 아군이 잡을 때마다 영혼 획득
trigger collect_soul {
on: capture
when: any Necromancer where owner == piece.owner
do: set Necromancer.state.souls = Necromancer.state.souls + 1
}
# 3개의 영혼으로 좀비 소환
trigger raise_zombie {
on: turn_start
when: any Necromancer where state.souls >= 3
do: {
create Zombie at random_empty_square adjacent to Necromancer
set Necromancer.state.souls = Necromancer.state.souls - 3
}
}
setup:
add:
White Necromancer: [c1]
Black Necromancer: [f8]Medusa (메두사)
시선에 닿은 적을 동결시킵니다.
chesslang
game: "Medusa Chess"
extends: "Standard Chess"
piece Medusa {
move: step(any)
capture: slide(diagonal) where enemy
state: { gazeActive: true }
value: 5
}
effect frozen {
blocks: [all]
duration: 2
visual: highlight(cyan, 0.5)
}
# 대각선 시야의 적을 동결
trigger medusa_gaze {
on: turn_start
when: any Medusa where state.gazeActive
do: mark pieces in line(diagonal) from Medusa where enemy with frozen
}
setup:
replace:
Queen: MedusaTime Bomb (시한폭탄)
3턴 후 대폭발합니다.
chesslang
game: "Time Bomb Chess"
extends: "Standard Chess"
piece TimeBomb {
move: step(orthogonal)
capture: none
state: { timer: 3, armed: true }
value: 1
}
# 턴마다 카운트다운
trigger bomb_countdown {
on: turn_end
when: any TimeBomb where state.armed
do: set piece.state.timer = piece.state.timer - 1
}
# 타이머가 0이 되면 폭발
trigger bomb_explode {
on: turn_start
when: any TimeBomb where state.timer <= 0
do: {
remove pieces in radius(2) from TimeBomb where not King
remove TimeBomb
}
}
setup:
add:
White TimeBomb: [d3]
Black TimeBomb: [d6]Guardian (수호자)
인접한 아군을 보호합니다.
chesslang
game: "Guardian Chess"
extends: "Standard Chess"
piece Guardian {
move: step(any)
capture: =move
state: { protected: 0 }
value: 4
}
# 인접한 아군이 잡히려 하면 보호
trigger guardian_protection {
on: capture
when: any Guardian adjacent to captured where Guardian.owner == captured.owner
do: {
cancel # 잡기 취소
set Guardian.state.protected = Guardian.state.protected + 1
}
}
setup:
add:
White Guardian: [d2, e2]
Black Guardian: [d7, e7]Jester (광대)
잡는 대신 위치를 교환합니다.
chesslang
game: "Jester Chess"
extends: "Standard Chess"
piece Jester {
move: step(any)
capture: none # 잡기 불가
state: { swapsUsed: 0 }
value: 4
}
# 대상과 위치 교환
trigger jester_swap {
on: move
when: piece.type == Jester and target has piece
do: {
let targetPiece = piece_at(target)
move targetPiece to origin
set piece.state.swapsUsed = piece.state.swapsUsed + 1
}
}
setup:
add:
White Jester: [d1]
Black Jester: [d8]효과와 트리거
Atomic Chess
잡기가 폭발을 일으켜 인접 기물을 모두 제거합니다.
chesslang
game: "Atomic Chess"
extends: "Standard Chess"
trigger atomic_explosion {
on: capture
do: {
remove piece
remove captured
remove pieces in radius(1) from target where not Pawn
}
}
# OR 결합: checkmate OR king_exploded
# 체크메이트 또는 상대 킹 폭발로 승리
victory:
add:
king_exploded: opponent.King == nullTrap Chess
트래퍼 기물이 이동한 자리에 함정을 남깁니다.
chesslang
game: "Trap Chess"
extends: "Standard Chess"
piece Trapper {
move: step(any)
capture: =move
state: { traps: 0 }
value: 3
}
effect trap {
on_enter: capture entering where enemy
duration: 5
visual: highlight(red, 0.3)
}
trigger place_trap {
on: move
when: piece.type == Trapper and piece.state.traps < 3
do: {
mark origin with trap
set piece.state.traps = piece.state.traps + 1
}
}
setup:
add:
White:
Trapper: [d2]
Black:
Trapper: [d7]스크립트 변형 (레벨 3)
Progressive Chess
각 턴마다 이동 횟수가 1씩 증가합니다.
chesslang
game: "Progressive Chess"
extends: "Standard Chess"
script {
game.state.movesThisTurn = 0;
game.state.movesRequired = 1;
game.on("move", function(event) {
game.state.movesThisTurn++;
var opponent = event.player === "White" ? "Black" : "White";
if (game.isCheck(opponent)) {
game.endTurn();
return;
}
if (game.state.movesThisTurn >= game.state.movesRequired) {
game.endTurn();
}
});
game.on("turnEnd", function(event) {
game.state.movesRequired++;
game.state.movesThisTurn = 0;
});
}Countdown Chess
각 플레이어당 50수 제한입니다.
chesslang
game: "Countdown Chess"
extends: "Standard Chess"
script {
game.state.whiteMoves = 50;
game.state.blackMoves = 50;
game.on("move", function(event) {
if (event.player === "White") {
game.state.whiteMoves--;
console.log("백 남은 이동:", game.state.whiteMoves);
if (game.state.whiteMoves <= 0) {
game.declareWinner("Black", "백이 이동 횟수를 소진함");
}
} else {
game.state.blackMoves--;
console.log("흑 남은 이동:", game.state.blackMoves);
if (game.state.blackMoves <= 0) {
game.declareWinner("White", "흑이 이동 횟수를 소진함");
}
}
game.endTurn();
});
}Material Race
15점어치의 기물을 먼저 잡으면 승리합니다.
chesslang
game: "Material Race"
extends: "Standard Chess"
script {
game.state.whiteCaptures = 0;
game.state.blackCaptures = 0;
var pieceValues = {
"Pawn": 1,
"Knight": 3,
"Bishop": 3,
"Rook": 5,
"Queen": 9
};
game.on("capture", function(event) {
var capturedType = event.captured.type;
var value = pieceValues[capturedType] || 0;
if (event.player === "White") {
game.state.whiteCaptures += value;
console.log("백 잡은 점수:", game.state.whiteCaptures);
if (game.state.whiteCaptures >= 15) {
game.declareWinner("White", "15점 달성");
}
} else {
game.state.blackCaptures += value;
console.log("흑 잡은 점수:", game.state.blackCaptures);
if (game.state.blackCaptures >= 15) {
game.declareWinner("Black", "15점 달성");
}
}
});
}큰 보드 변형
Capablanca Chess (10x8)
챈슬러와 대주교가 추가된 10x8 보드입니다.
chesslang
game: "Capablanca Chess"
extends: "Standard Chess"
board:
size: 10x8
piece Chancellor {
move: slide(orthogonal) | leap(2, 1)
capture: =move
value: 9
}
piece Archbishop {
move: slide(diagonal) | leap(2, 1)
capture: =move
value: 8
}
setup:
White:
King: [f1]
Queen: [e1]
Chancellor: [h1]
Archbishop: [c1]
Rook: [a1, j1]
Bishop: [d1, g1]
Knight: [b1, i1]
Pawn: [a2, b2, c2, d2, e2, f2, g2, h2, i2, j2]
Black:
King: [f8]
Queen: [e8]
Chancellor: [h8]
Archbishop: [c8]
Rook: [a8, j8]
Bishop: [d8, g8]
Knight: [b8, i8]
Pawn: [a7, b7, c7, d7, e7, f7, g7, h7, i7, j7]Mini Chess (5x6)
작은 보드의 빠른 게임입니다.
chesslang
game: "Mini Chess"
extends: "Standard Chess"
board:
size: 5x6
setup:
White:
King: [c1]
Queen: [b1]
Rook: [a1, e1]
Bishop: [d1]
Pawn: [a2, b2, c2, d2, e2]
Black:
King: [c6]
Queen: [b6]
Rook: [a6, e6]
Bishop: [d6]
Pawn: [a5, b5, c5, d5, e5]