증강 윷놀이: 증강 아이콘 101개, 사이트 추가 증강 20개 더(모두 30개), 추가 증강 기본 꺼짐
- 증강마다 48×48 SVG 아이콘(aug-icons/): 타일 색 = 종류(규칙·즉시·사용·승리 조건), 그림 = 증강. 선택 카드·사람 카드 칩·쓰기 버튼·승리 팝업·방 설정 목록·규칙 보기에 표시. 고양이가 된 증강은 회색 고양이. 모아 보기: apps/web/scripts/aug-icon-sheet.tsx - 새 증강 20개: 다시 던지기, 곱빼기, 올인, 저주 인형, 얼음!, 자석, 뒤로 돌아, 꼴찌의 반란, 텃세, 따라쟁이, 청개구리, 사냥꾼, 줍줍, 도장 깨기, 스타트 대시, 방공호, 벼락, 블랙홀, 로켓 발사, 최후의 일격 (규칙·컴퓨터·테스트·문서) - augOff 기본값 = 이 사이트 추가 증강 30개(방에서 [추가 증강 켜기]로 켬) - 카니발리즘: 내 말 잡기를 '잡기'로 세지 않음(ownCaptures) → 개돼지와 함께일 때 컴퓨터·시간 초과가 자기 말을 잡고 다시 던지기를 끝없이 반복하던 문제 수정 - 방 설정 탭이 방 정보 갱신으로 다시 그려질 때 [윷놀이 설정]으로 되돌아가던 문제 수정 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
36
apps/web/scripts/aug-icon-sheet.tsx
Normal file
36
apps/web/scripts/aug-icon-sheet.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Dev tool: renders every 증강 icon (big and small, light and dark background) to a PNG contact sheet.
|
||||
* cd apps/web && bun scripts/aug-icon-sheet.tsx [out.png] [ids,comma,separated]
|
||||
*/
|
||||
import { renderToStaticMarkup } from 'react-dom/server';
|
||||
import { chromium } from 'playwright-core';
|
||||
import { AUGS, AUG_IDS, type AugId } from '@bg/games/yut/augments';
|
||||
import { AugIcon, GLYPHS } from '../src/games/yut/aug-icons';
|
||||
|
||||
const out = process.argv[2] ?? `${process.env.HOME}/.tmp/aug-icons.png`;
|
||||
const only = process.argv[3]?.split(',').filter(Boolean) as AugId[] | undefined;
|
||||
const ids = only?.length ? only : [...AUG_IDS];
|
||||
const cell = (id: AugId) => (
|
||||
<div className="cell">
|
||||
<AugIcon id={id} size={72} />
|
||||
<div className="row">
|
||||
<div className="light"><AugIcon id={id} size={20} /></div>
|
||||
<div className="dark"><AugIcon id={id} size={20} /></div>
|
||||
</div>
|
||||
<div className={`name${GLYPHS[id] ? '' : ' missing'}`}>{AUGS[id].name}</div>
|
||||
<div className="id">{id}</div>
|
||||
</div>
|
||||
);
|
||||
const html = `<!doctype html><meta charset="utf-8"><style>
|
||||
body{margin:0;padding:12px;font-family:sans-serif;background:#f3f4f6}
|
||||
.grid{display:grid;grid-template-columns:repeat(10,112px);gap:8px}
|
||||
.cell{display:flex;flex-direction:column;align-items:center;gap:4px;background:#fff;border-radius:8px;padding:6px}
|
||||
.row{display:flex;gap:4px}.light{background:#fff;padding:3px;border:1px solid #ddd}.dark{background:#111827;padding:3px}
|
||||
.name{font-size:11px;font-weight:700;text-align:center}.missing{color:#dc2626}.id{font-size:10px;color:#6b7280}
|
||||
</style><div class="grid">${renderToStaticMarkup(<>{ids.map((id) => <div key={id}>{cell(id)}</div>)}</>)}</div>`;
|
||||
const browser = await chromium.launch({ executablePath: process.env.CHROME ?? '/usr/bin/google-chrome', headless: true });
|
||||
const page = await browser.newPage({ viewport: { width: 1240, height: 400 }, deviceScaleFactor: 1 });
|
||||
await page.setContent(html);
|
||||
await page.screenshot({ path: out, fullPage: true });
|
||||
await browser.close();
|
||||
console.log(out, ids.length, 'icons,', ids.filter((id) => !GLYPHS[id]).length, 'missing');
|
||||
369
apps/web/src/games/yut/aug-icons/glyphs-a.tsx
Normal file
369
apps/web/src/games/yut/aug-icons/glyphs-a.tsx
Normal file
@@ -0,0 +1,369 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import type { AugId } from '@bg/games/yut/augments';
|
||||
import { C } from './palette';
|
||||
|
||||
/** A 4-point sparkle centred at (x, y), radius r. */
|
||||
const spark = (x: number, y: number, r: number) =>
|
||||
`M${x} ${y - r}Q${x} ${y} ${x + r} ${y}Q${x} ${y} ${x} ${y + r}Q${x} ${y} ${x - r} ${y}Q${x} ${y} ${x} ${y - r}Z`;
|
||||
|
||||
/** A spiky burst (n points) centred at (x, y) with outer radius r and inner radius ri. */
|
||||
const burst = (x: number, y: number, r: number, ri: number, n: number) =>
|
||||
Array.from({ length: n * 2 }, (_, i) => {
|
||||
const a = (i / (n * 2)) * Math.PI * 2 - Math.PI / 2;
|
||||
const d = i % 2 ? ri : r;
|
||||
return `${(x + Math.cos(a) * d).toFixed(1)},${(y + Math.sin(a) * d).toFixed(1)}`;
|
||||
}).join(' ');
|
||||
|
||||
/** Six wedges of the 돌림판, as path data. */
|
||||
const WHEEL = [C.r, C.w, C.b, C.w, C.y, C.w].map((fill, i) => {
|
||||
const a0 = ((i * 60 - 90) * Math.PI) / 180;
|
||||
const a1 = (((i + 1) * 60 - 90) * Math.PI) / 180;
|
||||
const pt = (a: number) => `${(24 + Math.cos(a) * 14).toFixed(2)} ${(27 + Math.sin(a) * 14).toFixed(2)}`;
|
||||
return { fill, d: `M24 27L${pt(a0)}A14 14 0 0 1 ${pt(a1)}Z` };
|
||||
});
|
||||
|
||||
export const GLYPHS_A: Partial<Record<AugId, ReactNode>> = {
|
||||
// 8톤 트럭: a white truck racing right, speed lines behind
|
||||
truck: (
|
||||
<g>
|
||||
<path d="M6 18h4M6 23h3M6 28h4" stroke={C.w} strokeWidth="2" strokeLinecap="round" opacity=".75" />
|
||||
<rect x="11" y="12" width="19" height="20" rx="1.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M30 18H36.5L41.5 24.5V32H30Z" fill={C.w} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<path d="M32.5 20.5H35.5L38.8 24.8H32.5Z" fill={C.b} stroke={C.k} strokeWidth="1.1" strokeLinejoin="round" />
|
||||
<text x="20.5" y="28" textAnchor="middle" fontSize="14" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.r}>8</text>
|
||||
<circle cx="17" cy="34" r="4.2" fill={C.k} />
|
||||
<circle cx="35" cy="34" r="4.2" fill={C.k} />
|
||||
<circle cx="17" cy="34" r="1.6" fill={C.gr} />
|
||||
<circle cx="35" cy="34" r="1.6" fill={C.gr} />
|
||||
</g>
|
||||
),
|
||||
// 3단 합체 필살기!!!: a stack of three pieces in front of a yellow explosion
|
||||
combo: (
|
||||
<g>
|
||||
<polygon points={burst(24, 24, 18, 11, 10)} fill={C.y} />
|
||||
<polygon points={burst(24, 24, 12, 7.5, 10)} fill={C.o} />
|
||||
<circle cx="24" cy="32" r="6" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="24" cy="24" r="6" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="24" cy="16" r="6" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
</g>
|
||||
),
|
||||
// 간택: a cat paw pressing down on an augment card
|
||||
chosen: (
|
||||
<g>
|
||||
<rect x="8" y="17" width="21" height="25" rx="3.5" transform="rotate(-12 18.5 29.5)" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d={spark(17, 32, 5)} fill={C.y} />
|
||||
<g transform="translate(-1.5 3)">
|
||||
<ellipse cx="30" cy="22" rx="8" ry="7" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<ellipse cx="22.5" cy="12.5" rx="3.2" ry="3.8" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="28.5" cy="8.8" rx="3.2" ry="3.8" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="35" cy="9.5" rx="3.2" ry="3.8" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="39.5" cy="15" rx="3" ry="3.6" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="30.5" cy="23" rx="4.5" ry="3.8" fill={C.pk} />
|
||||
<circle cx="23" cy="13" r="1.4" fill={C.pk} />
|
||||
<circle cx="28.5" cy="9.5" r="1.4" fill={C.pk} />
|
||||
<circle cx="34.8" cy="10.2" r="1.4" fill={C.pk} />
|
||||
<circle cx="39" cy="15.5" r="1.3" fill={C.pk} />
|
||||
</g>
|
||||
</g>
|
||||
),
|
||||
// 게임 접어라: the 윷판 with its right half folding over the left, and a fold arrow
|
||||
fold: (
|
||||
<g>
|
||||
<rect x="7" y="16" width="17" height="25" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M7 16L24 28.5M7 41L24 28.5" stroke={C.k} strokeWidth="1.2" />
|
||||
<circle cx="7" cy="16" r="2" fill={C.k} />
|
||||
<circle cx="7" cy="41" r="2" fill={C.k} />
|
||||
<path d="M24 16L36 12.5V36.5L24 41Z" fill={C.b} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<path d="M24 16L36 36.5M24 41L36 12.5" stroke={C.k} strokeWidth="1" opacity=".6" />
|
||||
<path d="M39.5 16Q41 7.5 30 7.5Q21 7.5 17.5 11.5" stroke={C.w} strokeWidth="2.5" fill="none" strokeLinecap="round" />
|
||||
<path d="M13.5 9.5L16.5 15L20.5 10Z" fill={C.w} />
|
||||
</g>
|
||||
),
|
||||
// 고양이: a white cat face
|
||||
cat: (
|
||||
<g>
|
||||
<path d="M10 37C9 26 11 19 12.5 10.5L20 17.5Q24 16.5 28 17.5L35.5 10.5C37 19 39 26 38 37Q24 42.5 10 37Z" fill={C.w} />
|
||||
<path d="M14 14.5L18.5 18.5L14.8 21Z M34 14.5L29.5 18.5L33.2 21Z" fill={C.pk} />
|
||||
<ellipse cx="18.5" cy="27" rx="2.1" ry="2.8" fill={C.k} />
|
||||
<ellipse cx="29.5" cy="27" rx="2.1" ry="2.8" fill={C.k} />
|
||||
<path d="M22.4 31.2h3.2L24 33z" fill={C.pk} />
|
||||
<path d="M24 33v1.6M24 34.6q-2 1.6-3.6.4M24 34.6q2 1.6 3.6.4M8 30.5l7 1M8 34l7-.8M40 30.5l-7 1M40 34l-7-.8" stroke={C.k} strokeWidth="1.2" strokeLinecap="round" fill="none" />
|
||||
</g>
|
||||
),
|
||||
// 과유불급: six upright 윷가락 in a row, the last two (extra) ones yellow
|
||||
excess: (
|
||||
<g>
|
||||
{[0, 1, 2, 3, 4, 5].map((i) => (
|
||||
<rect key={i} x={7.6 + i * 5.6} y="10" width="4.4" height="28" rx="2.2" fill={i >= 4 ? C.y : C.wood} stroke={i >= 4 ? C.yd : C.woodd} strokeWidth="1.2" />
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 개돼지: a dog face and a pig face side by side
|
||||
doggy: (
|
||||
<g>
|
||||
<circle cx="15" cy="24" r="8.5" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<path d="M8 17.5C5 20 5.5 27 8 29.5L10.5 21.5Z M22 17.5C25 20 24.5 27 22 29.5L19.5 21.5Z" fill={C.wood} stroke={C.woodd} strokeWidth="1.1" strokeLinejoin="round" />
|
||||
<circle cx="12" cy="23" r="1.4" fill={C.k} />
|
||||
<circle cx="18" cy="23" r="1.4" fill={C.k} />
|
||||
<ellipse cx="15" cy="27.5" rx="2.2" ry="1.6" fill={C.k} />
|
||||
<path d="M15 29v1.5" stroke={C.k} strokeWidth="1.1" />
|
||||
<path d="M27 17L28.5 11.5L32.5 15.5Z M41 17L39.5 11.5L35.5 15.5Z" fill={C.pk} stroke={C.rd} strokeWidth="1.1" strokeLinejoin="round" />
|
||||
<circle cx="34" cy="25" r="8.5" fill={C.pk} stroke={C.rd} strokeWidth="1.4" />
|
||||
<circle cx="31" cy="22" r="1.4" fill={C.k} />
|
||||
<circle cx="37" cy="22" r="1.4" fill={C.k} />
|
||||
<ellipse cx="34" cy="28" rx="4" ry="2.8" fill={C.w} stroke={C.rd} strokeWidth="1.2" />
|
||||
<ellipse cx="32.6" cy="28" rx=".8" ry="1.1" fill={C.rd} />
|
||||
<ellipse cx="35.4" cy="28" rx=".8" ry="1.1" fill={C.rd} />
|
||||
</g>
|
||||
),
|
||||
// 거머리: a dark green leech latched onto another player's red piece
|
||||
leech: (
|
||||
<g>
|
||||
<circle cx="32" cy="16" r="7" fill={C.r} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M9 37Q11 26 19 26Q25 26 27 21" stroke={C.k} strokeWidth="10" fill="none" strokeLinecap="round" />
|
||||
<path d="M9 37Q11 26 19 26Q25 26 27 21" stroke={C.gd} strokeWidth="7.4" fill="none" strokeLinecap="round" />
|
||||
<path d="M12.5 29.5l3 2.5M17 25.8l1 3.6M21.5 25.2l-.4 3.6" stroke={C.g} strokeWidth="1.3" strokeLinecap="round" />
|
||||
<circle cx="11" cy="35.5" r="1.3" fill={C.w} />
|
||||
<path d="M33 34l3.5-3M37 38l4-1.5M30 39l1.5-3.5" stroke={C.w} strokeWidth="1.8" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 나 누구게?: a grey piece with a big "?" above the four player colours
|
||||
whoami: (
|
||||
<g>
|
||||
<circle cx="24" cy="20.5" r="12.5" fill={C.gr} stroke={C.k} strokeWidth="1.8" />
|
||||
<text x="24" y="28.5" textAnchor="middle" fontSize="22" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.w}>?</text>
|
||||
{[C.r, C.b, C.g, C.y].map((f, i) => (
|
||||
<circle key={f} cx={12 + i * 8} cy="38" r="3.2" fill={f} stroke={C.k} strokeWidth="1.1" />
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 나만 아니면 돼~: a red piece blown up in a burst, my white piece safe and relieved below
|
||||
notme: (
|
||||
<g>
|
||||
<polygon points={burst(29, 19, 12.5, 7.5, 9)} fill={C.y} />
|
||||
<circle cx="29" cy="19" r="7" fill={C.r} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M25.5 16.5l2.5 2.5M28 16.5l-2.5 2.5M30 16.5l2.5 2.5M32.5 16.5L30 19M27 22.5h4" stroke={C.k} strokeWidth="1.3" strokeLinecap="round" />
|
||||
<circle cx="15" cy="33" r="7.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M11.5 32q1.2-1.4 2.4 0M16.1 32q1.2-1.4 2.4 0M12.5 35.5q2.5 2.2 5 0" stroke={C.k} strokeWidth="1.3" fill="none" strokeLinecap="round" />
|
||||
<path d="M22.5 26.5q-1.6 2.6 0 3.4q1.6-.8 0-3.4Z" fill={C.b} stroke={C.bd} strokeWidth=".8" />
|
||||
</g>
|
||||
),
|
||||
// 내려: a ballot with a red down arrow going into a ballot box
|
||||
getoff: (
|
||||
<g>
|
||||
<rect x="16" y="6.5" width="16" height="19" rx="1.5" transform="rotate(8 24 16)" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M24.3 10v8.5M20.6 15.5l3.7 4.2l3.9-3.8" transform="rotate(8 24 16)" stroke={C.r} strokeWidth="2.6" fill="none" strokeLinecap="round" strokeLinejoin="round" />
|
||||
<rect x="8" y="22" width="32" height="19" rx="2" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<rect x="14" y="23.5" width="20" height="2.6" rx="1.3" fill={C.k} />
|
||||
<path d="M8 29.5H40" stroke={C.k} strokeWidth="1.2" />
|
||||
<path d="M19 35.5h10" stroke={C.gr} strokeWidth="2.4" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 도베르만: a black-and-tan doberman head with a gold dog coin
|
||||
doberman: (
|
||||
<g>
|
||||
<path d="M10 6L19 15L12 21Z M34 6L25 15L32 21Z" fill={C.k} stroke={C.k} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<path d="M12.5 10L16 14L13.3 16.5Z M31.5 10L28 14L30.7 16.5Z" fill={C.wood} />
|
||||
<ellipse cx="22" cy="22" rx="10.5" ry="9.5" fill={C.k} />
|
||||
<path d="M15.5 25Q22 21 28.5 25L27 35Q22 39 17 35Z" fill={C.wood} stroke={C.k} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<circle cx="18" cy="20" r="2" fill={C.w} />
|
||||
<circle cx="26" cy="20" r="2" fill={C.w} />
|
||||
<circle cx="18.3" cy="20.3" r="1" fill={C.k} />
|
||||
<circle cx="26.3" cy="20.3" r="1" fill={C.k} />
|
||||
<circle cx="18" cy="16.5" r="1.2" fill={C.wood} />
|
||||
<circle cx="26" cy="16.5" r="1.2" fill={C.wood} />
|
||||
<ellipse cx="22" cy="27.5" rx="3" ry="2.2" fill={C.k} />
|
||||
<path d="M22 29.5v2.5M19.5 33q2.5 1.5 5 0" stroke={C.k} strokeWidth="1.2" fill="none" strokeLinecap="round" />
|
||||
<circle cx="35" cy="34" r="6.5" fill={C.y} stroke={C.yd} strokeWidth="1.6" />
|
||||
<circle cx="35" cy="34" r="3.8" fill="none" stroke={C.yd} strokeWidth="1.2" />
|
||||
</g>
|
||||
),
|
||||
// 돌려돌려 돌림판: a spinning prize wheel with a pointer on top
|
||||
roulette: (
|
||||
<g>
|
||||
<path d="M7.5 22A17 17 0 0 1 12 14.5M40.5 32A17 17 0 0 1 36 39.5" stroke={C.w} strokeWidth="2" fill="none" strokeLinecap="round" opacity=".8" />
|
||||
{WHEEL.map((w) => (
|
||||
<path key={w.d} d={w.d} fill={w.fill} stroke={C.k} strokeWidth="1.1" strokeLinejoin="round" />
|
||||
))}
|
||||
<circle cx="24" cy="27" r="14" fill="none" stroke={C.k} strokeWidth="1.8" />
|
||||
<circle cx="24" cy="27" r="2.6" fill={C.k} />
|
||||
<path d="M19.5 6.5H28.5L24 15Z" fill={C.w} stroke={C.k} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 명사수: a sniper scope's crosshair on a red piece
|
||||
sniper: (
|
||||
<g>
|
||||
<circle cx="24" cy="24" r="14.5" fill="none" stroke={C.w} strokeWidth="3" />
|
||||
<path d="M24 6.5V16M24 32V41.5M6.5 24H16M32 24H41.5" stroke={C.w} strokeWidth="2.6" strokeLinecap="round" />
|
||||
<circle cx="24" cy="24" r="6" fill={C.r} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="24" cy="24" r="1.4" fill={C.k} />
|
||||
</g>
|
||||
),
|
||||
// 명탐정: a magnifying glass finding an augment card and crossing it out
|
||||
detective: (
|
||||
<g>
|
||||
<path d="M28.5 28.5L38.5 38.5" stroke={C.k} strokeWidth="8.5" strokeLinecap="round" />
|
||||
<path d="M28.5 28.5L38.5 38.5" stroke={C.wood} strokeWidth="5.5" strokeLinecap="round" />
|
||||
<circle cx="20.5" cy="20.5" r="12" fill={C.b} stroke={C.k} strokeWidth="1.4" />
|
||||
<circle cx="20.5" cy="20.5" r="10.5" fill={C.b} stroke={C.w} strokeWidth="2.6" />
|
||||
<rect x="15.5" y="13.5" width="10" height="14" rx="1.8" fill={C.w} stroke={C.k} strokeWidth="1.2" />
|
||||
<path d="M16.5 15.5L24.5 25.5M24.5 15.5L16.5 25.5" stroke={C.r} strokeWidth="2.4" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 모 아니면 도: a coin split in two, "모" on one half and "도" on the other
|
||||
moordo: (
|
||||
<g>
|
||||
<path d="M12.7 35.3A16 16 0 0 1 35.3 12.7Z" fill={C.w} />
|
||||
<path d="M12.7 35.3A16 16 0 0 0 35.3 12.7Z" fill={C.y} />
|
||||
<circle cx="24" cy="24" r="16" fill="none" stroke={C.k} strokeWidth="1.6" />
|
||||
<path d="M12.7 35.3L35.3 12.7" stroke={C.k} strokeWidth="1.6" />
|
||||
<text x="18" y="25" textAnchor="middle" fontSize="12.5" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.k}>모</text>
|
||||
<text x="30" y="36" textAnchor="middle" fontSize="12.5" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.k}>도</text>
|
||||
</g>
|
||||
),
|
||||
// 바둑: 바둑 grid lines, two white stones sandwiching two black stones
|
||||
baduk: (
|
||||
<g>
|
||||
<path d="M10.5 7V41M19.5 7V41M28.5 7V41M37.5 7V41M7 15H41M7 24H41M7 33H41" stroke={C.w} strokeWidth="1.2" opacity=".55" />
|
||||
{[10.5, 19.5, 28.5, 37.5].map((x, i) => (
|
||||
<circle key={x} cx={x} cy="24" r="4.6" fill={i === 0 || i === 3 ? C.w : C.k} stroke={C.k} strokeWidth="1.2" />
|
||||
))}
|
||||
<path d="M17.5 21.5l1.6-1M26.5 21.5l1.6-1" stroke={C.w} strokeWidth="1.2" strokeLinecap="round" opacity=".7" />
|
||||
</g>
|
||||
),
|
||||
// 배달: a delivery scooter with a red box (a star augment inside) on the back
|
||||
delivery: (
|
||||
<g>
|
||||
<path d="M6 22h3M6 27h4" stroke={C.w} strokeWidth="2" strokeLinecap="round" opacity=".75" />
|
||||
<rect x="10" y="11" width="15" height="13" rx="1.5" fill={C.r} stroke={C.k} strokeWidth="1.4" />
|
||||
<path d={spark(17.5, 17.5, 4.2)} fill={C.y} />
|
||||
<path d="M10 26H25Q28 26 29.5 29.5L31 33H14Q10 33 10 29.5Z" fill={C.w} stroke={C.k} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
<path d="M30 33L35 14M31.5 14H39" stroke={C.k} strokeWidth="2.2" strokeLinecap="round" />
|
||||
<circle cx="14.5" cy="35" r="4.5" fill={C.k} />
|
||||
<circle cx="35.5" cy="35" r="4.5" fill={C.k} />
|
||||
<circle cx="14.5" cy="35" r="1.7" fill={C.gr} />
|
||||
<circle cx="35.5" cy="35" r="1.7" fill={C.gr} />
|
||||
</g>
|
||||
),
|
||||
// 변환: 도깨비: a red 도깨비 face with yellow horns and fangs, holding a spiked club
|
||||
dokkaebi: (
|
||||
<g>
|
||||
<path d="M33 38L38.5 17" stroke={C.k} strokeWidth="3.6" strokeLinecap="round" />
|
||||
<path d="M33 38L38.5 17" stroke={C.wood} strokeWidth="1.8" strokeLinecap="round" />
|
||||
<path d="M36 21.5Q34 12 39 8Q44 12 41 22Z" fill={C.wood} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<circle cx="38.5" cy="12.5" r="1" fill={C.k} />
|
||||
<circle cx="39.2" cy="17" r="1" fill={C.k} />
|
||||
<path d="M12 18L9 7L18.5 14Z M28 18L31 7L21.5 14Z" fill={C.y} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<circle cx="20" cy="27" r="12" fill={C.r} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M12.5 21.5l5 2M27.5 21.5l-5 2" stroke={C.k} strokeWidth="2" strokeLinecap="round" />
|
||||
<circle cx="15.5" cy="26" r="2.6" fill={C.w} />
|
||||
<circle cx="24.5" cy="26" r="2.6" fill={C.w} />
|
||||
<circle cx="16" cy="26.3" r="1.2" fill={C.k} />
|
||||
<circle cx="24" cy="26.3" r="1.2" fill={C.k} />
|
||||
<path d="M13.5 32.5Q20 36.5 26.5 32.5" stroke={C.k} strokeWidth="1.6" fill="none" strokeLinecap="round" />
|
||||
<path d="M15.5 33.3L16.5 30L17.8 33.9Z M24.5 33.3L23.5 30L22.2 33.9Z" fill={C.w} />
|
||||
</g>
|
||||
),
|
||||
// 변환: 선봉장: a piece carrying a red banner, with forward chevrons
|
||||
vanguard: (
|
||||
<g>
|
||||
<path d="M16 31V7" stroke={C.k} strokeWidth="3.4" strokeLinecap="round" />
|
||||
<path d="M16 31V7" stroke={C.wood} strokeWidth="1.8" strokeLinecap="round" />
|
||||
<path d="M17 8Q24 5 33 9.5Q27 13 33 18Q24 14 17 19Z" fill={C.r} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<circle cx="16" cy="34" r="7" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M27 27L32 32.5L27 38M34 27L39 32.5L34 38" stroke={C.y} strokeWidth="3" fill="none" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 변환: 포: an octagonal 장기 piece with the red 包 (포) character
|
||||
cannon: (
|
||||
<g>
|
||||
<polygon points="38.8,30.1 30.1,38.8 17.9,38.8 9.2,30.1 9.2,17.9 17.9,9.2 30.1,9.2 38.8,17.9" fill={C.w} stroke={C.k} strokeWidth="1.6" strokeLinejoin="round" />
|
||||
<polygon points="35.5,28.8 28.8,35.5 19.2,35.5 12.5,28.8 12.5,19.2 19.2,12.5 28.8,12.5 35.5,19.2" fill="none" stroke={C.r} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<text x="24" y="30.5" textAnchor="middle" fontSize="17" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.r}>包</text>
|
||||
</g>
|
||||
),
|
||||
// 변환: 폰: a white chess pawn with a yellow forward step arrow
|
||||
pawn: (
|
||||
<g>
|
||||
<circle cx="21" cy="12.5" r="5.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M15.5 19.5H26.5L24.5 22.5C24.5 28 26 31 29 34H13C16 31 17.5 28 17.5 22.5Z" fill={C.w} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<rect x="10.5" y="33.5" width="21" height="6" rx="2" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M33 24H40M37 20.5L40.5 24L37 27.5" stroke={C.y} strokeWidth="2.8" fill="none" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 사목: four pieces lined up on a diagonal, joined by a red line
|
||||
four: (
|
||||
<g>
|
||||
{[0, 1, 2, 3].flatMap((r) =>
|
||||
[0, 1, 2, 3].filter((c) => c !== 3 - r).map((c) => <circle key={`${r}${c}`} cx={11 + c * 8.7} cy={11 + r * 8.7} r="1.6" fill={C.w} opacity=".6" />),
|
||||
)}
|
||||
<path d="M8 40.1L40.1 8" stroke={C.r} strokeWidth="4.5" strokeLinecap="round" />
|
||||
{[0, 1, 2, 3].map((i) => (
|
||||
<circle key={i} cx={11 + i * 8.7} cy={37.1 - i * 8.7} r="4.3" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 소 뒷걸음질: an ox head with horns, and a backward arrow
|
||||
ox: (
|
||||
<g>
|
||||
<path d="M17 16Q10 15 9.5 7.5Q14 12 19 12Z M33 16Q40 15 40.5 7.5Q36 12 31 12Z" fill={C.w} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<ellipse cx="13.5" cy="20" rx="4" ry="2.5" transform="rotate(20 13.5 20)" fill={C.wood} stroke={C.k} strokeWidth="1.2" />
|
||||
<ellipse cx="36.5" cy="20" rx="4" ry="2.5" transform="rotate(-20 36.5 20)" fill={C.wood} stroke={C.k} strokeWidth="1.2" />
|
||||
<path d="M17 13H33Q34 22 32 29H18Q16 22 17 13Z" fill={C.w} stroke={C.k} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
<circle cx="20.5" cy="20" r="1.5" fill={C.k} />
|
||||
<circle cx="29.5" cy="20" r="1.5" fill={C.k} />
|
||||
<ellipse cx="25" cy="30" rx="8" ry="5.5" fill={C.pk} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="22" cy="30" rx="1.2" ry="1.7" fill={C.k} />
|
||||
<ellipse cx="28" cy="30" rx="1.2" ry="1.7" fill={C.k} />
|
||||
<path d="M17 39H7.5M11 35.5L7.5 39L11 42.5" stroke={C.w} strokeWidth="2.6" fill="none" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 손은 눈보다 빠르다: a wide-open eye, and a 윷가락 whizzing past below it
|
||||
sleight: (
|
||||
<g>
|
||||
<path d="M7 16Q24 1 41 16Q24 31 7 16Z" fill={C.w} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<circle cx="24" cy="16" r="5.5" fill={C.bd} stroke={C.k} strokeWidth="1.2" />
|
||||
<circle cx="24" cy="16" r="2.4" fill={C.k} />
|
||||
<circle cx="25.8" cy="14.2" r="1.1" fill={C.w} />
|
||||
<rect x="17" y="31" width="24" height="6" rx="3" transform="rotate(-8 29 34)" fill={C.wood} stroke={C.woodd} strokeWidth="1.2" />
|
||||
<path d="M6.5 31.5h7M8 36.5h6.5M6.5 41h6" stroke={C.w} strokeWidth="2" strokeLinecap="round" opacity=".8" />
|
||||
</g>
|
||||
),
|
||||
// 시간 여행: a clock with a yellow counter-clockwise (rewind) arrow around it
|
||||
timetravel: (
|
||||
<g>
|
||||
<path d="M35.6 15.4A15 15 0 0 0 10 26" stroke={C.y} strokeWidth="3" fill="none" strokeLinecap="round" />
|
||||
<path d="M6.5 24H13.5L10 30Z" fill={C.y} />
|
||||
<circle cx="25" cy="27" r="11.5" fill={C.w} stroke={C.k} strokeWidth="1.6" />
|
||||
<path d="M25 27V20M25 27L30 30" stroke={C.k} strokeWidth="2" strokeLinecap="round" />
|
||||
<circle cx="25" cy="27" r="1.4" fill={C.k} />
|
||||
<path d="M25 16.5v1.6M25 35.9v1.6M14.5 27h1.6M33.9 27h1.6" stroke={C.k} strokeWidth="1.3" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 악보가 완성되었다!: a sheet of music with notes and a green "done" check
|
||||
score: (
|
||||
<g>
|
||||
<rect x="8.5" y="7" width="27" height="33" rx="2" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M11.5 14H32.5M11.5 17.5H32.5M11.5 21H32.5M11.5 24.5H32.5M11.5 28H32.5" stroke={C.gr} strokeWidth="1" />
|
||||
<ellipse cx="15.5" cy="26" rx="2.4" ry="1.8" transform="rotate(-20 15.5 26)" fill={C.k} />
|
||||
<ellipse cx="22.5" cy="22.5" rx="2.4" ry="1.8" transform="rotate(-20 22.5 22.5)" fill={C.k} />
|
||||
<ellipse cx="29" cy="19" rx="2.4" ry="1.8" transform="rotate(-20 29 19)" fill={C.k} />
|
||||
<path d="M17.6 25.4V12.5M24.6 21.9V11.5M31.1 18.4V10.5" stroke={C.k} strokeWidth="1.3" />
|
||||
<path d="M24.6 11.5L31.1 10.5" stroke={C.k} strokeWidth="2.4" />
|
||||
<circle cx="35" cy="35" r="6.5" fill={C.g} stroke={C.gd} strokeWidth="1.5" />
|
||||
<path d="M31.8 35l2.3 2.3L38.3 33" stroke={C.w} strokeWidth="2.2" fill="none" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 안개: a piece peeking out from behind thick bands of fog
|
||||
fog: (
|
||||
<g>
|
||||
<circle cx="24" cy="18" r="7.5" fill={C.r} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="21.3" cy="17" r="1.3" fill={C.k} />
|
||||
<circle cx="26.7" cy="17" r="1.3" fill={C.k} />
|
||||
<path d="M8 24.5H33" stroke={C.w} strokeWidth="6" strokeLinecap="round" opacity=".95" />
|
||||
<path d="M15 31.5H40" stroke={C.w} strokeWidth="6" strokeLinecap="round" opacity=".85" />
|
||||
<path d="M9 38.5H31" stroke={C.w} strokeWidth="5" strokeLinecap="round" opacity=".7" />
|
||||
<path d="M33 11.5H40M8 11.5h4" stroke={C.w} strokeWidth="3.5" strokeLinecap="round" opacity=".55" />
|
||||
</g>
|
||||
),
|
||||
};
|
||||
336
apps/web/src/games/yut/aug-icons/glyphs-b.tsx
Normal file
336
apps/web/src/games/yut/aug-icons/glyphs-b.tsx
Normal file
@@ -0,0 +1,336 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import type { AugId } from '@bg/games/yut/augments';
|
||||
import { C } from './palette';
|
||||
|
||||
/** A 4-point sparkle centred at (x, y), radius r. */
|
||||
const spark = (x: number, y: number, r: number) =>
|
||||
`M${x} ${y - r}Q${x} ${y} ${x + r} ${y}Q${x} ${y} ${x} ${y + r}Q${x} ${y} ${x - r} ${y}Q${x} ${y} ${x} ${y - r}Z`;
|
||||
|
||||
/** Shield outline centred on x = 24. */
|
||||
const SHIELD = 'M24 7L38.5 12.5V23.5C38.5 32.5 32 38.5 24 41.5C16 38.5 9.5 32.5 9.5 23.5V12.5Z';
|
||||
|
||||
/** Jagged speech-bubble burst for 이의있음! */
|
||||
const BURST = Array.from({ length: 20 }, (_, i) => {
|
||||
const a = (i / 20) * Math.PI * 2 - Math.PI / 2;
|
||||
const r = i % 2 ? 0.78 : 1;
|
||||
return `${(24 + Math.cos(a) * 17 * r).toFixed(1)},${(22 + Math.sin(a) * 14 * r).toFixed(1)}`;
|
||||
}).join(' ');
|
||||
|
||||
/** Pentagram points (radius 13.5 round 24,25), drawn in star order. */
|
||||
const STAR = [0, 2, 4, 1, 3]
|
||||
.map((k) => {
|
||||
const a = -Math.PI / 2 + (k * 2 * Math.PI) / 5;
|
||||
return `${(24 + Math.cos(a) * 13.5).toFixed(2)},${(25 + Math.sin(a) * 13.5).toFixed(2)}`;
|
||||
})
|
||||
.join(' ');
|
||||
|
||||
export const GLYPHS_B: Partial<Record<AugId, ReactNode>> = {
|
||||
// 알까기: a white piece flicked into a red piece that flies off the board edge
|
||||
alkkagi: (
|
||||
<g>
|
||||
<path d="M38 7V41" stroke={C.w} strokeWidth="2.5" strokeLinecap="round" strokeDasharray="3 3" />
|
||||
<path d="M6 31h6M7 36h7M8 26h4" stroke={C.w} strokeWidth="2" strokeLinecap="round" opacity=".75" />
|
||||
<circle cx="19" cy="31" r="6.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d={spark(26.5, 23.5, 5)} fill={C.y} />
|
||||
<circle cx="33" cy="15.5" r="5.5" fill={C.r} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M39.5 9.5l2.5-2.5M40.5 14h2" stroke={C.w} strokeWidth="1.8" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 애묘인: a red heart with cat ears and a cat face
|
||||
catlover: (
|
||||
<g>
|
||||
<path d="M10.5 19L11.5 7.5L19.5 13.5Z M37.5 19L36.5 7.5L28.5 13.5Z" fill={C.r} stroke={C.rd} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<path d="M24 41C11 33 7 25 9.5 18.5C12 12 20 11.5 24 17C28 11.5 36 12 38.5 18.5C41 25 37 33 24 41Z" fill={C.r} stroke={C.rd} strokeWidth="1.2" />
|
||||
<ellipse cx="18.5" cy="24" rx="2" ry="2.6" fill={C.w} />
|
||||
<ellipse cx="29.5" cy="24" rx="2" ry="2.6" fill={C.w} />
|
||||
<path d="M22.5 28.5h3L24 30.2z" fill={C.pk} />
|
||||
<path d="M24 30.2q-1.8 1.8-3.4.6M24 30.2q1.8 1.8 3.4.6" stroke={C.w} strokeWidth="1.2" strokeLinecap="round" fill="none" />
|
||||
</g>
|
||||
),
|
||||
// 어부지리: a fishing rod with a fish on the hook
|
||||
fisherman: (
|
||||
<g>
|
||||
<path d="M8 41Q14 14 33 8" stroke={C.wood} strokeWidth="3" strokeLinecap="round" fill="none" />
|
||||
<path d="M8 41Q14 14 33 8" stroke={C.woodd} strokeWidth="1" strokeLinecap="round" fill="none" opacity=".6" />
|
||||
<path d="M33 8V20" stroke={C.w} strokeWidth="1.3" />
|
||||
<path d="M33 20v3.5a2 2 0 0 1-3.5 1.3" stroke={C.k} strokeWidth="1.4" fill="none" strokeLinecap="round" />
|
||||
<path d="M32 21.5C37.5 23.5 38.5 30 34 35L37.5 41H27.5L31 35C26.5 30 27 23.5 32 21.5Z" fill={C.w} stroke={C.k} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
<circle cx="32" cy="26" r="1.3" fill={C.k} />
|
||||
<path d="M29.5 30.5q2.5 1.5 5 0" stroke={C.k} strokeWidth="1" fill="none" />
|
||||
</g>
|
||||
),
|
||||
// 언제부터 착각한 거지?: an augment card growing cat ears, with dizzy swirl eyes
|
||||
illusion: (
|
||||
<g>
|
||||
<path d="M12 16L13 7L20 13Z M36 16L35 7L28 13Z" fill={C.w} />
|
||||
<path d="M13.8 13.5L14.2 10L17 12.5Z M34.2 13.5L33.8 10L31 12.5Z" fill={C.pk} />
|
||||
<rect x="10.5" y="12" width="27" height="29" rx="5" fill={C.w} />
|
||||
<path d="M17.6 26a1.4 1.4 0 1 1 1.4 1.4a2.8 2.8 0 1 1 2.8-2.8M30.4 26a1.4 1.4 0 1 0-1.4 1.4a2.8 2.8 0 1 0-2.8-2.8" stroke={C.k} strokeWidth="1.5" fill="none" strokeLinecap="round" />
|
||||
<path d="M21 34q3 2 6 0" stroke={C.k} strokeWidth="1.5" fill="none" strokeLinecap="round" />
|
||||
<path d={spark(38, 37, 4.5)} fill={C.y} />
|
||||
</g>
|
||||
),
|
||||
// 윷을 잘 던져봐: a 윷가락 flying into a dizzy head
|
||||
throwyut: (
|
||||
<g>
|
||||
<path d="M6 10l6 3M6 16l5 1.5M10 6l3 5" stroke={C.w} strokeWidth="1.8" strokeLinecap="round" opacity=".75" />
|
||||
<rect x="15.5" y="6" width="5.5" height="22" rx="2.75" transform="rotate(-50 18 17)" fill={C.wood} stroke={C.woodd} strokeWidth="1.2" />
|
||||
<circle cx="31" cy="32" r="9" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M26.5 30l3 3M29.5 30l-3 3M32.5 30l3 3M35.5 30l-3 3" stroke={C.k} strokeWidth="1.4" strokeLinecap="round" />
|
||||
<path d="M29 37.5h4" stroke={C.k} strokeWidth="1.4" strokeLinecap="round" />
|
||||
<path d={spark(27, 21, 3.5)} fill={C.y} />
|
||||
<path d={spark(37.5, 20.5, 3)} fill={C.y} />
|
||||
</g>
|
||||
),
|
||||
// 이도류: two 윷가락 crossed like swords, with sword grips
|
||||
dual: (
|
||||
<g>
|
||||
{[-35, 35].map((a) => (
|
||||
<g key={a} transform={`rotate(${a} 24 24)`}>
|
||||
<rect x="21.2" y="5.5" width="5.6" height="28" rx="2.8" fill={C.wood} stroke={C.woodd} strokeWidth="1.2" />
|
||||
<rect x="17.5" y="32" width="13" height="3.2" rx="1.6" fill={C.k} />
|
||||
<rect x="22.2" y="35" width="3.6" height="7" rx="1.6" fill={C.k} />
|
||||
</g>
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 이의있음!: a jagged shout bubble with a big "!"
|
||||
objection: (
|
||||
<g>
|
||||
<path d="M14 31L8 42L22 34Z" fill={C.w} />
|
||||
<polygon points={BURST} fill={C.w} strokeLinejoin="round" />
|
||||
<text x="24" y="31" textAnchor="middle" fontSize="23" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.r}>!</text>
|
||||
</g>
|
||||
),
|
||||
// 자진모리 장단: a 장구 (hourglass drum) with its cords
|
||||
jajinmori: (
|
||||
<g>
|
||||
<path d="M10 13.5L24 21L38 13.5V34.5L24 27L10 34.5Z" fill={C.r} stroke={C.rd} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<path d="M10 15L17 32.5L24 21L31 32.5L38 15M10 33L17 15.5L24 27L31 15.5L38 33" stroke={C.w} strokeWidth="1.1" fill="none" opacity=".9" />
|
||||
<ellipse cx="10" cy="24" rx="3.6" ry="11.5" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="38" cy="24" rx="3.6" ry="11.5" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<rect x="22.8" y="20" width="2.4" height="8" fill={C.y} />
|
||||
</g>
|
||||
),
|
||||
// 천마군림보 - 달걸음: a crescent moon inside a clockwise (reverse) arrow
|
||||
moonwalk: (
|
||||
<g>
|
||||
<path d="M10 24A14 14 0 1 1 17 36.1" stroke={C.w} strokeWidth="3" fill="none" strokeLinecap="round" />
|
||||
<path d="M11 30.5L19.6 32.5L13.8 39.6Z" fill={C.w} />
|
||||
<path d="M27 15A9 9 0 1 0 27 33A10.5 10.5 0 0 1 27 15Z" fill={C.y} />
|
||||
</g>
|
||||
),
|
||||
// 천상의 보호막: a blue-and-white shield with heavenly sparkles
|
||||
shield: (
|
||||
<g>
|
||||
<path d={SHIELD} fill={C.w} />
|
||||
<path d="M24 11.5L34.5 15.5V23.5C34.5 30.5 30 35 24 37.5C18 35 13.5 30.5 13.5 23.5V15.5Z" fill={C.b} />
|
||||
<path d="M24 11.5V37.5M13.5 23.5H34.5" stroke={C.w} strokeWidth="2.2" />
|
||||
<path d={spark(39, 8.5, 4)} fill={C.y} />
|
||||
<path d={spark(8.5, 36, 3)} fill={C.y} />
|
||||
</g>
|
||||
),
|
||||
// 크고 빨간 버튼: a big red push button on a grey base
|
||||
bigred: (
|
||||
<g>
|
||||
<ellipse cx="24" cy="36" rx="16" ry="5.5" fill={C.grd} />
|
||||
<rect x="8" y="30" width="32" height="6" fill={C.grd} />
|
||||
<ellipse cx="24" cy="30" rx="16" ry="5.5" fill={C.gr} stroke={C.grd} strokeWidth="1" />
|
||||
<path d="M12 30C12 15 36 15 36 30C36 33.5 12 33.5 12 30Z" fill={C.r} stroke={C.rd} strokeWidth="1.4" />
|
||||
<ellipse cx="19" cy="21.5" rx="3.2" ry="2" fill={C.w} opacity=".7" transform="rotate(-25 19 21.5)" />
|
||||
</g>
|
||||
),
|
||||
// 프랜드 실드: a white shield with a heart, two friends' pieces tucked behind it
|
||||
friendshield: (
|
||||
<g>
|
||||
<circle cx="11" cy="33" r="5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="37" cy="33" r="5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M24 8L35 12V22.5C35 30 30 35 24 38C18 35 13 30 13 22.5V12Z" fill={C.w} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<path d="M24 31C17.5 26.5 17 21.5 19 19.2C21 17 23.2 18 24 20C24.8 18 27 17 29 19.2C31 21.5 30.5 26.5 24 31Z" fill={C.r} />
|
||||
</g>
|
||||
),
|
||||
// 희생: a piece turned angel (halo and wings)
|
||||
sacrifice: (
|
||||
<g>
|
||||
<path d="M17 26C12 21 7 21 6 24C8 25 7 28 9 29C8 31 10 33 12 33C13 35 16 35 18 33Z" fill={C.w} stroke={C.k} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<path d="M31 26C36 21 41 21 42 24C40 25 41 28 39 29C40 31 38 33 36 33C35 35 32 35 30 33Z" fill={C.w} stroke={C.k} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<circle cx="24" cy="29" r="8.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M19.8 28.5q1.6 1.4 3.2 0M25 28.5q1.6 1.4 3.2 0" stroke={C.k} strokeWidth="1.2" fill="none" strokeLinecap="round" />
|
||||
<ellipse cx="24" cy="13.5" rx="7.5" ry="2.6" fill="none" stroke={C.y} strokeWidth="2.6" />
|
||||
</g>
|
||||
),
|
||||
// 히히 똥!: a grinning swirl of poop
|
||||
poop: (
|
||||
<g>
|
||||
<path d="M24 9C27 11 30 13 29 16.5C33 17 34.5 20.5 33 23C38 24 39.5 28 38 31C42.5 33 41 40 35 40H13C7 40 5.5 33 10 31C8.5 28 10 24 15 23C13.5 20.5 15 17 19 16.5C19 13 22 12.5 24 9Z" fill={C.wood} stroke={C.woodd} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<path d="M15 23Q24 25.5 33 23M10 31Q24 34 38 31" stroke={C.woodd} strokeWidth="1.2" fill="none" />
|
||||
<circle cx="19.5" cy="27" r="2.6" fill={C.w} />
|
||||
<circle cx="28.5" cy="27" r="2.6" fill={C.w} />
|
||||
<circle cx="20" cy="27.4" r="1.3" fill={C.k} />
|
||||
<circle cx="29" cy="27.4" r="1.3" fill={C.k} />
|
||||
<path d="M19 34.5Q24 38.5 29 34.5Z" fill={C.k} />
|
||||
</g>
|
||||
),
|
||||
// 등가교환: a level balance scale, a piece on one pan and a 윷가락 on the other
|
||||
equiv: (
|
||||
<g>
|
||||
<path d="M24 10V38M16 40H32M9 14H39" stroke={C.w} strokeWidth="2.5" strokeLinecap="round" />
|
||||
<circle cx="24" cy="10" r="2.5" fill={C.w} />
|
||||
<path d="M9 14L5.5 27M9 14L12.5 27M39 14L35.5 27M39 14L42.5 27" stroke={C.w} strokeWidth="1.1" />
|
||||
<path d="M5 27H13Q13 31 9 31Q5 31 5 27Z M35 27H43Q43 31 39 31Q35 31 35 27Z" fill={C.w} />
|
||||
<circle cx="9" cy="22.5" r="4.3" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<rect x="37.2" y="16.5" width="3.6" height="10.5" rx="1.8" fill={C.wood} stroke={C.woodd} strokeWidth="1" />
|
||||
</g>
|
||||
),
|
||||
// 말이오? 파티: a "?" item block
|
||||
party: (
|
||||
<g>
|
||||
<rect x="8.5" y="8.5" width="31" height="31" rx="3.5" fill={C.y} stroke={C.woodd} strokeWidth="2" />
|
||||
{[
|
||||
[12.5, 12.5],
|
||||
[35.5, 12.5],
|
||||
[12.5, 35.5],
|
||||
[35.5, 35.5],
|
||||
].map(([x, y]) => (
|
||||
<circle key={`${x}-${y}`} cx={x} cy={y} r="1.4" fill={C.woodd} />
|
||||
))}
|
||||
<text x="24" y="33.5" textAnchor="middle" fontSize="25" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.w} stroke={C.woodd} strokeWidth="1.5" paintOrder="stroke">?</text>
|
||||
</g>
|
||||
),
|
||||
// 스겜: a stopwatch with speed lines
|
||||
speedrun: (
|
||||
<g>
|
||||
<path d="M6 22h6M7 28h5M8 34h5" stroke={C.w} strokeWidth="2" strokeLinecap="round" opacity=".75" />
|
||||
<rect x="23.5" y="7" width="7" height="3.5" rx="1.2" fill={C.w} />
|
||||
<path d="M27 10.5v3M36 13.5l2.5-2.5" stroke={C.w} strokeWidth="2.6" strokeLinecap="round" />
|
||||
<circle cx="27" cy="27.5" r="13" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M27 17.5v2M37 27.5h-2M27 37.5v-2M17 27.5h2" stroke={C.k} strokeWidth="1.4" strokeLinecap="round" />
|
||||
<path d="M27 27.5L33 20" stroke={C.r} strokeWidth="2.4" strokeLinecap="round" />
|
||||
<circle cx="27" cy="27.5" r="1.8" fill={C.k} />
|
||||
</g>
|
||||
),
|
||||
// 시작 변환: 김첨지: a 인력거 (rickshaw) with its big wheel and long pull bars
|
||||
kim: (
|
||||
<g>
|
||||
<path d="M9 13Q11 8 19 8Q26 8 27 14V25H11Z" fill={C.r} stroke={C.rd} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<path d="M9 25H30L42 32" stroke={C.w} strokeWidth="2.6" strokeLinecap="round" strokeLinejoin="round" fill="none" />
|
||||
<circle cx="19" cy="32" r="8.5" fill="none" stroke={C.w} strokeWidth="2.6" />
|
||||
<path d="M19 23.5V40.5M10.5 32H27.5M13 26l12 12M25 26L13 38" stroke={C.w} strokeWidth="1.1" />
|
||||
<circle cx="19" cy="32" r="2" fill={C.k} />
|
||||
</g>
|
||||
),
|
||||
// 시작 변환: 중전마마: a piece wearing a golden crown
|
||||
queen: (
|
||||
<g>
|
||||
<circle cx="24" cy="31" r="9.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M11.5 22L13 9.5L18.5 15.5L24 7L29.5 15.5L35 9.5L36.5 22Z" fill={C.y} stroke={C.yd} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
<rect x="11.5" y="19.5" width="25" height="3.5" rx="1" fill={C.yd} />
|
||||
<circle cx="24" cy="15" r="1.8" fill={C.r} />
|
||||
<circle cx="20.5" cy="31" r="1.4" fill={C.k} />
|
||||
<circle cx="27.5" cy="31" r="1.4" fill={C.k} />
|
||||
<path d="M21.5 35q2.5 1.6 5 0" stroke={C.k} strokeWidth="1.2" fill="none" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 웅녀: a bear face holding a garlic bulb
|
||||
bear: (
|
||||
<g>
|
||||
<circle cx="11.5" cy="12.5" r="4.5" fill={C.wood} stroke={C.woodd} strokeWidth="1.3" />
|
||||
<circle cx="30.5" cy="12.5" r="4.5" fill={C.wood} stroke={C.woodd} strokeWidth="1.3" />
|
||||
<circle cx="21" cy="23" r="12" fill={C.wood} stroke={C.woodd} strokeWidth="1.3" />
|
||||
<ellipse cx="21" cy="27.5" rx="5.5" ry="4.2" fill={C.w} opacity=".85" />
|
||||
<ellipse cx="21" cy="25.6" rx="2" ry="1.4" fill={C.k} />
|
||||
<circle cx="16.5" cy="20.5" r="1.4" fill={C.k} />
|
||||
<circle cx="25.5" cy="20.5" r="1.4" fill={C.k} />
|
||||
<path d="M35 27.5C35 30 32 31 31 34.5C30 38.5 33 41.5 36 41.5C39 41.5 42 38.5 41 34.5C40 31 37 30 37 27.5Z" fill={C.w} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<path d="M36 25v3M36 32.5v8.5M33.5 34q0 5 2.5 7M38.5 34q0 5-2.5 7" stroke={C.k} strokeWidth="0.9" fill="none" />
|
||||
</g>
|
||||
),
|
||||
// 이리 오너라 업고 놀자: a tall tower of four stacked pieces
|
||||
piggyback: (
|
||||
<g>
|
||||
{[35, 27.5, 20, 12.5].map((y) => (
|
||||
<g key={y}>
|
||||
<path d={`M13 ${y}V${y + 4}A11 4 0 0 0 35 ${y + 4}V${y}`} fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="24" cy={y} rx="11" ry="4" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
</g>
|
||||
))}
|
||||
<circle cx="21" cy="12" r="1.1" fill={C.k} />
|
||||
<circle cx="27" cy="12" r="1.1" fill={C.k} />
|
||||
</g>
|
||||
),
|
||||
// 짐덩이와 복덩이: a red 복주머니 (lucky pouch) with a golden tie
|
||||
burden: (
|
||||
<g>
|
||||
<path d="M18 17C9 21 7.5 33 12 38C15 41 33 41 36 38C40.5 33 39 21 30 17Z" fill={C.r} stroke={C.rd} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
<path d="M18 17L14.5 9.5Q19 11 21 8Q24 11 27 8Q29 11 33.5 9.5L30 17Z" fill={C.r} stroke={C.rd} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
<rect x="16.5" y="15.5" width="15" height="3.5" rx="1.75" fill={C.y} stroke={C.yd} strokeWidth="1" />
|
||||
<path d="M22 19L19 26M26 19L29 26" stroke={C.y} strokeWidth="2" strokeLinecap="round" />
|
||||
<circle cx="24" cy="30.5" r="5.5" fill="none" stroke={C.y} strokeWidth="2" />
|
||||
<path d="M24 26.5V34.5M20 30.5H28" stroke={C.y} strokeWidth="1.6" />
|
||||
</g>
|
||||
),
|
||||
// 천상천하 유아독존: a single piece with golden rays all round it
|
||||
alone: (
|
||||
<g>
|
||||
{Array.from({ length: 12 }, (_, i) => {
|
||||
const a = (i * Math.PI) / 6;
|
||||
const r1 = 12.5;
|
||||
const r2 = i % 2 ? 16 : 18;
|
||||
return (
|
||||
<line key={i} x1={24 + Math.cos(a) * r1} y1={24 + Math.sin(a) * r1} x2={24 + Math.cos(a) * r2} y2={24 + Math.sin(a) * r2} stroke={C.y} strokeWidth="2.6" strokeLinecap="round" />
|
||||
);
|
||||
})}
|
||||
<circle cx="24" cy="24" r="9" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M24 26.5V19.5" stroke={C.k} strokeWidth="2.2" strokeLinecap="round" />
|
||||
<circle cx="24" cy="28.8" r="1.4" fill={C.k} />
|
||||
</g>
|
||||
),
|
||||
// 777: a slot-machine window showing 7 7 7
|
||||
triple7: (
|
||||
<g>
|
||||
<rect x="6.5" y="12" width="35" height="24" rx="4" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M18.2 12.8V35.2M29.8 12.8V35.2" stroke={C.gr} strokeWidth="1.2" />
|
||||
{[12.5, 24, 35.5].map((x) => (
|
||||
<text key={x} x={x} y="31" textAnchor="middle" fontSize="18" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.r}>7</text>
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 나만 친구 없어: a lonely crying piece
|
||||
nofriends: (
|
||||
<g>
|
||||
<circle cx="24" cy="25" r="14" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M16 20.5l4 1.5M32 20.5l-4 1.5" stroke={C.k} strokeWidth="1.5" strokeLinecap="round" />
|
||||
<circle cx="19" cy="25" r="1.6" fill={C.k} />
|
||||
<circle cx="29" cy="25" r="1.6" fill={C.k} />
|
||||
<path d="M19 33.5Q24 29.5 29 33.5" stroke={C.k} strokeWidth="1.6" fill="none" strokeLinecap="round" />
|
||||
<path d="M18 28.5C16.5 31.5 15.5 33 15.5 34.3a2.5 2.5 0 0 0 5 0C20.5 33 19.5 31.5 18 28.5Z" fill={C.b} stroke={C.bd} strokeWidth="1" />
|
||||
</g>
|
||||
),
|
||||
// 마신 소환: a glowing summoning circle with a pentagram
|
||||
summon: (
|
||||
<g>
|
||||
<circle cx="24" cy="25" r="16.5" fill={C.pd} stroke={C.w} strokeWidth="2.2" />
|
||||
<circle cx="24" cy="25" r="13.5" fill="none" stroke={C.p} strokeWidth="1" />
|
||||
<polygon points={STAR} fill="none" stroke={C.w} strokeWidth="1.8" strokeLinejoin="round" />
|
||||
<circle cx="24" cy="25.5" r="3" fill={C.r} />
|
||||
</g>
|
||||
),
|
||||
// 무신정변: a raised sword over four captured pieces
|
||||
coup: (
|
||||
<g>
|
||||
<path d="M24 5.5L27 10V27H21V10Z" fill={C.w} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<path d="M24 10V26" stroke={C.gr} strokeWidth="1" />
|
||||
<rect x="15" y="27" width="18" height="3.5" rx="1.5" fill={C.yd} stroke={C.woodd} strokeWidth="1" />
|
||||
<rect x="22" y="30.5" width="4" height="6.5" fill={C.woodd} />
|
||||
<circle cx="24" cy="38.5" r="2" fill={C.yd} />
|
||||
{[
|
||||
[9, 35, C.r],
|
||||
[13, 41, C.b],
|
||||
[35, 41, C.g],
|
||||
[39, 35, C.y],
|
||||
].map(([x, y, c]) => (
|
||||
<circle key={`${x}`} cx={x as number} cy={y as number} r="3.5" fill={c as string} stroke={C.k} strokeWidth="1.2" />
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
};
|
||||
350
apps/web/src/games/yut/aug-icons/glyphs-c.tsx
Normal file
350
apps/web/src/games/yut/aug-icons/glyphs-c.tsx
Normal file
@@ -0,0 +1,350 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import type { AugId } from '@bg/games/yut/augments';
|
||||
import { C } from './palette';
|
||||
|
||||
/** Heart path centred on (x, y), half-width s. */
|
||||
const heart = (x: number, y: number, s: number) =>
|
||||
`M${x} ${y + s * 0.95}C${x - s * 0.3} ${y + s * 0.6} ${x - s} ${y + s * 0.15} ${x - s} ${y - s * 0.3}A${s * 0.5} ${s * 0.5} 0 0 1 ${x} ${y - s * 0.55}A${s * 0.5} ${s * 0.5} 0 0 1 ${x + s} ${y - s * 0.3}C${x + s} ${y + s * 0.15} ${x + s * 0.3} ${y + s * 0.6} ${x} ${y + s * 0.95}Z`;
|
||||
|
||||
/** An upright sword with its tip at (24, 6) and pommel at (24, 41). */
|
||||
const sword = (
|
||||
<>
|
||||
<path d="M21.8 31V10.5L24 6L26.2 10.5V31Z" fill={C.w} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<rect x="17.5" y="30.5" width="13" height="3.4" rx="1.7" fill={C.wood} stroke={C.woodd} strokeWidth="1.2" />
|
||||
<rect x="22.4" y="33.8" width="3.2" height="5.6" fill={C.woodd} />
|
||||
<circle cx="24" cy="40.6" r="2" fill={C.wood} stroke={C.woodd} strokeWidth="1.1" />
|
||||
</>
|
||||
);
|
||||
|
||||
export const GLYPHS_C: Partial<Record<AugId, ReactNode>> = {
|
||||
// 역모: a crown with a dagger stabbed into it
|
||||
treason: (
|
||||
<g>
|
||||
<path d="M8.5 37L10 18.5L17 25.5L22.5 14L28 25.5L35 18.5L36.5 37Z" fill={C.y} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<circle cx="10" cy="17.5" r="2" fill={C.y} stroke={C.k} strokeWidth="1.2" />
|
||||
<circle cx="22.5" cy="13" r="2" fill={C.y} stroke={C.k} strokeWidth="1.2" />
|
||||
<circle cx="35" cy="17.5" r="2" fill={C.y} stroke={C.k} strokeWidth="1.2" />
|
||||
<circle cx="22.5" cy="31" r="2.2" fill={C.r} stroke={C.k} strokeWidth="1" />
|
||||
<g transform="rotate(35 33 24)">
|
||||
<path d="M31 30V14.5L33 10L35 14.5V30Z" fill={C.w} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<rect x="28" y="29.5" width="10" height="3" rx="1.5" fill={C.k} />
|
||||
<rect x="31.5" y="32.5" width="3" height="7" rx="1.2" fill={C.rd} stroke={C.k} strokeWidth="1" />
|
||||
</g>
|
||||
</g>
|
||||
),
|
||||
// 잠깐!: a white "stop" palm on a red stop-sign octagon
|
||||
wait: (
|
||||
<g>
|
||||
<polygon points="17,6.5 31,6.5 41.5,17 41.5,31 31,41.5 17,41.5 6.5,31 6.5,17" fill={C.r} stroke={C.w} strokeWidth="2" strokeLinejoin="round" />
|
||||
<g fill={C.w} stroke={C.k} strokeWidth="1.3">
|
||||
<rect x="9.5" y="22" width="5" height="11" rx="2.5" transform="rotate(-35 12 30)" />
|
||||
<rect x="15.2" y="14" width="4.4" height="14" rx="2.2" />
|
||||
<rect x="19.6" y="11" width="4.4" height="16" rx="2.2" />
|
||||
<rect x="24" y="11.5" width="4.4" height="16" rx="2.2" />
|
||||
<rect x="28.4" y="14.5" width="4.4" height="14" rx="2.2" />
|
||||
<path d="M15.2 24H32.8V31Q32.8 37.5 24 37.5Q15.2 37.5 15.2 31Z" />
|
||||
</g>
|
||||
</g>
|
||||
),
|
||||
// 평화 협정: a peace sign
|
||||
peace: (
|
||||
<g fill="none" stroke={C.w} strokeWidth="4" strokeLinecap="round">
|
||||
<circle cx="24" cy="24" r="15" />
|
||||
<path d="M24 9.5V38.5M24 24L13.5 34.5M24 24L34.5 34.5" />
|
||||
</g>
|
||||
),
|
||||
// 계획대로: a clipboard listing everyone in order, all ticked
|
||||
plan: (
|
||||
<g>
|
||||
<rect x="10.5" y="9" width="27" height="33" rx="3" fill={C.wood} stroke={C.woodd} strokeWidth="1.4" />
|
||||
<rect x="13.5" y="13" width="21" height="26" rx="1.5" fill={C.w} />
|
||||
<rect x="18.5" y="6.5" width="11" height="5.5" rx="2" fill={C.gr} stroke={C.k} strokeWidth="1.3" />
|
||||
{([C.y, C.r, C.b] as const).map((c, i) => (
|
||||
<g key={c}>
|
||||
<circle cx="18.5" cy={19 + i * 7} r="2.6" fill={c} stroke={C.k} strokeWidth="1.1" />
|
||||
<path d={`M24 ${19 + i * 7}l2.3 2.3l4.5-4.8`} fill="none" stroke={C.gd} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</g>
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 나에게 윷놀이는 "살인"이다: three life hearts (one lost) over a knife
|
||||
murder: (
|
||||
<g>
|
||||
<path d={heart(12.5, 14, 5)} fill={C.r} stroke={C.k} strokeWidth="1.3" />
|
||||
<path d={heart(24, 14, 5)} fill={C.r} stroke={C.k} strokeWidth="1.3" />
|
||||
<path d={heart(35.5, 14, 5)} fill={C.gr} stroke={C.k} strokeWidth="1.3" />
|
||||
<path d="M19 26.5H36Q42 26.5 42 29Q36 34 19 34Z" fill={C.w} stroke={C.k} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
<rect x="6" y="27" width="13.5" height="6.5" rx="2.5" fill={C.k} />
|
||||
<circle cx="10" cy="30.2" r="1" fill={C.gr} />
|
||||
<circle cx="15" cy="30.2" r="1" fill={C.gr} />
|
||||
<path d="M37.5 35.5q1.5 2.5 0 4q-1.5-1.5 0-4Z" fill={C.r} />
|
||||
</g>
|
||||
),
|
||||
// 네크로맨서: a skull with glowing green eyes and rising green sparks
|
||||
necro: (
|
||||
<g>
|
||||
<path d="M12 21.5A12 12 0 0 1 36 21.5Q36 27 32 30V36.5Q32 39 29.5 39H18.5Q16 39 16 36.5V30Q12 27 12 21.5Z" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<ellipse cx="19.3" cy="23.5" rx="3.6" ry="3.9" fill={C.k} />
|
||||
<ellipse cx="28.7" cy="23.5" rx="3.6" ry="3.9" fill={C.k} />
|
||||
<circle cx="19.3" cy="23.8" r="1.9" fill={C.g} />
|
||||
<circle cx="28.7" cy="23.8" r="1.9" fill={C.g} />
|
||||
<path d="M22.4 31.5L24 28.5L25.6 31.5Z" fill={C.k} />
|
||||
<path d="M20.5 34.5V39M24 34.5V39M27.5 34.5V39" stroke={C.k} strokeWidth="1.2" />
|
||||
<path d="M7.5 15l1.2-3l1.2 3l3 1.2l-3 1.2l-1.2 3l-1.2-3l-3-1.2Z M38.5 9l1-2.5l1 2.5l2.5 1l-2.5 1l-1 2.5l-1-2.5l-2.5-1Z" fill={C.g} />
|
||||
</g>
|
||||
),
|
||||
// 독이 든 성배: a golden goblet bubbling green poison, skull on the cup
|
||||
poison: (
|
||||
<g>
|
||||
<path d="M11.5 13H36.5Q36.5 28.5 24 29.5Q11.5 28.5 11.5 13Z" fill={C.y} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<ellipse cx="24" cy="13" rx="12.5" ry="3" fill={C.g} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M14.5 13.5q0 4.5 1.5 6.5" fill="none" stroke={C.g} strokeWidth="2.2" strokeLinecap="round" />
|
||||
<circle cx="20" cy="8" r="2.4" fill={C.g} stroke={C.k} strokeWidth="1" />
|
||||
<circle cx="27.5" cy="6.8" r="1.7" fill={C.g} stroke={C.k} strokeWidth="1" />
|
||||
<circle cx="24" cy="20.5" r="4" fill={C.w} stroke={C.k} strokeWidth="1.1" />
|
||||
<circle cx="22.5" cy="20.2" r="1.1" fill={C.k} />
|
||||
<circle cx="25.5" cy="20.2" r="1.1" fill={C.k} />
|
||||
<rect x="22" y="29" width="4" height="6.5" fill={C.yd} stroke={C.k} strokeWidth="1.2" />
|
||||
<path d="M15 40.5Q15 35.5 24 35.5Q33 35.5 33 40.5Z" fill={C.y} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 동메달도 잘한 거야: a bronze medal with a big 3 on a ribbon
|
||||
bronze: (
|
||||
<g>
|
||||
<path d="M12.5 6.5H20.5L27 21L21 24Z" fill={C.r} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<path d="M35.5 6.5H27.5L21 21L27 24Z" fill={C.b} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<circle cx="24" cy="30" r="11.5" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<circle cx="24" cy="30" r="8.6" fill={C.o} stroke={C.woodd} strokeWidth="1.2" />
|
||||
<text x="24" y="35.2" textAnchor="middle" fontSize="15" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.k}>3</text>
|
||||
</g>
|
||||
),
|
||||
// 라스트 댄스: a pair of beamed music notes with a sparkle
|
||||
lastdance: (
|
||||
<g>
|
||||
<path d="M17.5 33V13.5L36.5 8.5V28.5" fill="none" stroke={C.w} strokeWidth="3" strokeLinejoin="round" />
|
||||
<path d="M17.5 12L36.5 7V13L17.5 18Z" fill={C.w} />
|
||||
<ellipse cx="13.5" cy="34" rx="5.2" ry="4" transform="rotate(-22 13.5 34)" fill={C.w} stroke={C.k} strokeWidth="1.3" />
|
||||
<ellipse cx="32.5" cy="29.5" rx="5.2" ry="4" transform="rotate(-22 32.5 29.5)" fill={C.w} stroke={C.k} strokeWidth="1.3" />
|
||||
<path d="M38 38.5l1-2.5l1 2.5l2.5 1l-2.5 1l-1 2.5l-1-2.5l-2.5-1Z" fill={C.y} />
|
||||
<path d="M8.5 13l.9-2.2l.9 2.2l2.2.9l-2.2.9l-.9 2.2l-.9-2.2l-2.2-.9Z" fill={C.y} />
|
||||
</g>
|
||||
),
|
||||
// 메아리의 형상: a piece sending out echo waves on both sides
|
||||
echo: (
|
||||
<g fill="none" stroke={C.w} strokeLinecap="round">
|
||||
<circle cx="24" cy="24" r="6" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M32.5 16.5A11 11 0 0 1 32.5 31.5M15.5 16.5A11 11 0 0 0 15.5 31.5" strokeWidth="3" />
|
||||
<path d="M37 11.5A17.5 17.5 0 0 1 37 36.5M11 11.5A17.5 17.5 0 0 0 11 36.5" strokeWidth="3" opacity=".55" />
|
||||
</g>
|
||||
),
|
||||
// 변환: 마라토너: a running figure with speed lines
|
||||
marathon: (
|
||||
<g fill="none" stroke={C.w} strokeLinecap="round" strokeLinejoin="round">
|
||||
<circle cx="30" cy="10.5" r="4.2" fill={C.w} stroke="none" />
|
||||
<path d="M27.5 16.5L23 27.5" strokeWidth="4.2" />
|
||||
<path d="M26.5 18L19.5 21L16.5 17M26.5 18L32 23.5L37 21" strokeWidth="3.2" />
|
||||
<path d="M23 27.5L30 32L28.5 40M23 27.5L18.5 34.5L11 34" strokeWidth="3.6" />
|
||||
<path d="M7 16H13M6.5 22.5H11.5M8 29H13" strokeWidth="2" opacity=".7" />
|
||||
</g>
|
||||
),
|
||||
// 승부다!: two crossed swords
|
||||
duel: (
|
||||
<g>
|
||||
<g transform="rotate(-42 24 24)">{sword}</g>
|
||||
<g transform="rotate(42 24 24)">{sword}</g>
|
||||
</g>
|
||||
),
|
||||
// 역전 찬스: three fanned mystery cards
|
||||
comeback: (
|
||||
<g>
|
||||
{[-22, 22, 0].map((a) => (
|
||||
<g key={a} transform={`rotate(${a} 24 40)`}>
|
||||
<rect x="16.5" y="10" width="15" height="21" rx="2.5" fill={C.w} stroke={C.k} strokeWidth="1.4" />
|
||||
<text x="24" y="26.5" textAnchor="middle" fontSize="14" fontWeight="900" fontFamily="system-ui, sans-serif" fill={a === 0 ? C.pd : C.p}>?</text>
|
||||
</g>
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 영역 전개: a stack of pieces sealed under a barrier dome
|
||||
domain: (
|
||||
<g>
|
||||
<path d="M6.5 37A17.5 17.5 0 0 1 41.5 37Z" fill={C.w} fillOpacity=".25" stroke={C.w} strokeWidth="2.5" strokeLinejoin="round" />
|
||||
<path d="M12.5 37A11.5 11.5 0 0 1 35.5 37" fill="none" stroke={C.w} strokeWidth="1.4" strokeDasharray="2.5 2.5" />
|
||||
<path d="M6 37H42" stroke={C.w} strokeWidth="2.5" strokeLinecap="round" />
|
||||
<circle cx="24" cy="32" r="5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="24" cy="27" r="5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M24 8.5V13M15 12l2 3.5M33 12l-2 3.5" stroke={C.y} strokeWidth="2" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 취~소: a trophy under a red "no" sign
|
||||
cancel: (
|
||||
<g>
|
||||
<path d="M16 12.5Q10 12.5 10 17.5Q10 22 17 23M32 12.5Q38 12.5 38 17.5Q38 22 31 23" fill="none" stroke={C.k} strokeWidth="1.8" />
|
||||
<path d="M16 10H32V18Q32 27 24 27Q16 27 16 18Z" fill={C.y} stroke={C.k} strokeWidth="1.5" />
|
||||
<rect x="22" y="26.5" width="4" height="5" fill={C.yd} stroke={C.k} strokeWidth="1.2" />
|
||||
<rect x="17" y="31.5" width="14" height="5" rx="1.5" fill={C.y} stroke={C.k} strokeWidth="1.5" />
|
||||
<g fill="none" strokeLinecap="round">
|
||||
<circle cx="24" cy="24" r="16" stroke={C.w} strokeWidth="6.5" />
|
||||
<path d="M12.7 12.7L35.3 35.3" stroke={C.w} strokeWidth="6.5" />
|
||||
<circle cx="24" cy="24" r="16" stroke={C.r} strokeWidth="3.8" />
|
||||
<path d="M12.7 12.7L35.3 35.3" stroke={C.r} strokeWidth="3.8" />
|
||||
</g>
|
||||
</g>
|
||||
),
|
||||
// 카니발리즘: a white piece with a gaping mouth about to eat another white piece
|
||||
cannibal: (
|
||||
<g>
|
||||
<path d="M21 24L32.3 17.5A13 13 0 1 0 32.3 30.5Z" fill={C.w} stroke={C.k} strokeWidth="1.5" strokeLinejoin="round" />
|
||||
<circle cx="19" cy="17.5" r="1.9" fill={C.k} />
|
||||
<path d="M27 21.2l1.3 2.3l1.3-3M27 26.8l1.3-2.3l1.3 3" fill={C.w} stroke={C.k} strokeWidth=".9" strokeLinejoin="round" />
|
||||
<circle cx="37" cy="24" r="4.8" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M35.3 23.3h.1M38.7 23.3h.1" stroke={C.k} strokeWidth="1.6" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 순간이동: a piece jumping from a blue portal to an orange one
|
||||
teleport: (
|
||||
<g>
|
||||
<ellipse cx="11" cy="30" rx="4.5" ry="10" fill={C.b} stroke={C.w} strokeWidth="2" />
|
||||
<ellipse cx="37" cy="30" rx="4.5" ry="10" fill={C.o} stroke={C.w} strokeWidth="2" />
|
||||
<path d="M13 17Q24 2 34 15" fill="none" stroke={C.w} strokeWidth="2.4" strokeDasharray="3 3" strokeLinecap="round" />
|
||||
<path d="M30.5 15.5L35 17L35.8 12.3" fill="none" stroke={C.w} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" />
|
||||
<circle cx="11" cy="30" r="4" fill={C.w} opacity=".45" />
|
||||
<circle cx="34" cy="30" r="5.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
</g>
|
||||
),
|
||||
// 지름길 달인: the board with a bold arrow cutting across the diagonal
|
||||
shortcut: (
|
||||
<g>
|
||||
<g fill="none" stroke={C.w} strokeWidth="2" opacity=".55">
|
||||
<rect x="8.5" y="8.5" width="31" height="31" rx="1" />
|
||||
<path d="M8.5 8.5L39.5 39.5" />
|
||||
</g>
|
||||
<g fill={C.w}>
|
||||
{[[8.5, 8.5], [39.5, 8.5], [8.5, 39.5], [39.5, 39.5], [24, 24]].map(([x, y]) => (
|
||||
<circle key={`${x}-${y}`} cx={x} cy={y} r="2.6" />
|
||||
))}
|
||||
</g>
|
||||
<path d="M37 11L13.5 34.5" stroke={C.y} strokeWidth="4.5" strokeLinecap="round" />
|
||||
<path d="M11 24.5V37H23.5" fill="none" stroke={C.y} strokeWidth="4.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 거북이 등껍질: a turtle seen from above, big patterned shell
|
||||
turtle: (
|
||||
<g>
|
||||
<g fill={C.gd} stroke={C.k} strokeWidth="1.3">
|
||||
<circle cx="24" cy="9.5" r="4.2" />
|
||||
<ellipse cx="12" cy="17" rx="3.5" ry="4.5" transform="rotate(-45 12 17)" />
|
||||
<ellipse cx="36" cy="17" rx="3.5" ry="4.5" transform="rotate(45 36 17)" />
|
||||
<ellipse cx="12" cy="35" rx="3.5" ry="4.5" transform="rotate(45 12 35)" />
|
||||
<ellipse cx="36" cy="35" rx="3.5" ry="4.5" transform="rotate(-45 36 35)" />
|
||||
<path d="M22 38L24 42.5L26 38Z" />
|
||||
</g>
|
||||
<circle cx="22.3" cy="8.5" r=".9" fill={C.k} />
|
||||
<circle cx="25.7" cy="8.5" r=".9" fill={C.k} />
|
||||
<ellipse cx="24" cy="26" rx="12.5" ry="13" fill={C.g} stroke={C.k} strokeWidth="1.5" />
|
||||
<g fill="none" stroke={C.gd} strokeWidth="1.6" strokeLinejoin="round">
|
||||
<polygon points="24,20.5 28.8,23.3 28.8,28.7 24,31.5 19.2,28.7 19.2,23.3" />
|
||||
<path d="M24 20.5V13.5M28.8 23.3L35 19.5M28.8 28.7L35 32.5M24 31.5V38.5M19.2 28.7L13 32.5M19.2 23.3L13 19.5" />
|
||||
</g>
|
||||
</g>
|
||||
),
|
||||
// 복수의 칼날: a dagger inside a red "comes back around" arrow
|
||||
revenge: (
|
||||
<g>
|
||||
<path d="M36.5 15.5A14.5 14.5 0 1 0 38.5 27" fill="none" stroke={C.r} strokeWidth="3.6" strokeLinecap="round" />
|
||||
<path d="M31.5 13.5L38.5 16.5L39.3 9" fill="none" stroke={C.r} strokeWidth="3.6" strokeLinecap="round" strokeLinejoin="round" />
|
||||
<g transform="rotate(40 24 24)">
|
||||
<path d="M21.8 27.5V12L24 7.5L26.2 12V27.5Z" fill={C.w} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<rect x="18.5" y="27" width="11" height="3" rx="1.5" fill={C.k} />
|
||||
<rect x="22.4" y="30" width="3.2" height="7" rx="1.2" fill={C.woodd} stroke={C.k} strokeWidth="1" />
|
||||
</g>
|
||||
</g>
|
||||
),
|
||||
// 손버릇: a burglar face with a black eye mask
|
||||
thief: (
|
||||
<g>
|
||||
<circle cx="24" cy="26" r="14" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M10.2 23.5A14 14 0 0 1 37.8 23.5Q37 13 24 11.5Q11 13 10.2 23.5Z" fill={C.k} />
|
||||
<path d="M8 24Q24 18 40 24L39 30Q24 25.5 9 30Z" fill={C.k} />
|
||||
<ellipse cx="18.5" cy="25.5" rx="3" ry="2.3" fill={C.w} />
|
||||
<ellipse cx="29.5" cy="25.5" rx="3" ry="2.3" fill={C.w} />
|
||||
<circle cx="19.2" cy="25.6" r="1.2" fill={C.k} />
|
||||
<circle cx="30.2" cy="25.6" r="1.2" fill={C.k} />
|
||||
<path d="M19 33.5Q24 37 29.5 32.5" fill="none" stroke={C.k} strokeWidth="1.6" strokeLinecap="round" />
|
||||
<path d="M10 11Q24 3 38 11" fill="none" stroke={C.r} strokeWidth="3" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 지뢰 매설: a spiked mine with a red light, half-buried in the ground
|
||||
mine: (
|
||||
<g>
|
||||
<g stroke={C.k} strokeWidth="3" strokeLinecap="round">
|
||||
{[0, 45, 90, 135, 180, 225, 270, 315].map((a) => (
|
||||
<path key={a} d="M24 11V14" transform={`rotate(${a} 24 25)`} />
|
||||
))}
|
||||
</g>
|
||||
<circle cx="24" cy="25" r="10.5" fill={C.k} />
|
||||
<path d="M17.5 22A7 7 0 0 1 22 17.5" fill="none" stroke={C.w} strokeWidth="2" strokeLinecap="round" opacity=".7" />
|
||||
<circle cx="24" cy="25" r="2.6" fill={C.r} stroke={C.w} strokeWidth="1" />
|
||||
<path d="M6.5 37.5H41.5" stroke={C.wood} strokeWidth="5" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
// 호랑이 기운: an orange tiger face with black stripes
|
||||
tiger: (
|
||||
<g>
|
||||
<circle cx="12.5" cy="12.5" r="5" fill={C.o} stroke={C.k} strokeWidth="1.4" />
|
||||
<circle cx="35.5" cy="12.5" r="5" fill={C.o} stroke={C.k} strokeWidth="1.4" />
|
||||
<circle cx="12.5" cy="12.5" r="2.2" fill={C.w} />
|
||||
<circle cx="35.5" cy="12.5" r="2.2" fill={C.w} />
|
||||
<ellipse cx="24" cy="25" rx="16" ry="15" fill={C.o} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M19.5 12.5H28.5M20.5 16H27.5M24 12.5V19M8.5 22.5L13 24M8.5 27.5L13 27.5M39.5 22.5L35 24M39.5 27.5L35 27.5" stroke={C.k} strokeWidth="1.8" strokeLinecap="round" />
|
||||
<ellipse cx="19.5" cy="33" rx="5.3" ry="4.5" fill={C.w} />
|
||||
<ellipse cx="28.5" cy="33" rx="5.3" ry="4.5" fill={C.w} />
|
||||
<ellipse cx="18" cy="24.5" rx="1.9" ry="2.3" fill={C.k} />
|
||||
<ellipse cx="30" cy="24.5" rx="1.9" ry="2.3" fill={C.k} />
|
||||
<path d="M21.5 29H26.5L24 31.5Z" fill={C.k} stroke={C.k} strokeWidth="1" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 쌍둥이: two identical smiling pieces side by side
|
||||
twins: (
|
||||
<g>
|
||||
{[16, 32].map((x) => (
|
||||
<g key={x}>
|
||||
<circle cx={x} cy="25" r="9" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx={x - 3} cy="23" r="1.4" fill={C.k} />
|
||||
<circle cx={x + 3} cy="23" r="1.4" fill={C.k} />
|
||||
<path d={`M${x - 3.2} 27.5q3.2 2.8 6.4 0`} fill="none" stroke={C.k} strokeWidth="1.4" strokeLinecap="round" />
|
||||
</g>
|
||||
))}
|
||||
<path d={heart(24, 12, 3.6)} fill={C.pk} stroke={C.k} strokeWidth="1.1" />
|
||||
</g>
|
||||
),
|
||||
// 자리 바꾸기: a white piece and a red piece trading places along two arrows
|
||||
swap: (
|
||||
<g>
|
||||
<g fill="none" stroke={C.w} strokeWidth="2.8" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M13 15Q24 4 35 15" />
|
||||
<path d="M30.5 14.5L35.5 15.5L36 10.5" />
|
||||
<path d="M35 33Q24 44 13 33" />
|
||||
<path d="M17.5 33.5L12.5 32.5L12 37.5" />
|
||||
</g>
|
||||
<circle cx="12" cy="24" r="6" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="36" cy="24" r="6" fill={C.r} stroke={C.k} strokeWidth="1.5" />
|
||||
</g>
|
||||
),
|
||||
// 회오리: a tornado flinging pieces around
|
||||
storm: (
|
||||
<g>
|
||||
<g fill="none" stroke={C.w} strokeWidth="3.4" strokeLinecap="round">
|
||||
<path d="M9 9.5H37" />
|
||||
<path d="M12 16H35" />
|
||||
<path d="M15 22.5H31" />
|
||||
<path d="M18 29H28.5" />
|
||||
<path d="M21.5 35H26.5" />
|
||||
<path d="M23.5 40.5H24.5" />
|
||||
</g>
|
||||
<circle cx="9.5" cy="27" r="3.6" fill={C.r} stroke={C.k} strokeWidth="1.3" />
|
||||
<circle cx="38.5" cy="29.5" r="3.6" fill={C.y} stroke={C.k} strokeWidth="1.3" />
|
||||
<circle cx="35" cy="39" r="2.8" fill={C.g} stroke={C.k} strokeWidth="1.2" />
|
||||
</g>
|
||||
),
|
||||
};
|
||||
238
apps/web/src/games/yut/aug-icons/glyphs-d.tsx
Normal file
238
apps/web/src/games/yut/aug-icons/glyphs-d.tsx
Normal file
@@ -0,0 +1,238 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import type { AugId } from '@bg/games/yut/augments';
|
||||
import { C } from './palette';
|
||||
|
||||
/** A game piece (말): round token. */
|
||||
const piece = (cx: number, cy: number, r: number, fill: string = C.w, key?: string | number) => (
|
||||
<circle key={key} cx={cx} cy={cy} r={r} fill={fill} stroke={C.k} strokeWidth="1.5" />
|
||||
);
|
||||
|
||||
/** A curved "turn around" arrow half (used twice for 다시 던지기). */
|
||||
const refreshHalf = (
|
||||
<g>
|
||||
<path d="M10.8 19.2A14 14 0 0 1 34.7 15" stroke={C.w} strokeWidth="3.4" strokeLinecap="round" fill="none" />
|
||||
<polygon points="38.4,19.3 30.3,16.9 37.4,10.5" fill={C.w} />
|
||||
</g>
|
||||
);
|
||||
|
||||
export const GLYPHS_D: Partial<Record<AugId, ReactNode>> = {
|
||||
// 다시 던지기: a 윷가락 inside a circular "again" arrow
|
||||
reroll: (
|
||||
<g>
|
||||
{refreshHalf}
|
||||
<g transform="rotate(180 24 24)">{refreshHalf}</g>
|
||||
<rect x="20.5" y="12.5" width="7" height="23" rx="3.5" fill={C.wood} stroke={C.woodd} strokeWidth="1.4" />
|
||||
</g>
|
||||
),
|
||||
// 곱빼기: one 윷가락 and its yellow copy, "×2"
|
||||
double: (
|
||||
<g>
|
||||
<rect x="7" y="11" width="5.5" height="26" rx="2.75" fill={C.wood} stroke={C.woodd} strokeWidth="1.3" />
|
||||
<rect x="14.5" y="11" width="5.5" height="26" rx="2.75" fill={C.y} stroke={C.woodd} strokeWidth="1.3" />
|
||||
<text x="31" y="31" textAnchor="middle" fontSize="17" fontWeight="900" fontFamily="system-ui, sans-serif" fill={C.w}>×2</text>
|
||||
</g>
|
||||
),
|
||||
// 올인: two stacks of poker chips
|
||||
gamble: (
|
||||
<g>
|
||||
{[0, 1, 2, 3, 4].map((i) => (
|
||||
<g key={`a${i}`}>
|
||||
<ellipse cx="17" cy={38 - i * 5} rx="9.5" ry="3.8" fill={C.r} stroke={C.k} strokeWidth="1.3" />
|
||||
<path d={`M10 ${38 - i * 5}h2.5M21.5 ${38 - i * 5}h2.5`} stroke={C.w} strokeWidth="1.6" />
|
||||
</g>
|
||||
))}
|
||||
{[0, 1, 2].map((i) => (
|
||||
<g key={`b${i}`}>
|
||||
<ellipse cx="32" cy={38 - i * 5} rx="9.5" ry="3.8" fill={C.w} stroke={C.k} strokeWidth="1.3" />
|
||||
<path d={`M25 ${38 - i * 5}h2.5M36.5 ${38 - i * 5}h2.5`} stroke={C.k} strokeWidth="1.6" />
|
||||
</g>
|
||||
))}
|
||||
<ellipse cx="32" cy="28" rx="5" ry="1.8" fill="none" stroke={C.k} strokeWidth="1" />
|
||||
<ellipse cx="17" cy="18" rx="5" ry="1.8" fill="none" stroke={C.w} strokeWidth="1" />
|
||||
</g>
|
||||
),
|
||||
// 저주 인형: a stitched voodoo doll with a red pin
|
||||
curse: (
|
||||
<g>
|
||||
<circle cx="22" cy="15" r="8" fill={C.w} />
|
||||
<path d="M14 23h16l6 5-2 3-4-3v4l3 9h-5l-4-7-4 7h-5l3-9v-4l-4 3-2-3z" fill={C.w} strokeLinejoin="round" />
|
||||
<path d="M17.5 12.5l3 3M20.5 12.5l-3 3M23.5 12.5l3 3M26.5 12.5l-3 3M18 19.5h8M19.5 18.5v2M22 18.5v2M24.5 18.5v2" stroke={C.k} strokeWidth="1.3" strokeLinecap="round" />
|
||||
<path d="M22 26v6" stroke={C.k} strokeWidth="1.1" strokeDasharray="1.4 1.4" />
|
||||
<line x1="38" y1="9" x2="26" y2="21" stroke={C.grd} strokeWidth="1.6" strokeLinecap="round" />
|
||||
<circle cx="38.5" cy="8.5" r="3" fill={C.r} stroke={C.k} strokeWidth="1.2" />
|
||||
</g>
|
||||
),
|
||||
// 얼음!: a snowflake
|
||||
freeze: (
|
||||
<g stroke={C.w} strokeLinecap="round" fill="none">
|
||||
{[0, 60, 120].map((a) => (
|
||||
<g key={a} transform={`rotate(${a} 24 24)`}>
|
||||
<line x1="24" y1="7" x2="24" y2="41" strokeWidth="3.2" />
|
||||
<path d="M18.5 9.5L24 14l5.5-4.5M18.5 38.5L24 34l5.5 4.5" strokeWidth="2.6" strokeLinejoin="round" />
|
||||
</g>
|
||||
))}
|
||||
<circle cx="24" cy="24" r="3.4" fill={C.b} stroke={C.w} strokeWidth="2" />
|
||||
</g>
|
||||
),
|
||||
// 자석: a red horseshoe magnet pulling a piece
|
||||
magnet: (
|
||||
<g>
|
||||
<path d="M27 15H19A9 9 0 0 0 19 33H27" stroke={C.k} strokeWidth="10.5" fill="none" />
|
||||
<path d="M27 15H19A9 9 0 0 0 19 33H27" stroke={C.r} strokeWidth="7.5" fill="none" />
|
||||
<rect x="23" y="11.25" width="6" height="7.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<rect x="23" y="29.25" width="6" height="7.5" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<path d="M32 19.5q2.5 4.5 0 9" stroke={C.w} strokeWidth="1.8" strokeLinecap="round" fill="none" />
|
||||
{piece(38.5, 24, 4.5, C.y)}
|
||||
</g>
|
||||
),
|
||||
// 뒤로 돌아: a piece pushed back by a U-turn arrow
|
||||
pushback: (
|
||||
<g>
|
||||
<path d="M34 25V20A9.5 9.5 0 0 0 15 20V27" stroke={C.w} strokeWidth="4" strokeLinecap="round" fill="none" />
|
||||
<polygon points="8.5,26 21.5,26 15,35" fill={C.w} />
|
||||
{piece(34, 33, 6.5, C.r)}
|
||||
</g>
|
||||
),
|
||||
// 꼴찌의 반란: falling bars, the last one rising with a yellow arrow
|
||||
underdog: (
|
||||
<g>
|
||||
<rect x="8" y="16" width="8" height="23" rx="1.5" fill={C.w} opacity=".45" />
|
||||
<rect x="19" y="25" width="8" height="14" rx="1.5" fill={C.w} opacity=".45" />
|
||||
<rect x="30" y="33" width="8" height="6" rx="1.5" fill={C.w} />
|
||||
<path d="M34 30V13" stroke={C.k} strokeWidth="6" strokeLinecap="round" />
|
||||
<path d="M34 30V13" stroke={C.y} strokeWidth="3.6" strokeLinecap="round" />
|
||||
<polygon points="34,6 41,15 27,15" fill={C.y} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 텃세: my house guarded by a shield
|
||||
homeground: (
|
||||
<g>
|
||||
<polygon points="21,7 37,21 5,21" fill={C.w} strokeLinejoin="round" />
|
||||
<rect x="9" y="20" width="24" height="18" fill={C.w} />
|
||||
<rect x="17" y="27" width="8" height="11" rx="1" fill={C.k} />
|
||||
<path d="M35 24l7 2.5v5.5c0 4.5-3 7.5-7 9c-4-1.5-7-4.5-7-9v-5.5z" fill={C.b} stroke={C.bd} strokeWidth="1.6" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 따라쟁이: an augment card and its copy
|
||||
copycat: (
|
||||
<g>
|
||||
<rect x="8" y="9" width="20" height="26" rx="3" fill={C.p} stroke={C.k} strokeWidth="1.5" transform="rotate(-8 18 22)" />
|
||||
<rect x="19" y="14" width="20" height="26" rx="3" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<polygon points="29,19.5 31.2,24.3 36.3,24.8 32.4,28.2 33.6,33.2 29,30.6 24.4,33.2 25.6,28.2 21.7,24.8 26.8,24.3" fill={C.y} stroke={C.yd} strokeWidth="1" strokeLinejoin="round" />
|
||||
</g>
|
||||
),
|
||||
// 청개구리: a green frog face
|
||||
frog: (
|
||||
<g>
|
||||
<circle cx="15.5" cy="17" r="6.5" fill={C.g} stroke={C.gd} strokeWidth="1.5" />
|
||||
<circle cx="32.5" cy="17" r="6.5" fill={C.g} stroke={C.gd} strokeWidth="1.5" />
|
||||
<ellipse cx="24" cy="29" rx="17" ry="11" fill={C.g} stroke={C.gd} strokeWidth="1.5" />
|
||||
<circle cx="15.5" cy="17" r="4.5" fill={C.w} />
|
||||
<circle cx="32.5" cy="17" r="4.5" fill={C.w} />
|
||||
<circle cx="16" cy="17.5" r="2.2" fill={C.k} />
|
||||
<circle cx="32" cy="17.5" r="2.2" fill={C.k} />
|
||||
<path d="M13 29q11 8 22 0" stroke={C.k} strokeWidth="1.8" strokeLinecap="round" fill="none" />
|
||||
<circle cx="11.5" cy="31" r="2" fill={C.pk} />
|
||||
<circle cx="36.5" cy="31" r="2" fill={C.pk} />
|
||||
</g>
|
||||
),
|
||||
// 사냥꾼: a bow with an arrow
|
||||
hunter: (
|
||||
<g transform="rotate(-35 24 24)">
|
||||
<path d="M17 7Q5 24 17 41" stroke={C.woodd} strokeWidth="5" strokeLinecap="round" fill="none" />
|
||||
<path d="M17 7Q5 24 17 41" stroke={C.wood} strokeWidth="3" strokeLinecap="round" fill="none" />
|
||||
<line x1="17" y1="7" x2="17" y2="41" stroke={C.w} strokeWidth="1.2" />
|
||||
<line x1="10" y1="24" x2="37" y2="24" stroke={C.w} strokeWidth="2.6" strokeLinecap="round" />
|
||||
<polygon points="43,24 35,19.5 35,28.5" fill={C.r} stroke={C.k} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<path d="M9 20l4 4-4 4M13 20l4 4-4 4" stroke={C.y} strokeWidth="2" strokeLinejoin="round" fill="none" />
|
||||
</g>
|
||||
),
|
||||
// 줍줍: a piece on the path hopping onto a pile of pieces
|
||||
pickup: (
|
||||
<g>
|
||||
<line x1="6.5" y1="38" x2="41.5" y2="38" stroke={C.w} strokeWidth="2.4" strokeLinecap="round" />
|
||||
{piece(11, 32, 4.8)}
|
||||
{piece(27.5, 32, 5.6)}
|
||||
{piece(38, 32, 5.6, C.w, 'r')}
|
||||
{piece(32.75, 23, 5.6)}
|
||||
<path d="M10.5 24.5Q13 11 25 13" stroke={C.w} strokeWidth="2.6" strokeLinecap="round" fill="none" />
|
||||
<polygon points="29,13.5 22.5,9 23,17.5" fill={C.w} />
|
||||
</g>
|
||||
),
|
||||
// 도장 깨기: a stamp card with three of four red stamps
|
||||
stamp: (
|
||||
<g>
|
||||
<rect x="7" y="8" width="34" height="32" rx="4" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
{[
|
||||
[16, 17],
|
||||
[32, 17],
|
||||
[16, 31],
|
||||
].map(([x, y]) => (
|
||||
<g key={`${x}-${y}`}>
|
||||
<circle cx={x} cy={y} r="5.8" fill={C.r} />
|
||||
<circle cx={x} cy={y} r="3.6" fill="none" stroke={C.w} strokeWidth="1.2" />
|
||||
</g>
|
||||
))}
|
||||
<circle cx="32" cy="31" r="5.5" fill="none" stroke={C.gr} strokeWidth="1.5" strokeDasharray="2 2" />
|
||||
</g>
|
||||
),
|
||||
// 스타트 대시: a piece dashing off with speed lines
|
||||
dash: (
|
||||
<g>
|
||||
<path d="M8 17h12M5.5 24h13M8 31h12" stroke={C.w} strokeWidth="2.8" strokeLinecap="round" />
|
||||
{piece(31, 24, 9)}
|
||||
<path d="M27 21.5l4 2.5-4 2.5M32 21.5l4 2.5-4 2.5" stroke={C.k} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" fill="none" />
|
||||
</g>
|
||||
),
|
||||
// 방공호: a domed bunker behind sandbags
|
||||
bunker: (
|
||||
<g>
|
||||
<path d="M7 36A17 17 0 0 1 41 36Z" fill={C.w} />
|
||||
<path d="M10.5 28.5h27M15.5 21.5h17" stroke={C.gr} strokeWidth="2" />
|
||||
<path d="M18.5 36v-5a5.5 5.5 0 0 1 11 0v5z" fill={C.k} />
|
||||
{[11, 19, 27, 35].map((x) => (
|
||||
<rect key={x} x={x - 4} y="35" width="8" height="5" rx="2.5" fill={C.wood} stroke={C.woodd} strokeWidth="1.2" />
|
||||
))}
|
||||
</g>
|
||||
),
|
||||
// 벼락: a yellow lightning bolt striking between two pieces
|
||||
lightning: (
|
||||
<g>
|
||||
<polygon points="28,5 13,24 22,24 18,40 36,18 27,18 33,5" fill={C.y} stroke={C.k} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
{piece(10, 36, 4.5, C.r)}
|
||||
{piece(36, 36, 4.5, C.b)}
|
||||
</g>
|
||||
),
|
||||
// 블랙홀: a black hole with an orange ring
|
||||
blackhole: (
|
||||
<g>
|
||||
<ellipse cx="24" cy="24" rx="18" ry="6.5" fill="none" stroke={C.o} strokeWidth="3.4" transform="rotate(-18 24 24)" />
|
||||
<circle cx="24" cy="24" r="9.5" fill={C.k} stroke={C.w} strokeWidth="1.8" />
|
||||
<path d="M6 24A18 6.5 0 0 0 42 24" fill="none" stroke={C.y} strokeWidth="3.4" transform="rotate(-18 24 24)" />
|
||||
</g>
|
||||
),
|
||||
// 로켓 발사: a white rocket flying up-right
|
||||
rocket: (
|
||||
<g transform="rotate(45 24 24)">
|
||||
<path d="M20 31Q24 44 28 31Z" fill={C.o} />
|
||||
<path d="M21.5 31Q24 39 26.5 31Z" fill={C.y} />
|
||||
<path d="M18 23L11 32L18 31Z M30 23L37 32L30 31Z" fill={C.r} stroke={C.k} strokeWidth="1.3" strokeLinejoin="round" />
|
||||
<path d="M24 5C30 11 31 19 30 31H18C17 19 18 11 24 5Z" fill={C.w} stroke={C.k} strokeWidth="1.5" />
|
||||
<circle cx="24" cy="17.5" r="3.4" fill={C.b} stroke={C.k} strokeWidth="1.4" />
|
||||
</g>
|
||||
),
|
||||
// 최후의 일격: a sword striking the crowned leading piece
|
||||
finisher: (
|
||||
<g>
|
||||
<g transform="translate(-6 -0.75) rotate(-45 24 18.75)">
|
||||
<circle cx="24" cy="7" r="2.4" fill={C.y} stroke={C.k} strokeWidth="1.2" />
|
||||
<rect x="22.3" y="9" width="3.4" height="5.5" fill={C.woodd} />
|
||||
<rect x="15.5" y="14" width="17" height="3.6" rx="1.6" fill={C.y} stroke={C.k} strokeWidth="1.2" />
|
||||
<path d="M21 17.6H27V27.5L24 31.5L21 27.5Z" fill={C.w} stroke={C.k} strokeWidth="1.4" strokeLinejoin="round" />
|
||||
</g>
|
||||
{piece(34, 33, 6.5, C.r)}
|
||||
<polygon points="28.5,25 30,19 34,22.5 38,19 39.5,25" fill={C.y} stroke={C.k} strokeWidth="1.2" strokeLinejoin="round" />
|
||||
<path d="M21 34.5l3-1.5M23.5 39l2.5-3" stroke={C.y} strokeWidth="2" strokeLinecap="round" />
|
||||
</g>
|
||||
),
|
||||
};
|
||||
30
apps/web/src/games/yut/aug-icons/index.tsx
Normal file
30
apps/web/src/games/yut/aug-icons/index.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* One small picture per 증강 so it can be recognised without reading (docs/games/yut-augmented.md §아이콘).
|
||||
* The tile colour tells the kind (규칙 blue, 즉시 violet, 사용 teal, 승리 조건 amber); the glyph tells the augment.
|
||||
* Glyphs are plain SVG drawn in a 48×48 box (aug-icons/glyphs-*.tsx).
|
||||
*/
|
||||
import type { ReactNode } from 'react';
|
||||
import { AUGS, type AugId } from '@bg/games/yut/augments';
|
||||
import { TILE } from './palette';
|
||||
import { GLYPHS_A } from './glyphs-a';
|
||||
import { GLYPHS_B } from './glyphs-b';
|
||||
import { GLYPHS_C } from './glyphs-c';
|
||||
import { GLYPHS_D } from './glyphs-d';
|
||||
|
||||
export const GLYPHS: Partial<Record<AugId, ReactNode>> = { ...GLYPHS_A, ...GLYPHS_B, ...GLYPHS_C, ...GLYPHS_D };
|
||||
|
||||
export function tileColor(id: AugId): string {
|
||||
const a = AUGS[id];
|
||||
return a.win ? TILE.win : TILE[a.kind];
|
||||
}
|
||||
|
||||
/** The icon of augment `id`, `size` px square. Decorative by default (the name is always next to it). */
|
||||
export function AugIcon({ id, size = 32, cat = false, className }: { id: AugId; size?: number; cat?: boolean; className?: string }) {
|
||||
return (
|
||||
<svg className={className ? `aug-icon ${className}` : 'aug-icon'} viewBox="0 0 48 48" width={size} height={size} aria-hidden="true" focusable="false" style={{ flex: 'none', display: 'block' }}>
|
||||
<rect x="1" y="1" width="46" height="46" rx="11" fill={cat ? '#6b7280' : tileColor(id)} />
|
||||
<path d="M12 1h24a11 11 0 0 1 11 11v4C33 9 15 9 1 16v-4A11 11 0 0 1 12 1z" fill="#fff" opacity=".12" />
|
||||
{cat ? GLYPHS.cat : GLYPHS[id]}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
37
apps/web/src/games/yut/aug-icons/palette.ts
Normal file
37
apps/web/src/games/yut/aug-icons/palette.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Colours of the 증강 icons (aug-icons). Every glyph is drawn on a coloured tile (see index.tsx), so these colours do not
|
||||
* depend on the light / dark theme. Glyphs use only these.
|
||||
*/
|
||||
export const C = {
|
||||
/** white: the main glyph colour on the tile */
|
||||
w: '#ffffff',
|
||||
/** ink: outlines, eyes, dark details */
|
||||
k: '#1f2937',
|
||||
/** soft shadow / second tone on the tile */
|
||||
sh: 'rgba(0,0,0,.18)',
|
||||
r: '#ef4444',
|
||||
rd: '#b91c1c',
|
||||
o: '#fb923c',
|
||||
y: '#fde047',
|
||||
yd: '#eab308',
|
||||
g: '#4ade80',
|
||||
gd: '#15803d',
|
||||
b: '#93c5fd',
|
||||
bd: '#1d4ed8',
|
||||
p: '#d8b4fe',
|
||||
pd: '#7e22ce',
|
||||
pk: '#f9a8d4',
|
||||
/** wood (윷가락, 윷판) */
|
||||
wood: '#d6a35c',
|
||||
woodd: '#8a5a1f',
|
||||
gr: '#9ca3af',
|
||||
grd: '#4b5563',
|
||||
} as const;
|
||||
|
||||
/** Tile colours: one per kind, 승리 조건 augments are amber whatever their kind. */
|
||||
export const TILE = {
|
||||
passive: '#2563eb',
|
||||
instant: '#7c3aed',
|
||||
active: '#0d9488',
|
||||
win: '#d97706',
|
||||
} as const;
|
||||
@@ -1,6 +1,7 @@
|
||||
/** 증강 윷놀이 방 설정 (docs/games/yut-augmented.md): 혼돈 모드, 고르는 라운드, 후보 수, 나오게 할 증강 목록. */
|
||||
import { useState } from 'react';
|
||||
import type { YutOptions } from '@bg/games/yut';
|
||||
import { AugIcon } from './aug-icons';
|
||||
import { AUGS, AUG_IDS, AUG_ROUNDS, KIND_KO, TIER_KO, selectionTier, type AugId, type AugRoundsKey, type AugTier } from '@bg/games/yut/augments';
|
||||
|
||||
const CATS: { key: string; title: string; ids: AugId[] }[] = [
|
||||
@@ -100,7 +101,7 @@ export function AugOptions({ value: o, onChange }: { value: YutOptions; onChange
|
||||
<strong>
|
||||
나오게 할 증강 <span className="yut-rules-count">켜진 증강 {onCount}/{AUG_IDS.length}</span>
|
||||
</strong>
|
||||
<span className="small muted">끈 증강은 후보에 나오지 않아요.</span>
|
||||
<span className="small muted">끈 증강은 후보에 나오지 않아요. 이 사이트에서 만든 추가 증강 {CUSTOM_IDS.length}개는 처음에 꺼져 있어요.</span>
|
||||
<input className="input" type="search" placeholder="증강 이름이나 설명으로 찾기" aria-label="증강 찾기" value={query} onChange={(e) => setQuery(e.target.value)} />
|
||||
<div className="yut-aug-tools">
|
||||
<button type="button" className="btn btn-secondary btn-sm" onClick={() => setOff(new Set())} disabled={off.size === 0}>
|
||||
@@ -109,9 +110,15 @@ export function AugOptions({ value: o, onChange }: { value: YutOptions; onChange
|
||||
<button type="button" className="btn btn-secondary btn-sm" onClick={() => setMany(WIN_IDS, false)}>
|
||||
승리 조건 증강 끄기
|
||||
</button>
|
||||
<button type="button" className="btn btn-secondary btn-sm" onClick={() => setMany(CUSTOM_IDS, false)}>
|
||||
추가 증강 끄기
|
||||
</button>
|
||||
{CUSTOM_IDS.every((id) => off.has(id)) ? (
|
||||
<button type="button" className="btn btn-secondary btn-sm" onClick={() => setMany(CUSTOM_IDS, true)}>
|
||||
추가 증강 켜기
|
||||
</button>
|
||||
) : (
|
||||
<button type="button" className="btn btn-secondary btn-sm" onClick={() => setMany(CUSTOM_IDS, false)}>
|
||||
추가 증강 끄기
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{warnings.map((w) => (
|
||||
<span key={w} className="small yut-aug-warn" role="status">
|
||||
@@ -148,6 +155,7 @@ export function AugOptions({ value: o, onChange }: { value: YutOptions; onChange
|
||||
return (
|
||||
<label key={id} className={`yut-aug-row${enabled ? '' : ' off'}`} title={a.note}>
|
||||
<input type="checkbox" checked={enabled} onChange={() => toggle(id)} />
|
||||
<AugIcon id={id} size={36} />
|
||||
<span className="yut-aug-body">
|
||||
<span className="yut-aug-name">
|
||||
{a.name}
|
||||
|
||||
@@ -10,6 +10,7 @@ import type { PublicUser } from '@bg/shared/lite';
|
||||
import { Sheet } from '../../components/ui';
|
||||
import { haptic, sounds } from '../../lib/feedback';
|
||||
import { fxMs } from '../../lib/motion';
|
||||
import { AugIcon } from './aug-icons';
|
||||
|
||||
type Act = (a: unknown) => void;
|
||||
const nick = (players: Record<string, PublicUser>, id: string | undefined) => (id ? (players[id]?.nickname ?? '알 수 없음') : '알 수 없음');
|
||||
@@ -38,6 +39,9 @@ export const AUG_CSS = `
|
||||
.aug-card[aria-pressed='true'] { border-color: var(--primary); background: var(--primary-soft); }
|
||||
.aug-card:disabled { cursor: not-allowed; opacity: .55; }
|
||||
.aug-card h3 { margin: 0; font-size: 1.05rem; }
|
||||
.aug-card-head { display: flex; align-items: center; gap: 10px; }
|
||||
.aug-use-row .btn { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.aug-chip .aug-icon { margin-left: -4px; }
|
||||
.aug-card p { margin: 0; font-size: .9rem; }
|
||||
.aug-tags { display: flex; gap: 4px; flex-wrap: wrap; }
|
||||
.aug-tag { font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; background: var(--primary-soft); color: var(--text); }
|
||||
@@ -88,6 +92,7 @@ export function AugSlots({ v, side }: { v: YutView; side: number }) {
|
||||
if (s.skip) info.push(`건너뛰기 ${s.skip}번`);
|
||||
if (s.hp !== null) info.push(`체력 ${'❤'.repeat(Math.max(0, s.hp))}${s.hp <= 0 ? '0' : ''}`);
|
||||
if (s.queenLives !== null) info.push(`👑 목숨 ${s.queenLives}`);
|
||||
if (s.cursed) info.push('🪆 저주: 다음 차례 도만');
|
||||
for (const l of s.links) info.push(`${l.by === 'leech' ? '🩸 거머리' : '💀 네크로'} → ${augSideName(l.to)}${l.on ? '' : ' (멈춤)'}`);
|
||||
return (
|
||||
<>
|
||||
@@ -104,7 +109,7 @@ export function AugSlots({ v, side }: { v: YutView; side: number }) {
|
||||
title={`${meta.name}: ${meta.text}${meta.note ? ` (${meta.note})` : ''}`}
|
||||
aria-label={`${meta.name}${o.used ? ' (사용함)' : ''}${o.voided ? ' (무효)' : ''}${cat ? ` (${o.catUntil}라운드까지 고양이)` : ''}${o.note ? `, ${o.note}` : ''}`}
|
||||
>
|
||||
{cat ? '🐱 ' : ''}
|
||||
<AugIcon id={o.id} size={22} cat={cat} />
|
||||
{meta.name}
|
||||
{o.note && <small>{o.note}</small>}
|
||||
</span>
|
||||
@@ -121,12 +126,15 @@ function AugCard({ id, picked, onPick, disabled }: { id: AugId; picked: boolean;
|
||||
const m = AUGS[id];
|
||||
return (
|
||||
<button type="button" className="aug-card" aria-pressed={picked} onClick={onPick} disabled={disabled}>
|
||||
<h3>{m.name}</h3>
|
||||
<span className="aug-card-head">
|
||||
<AugIcon id={id} size={56} />
|
||||
<h3>{m.name}</h3>
|
||||
</span>
|
||||
<span className="aug-tags">
|
||||
<span className="aug-tag">{TIER_KO[m.tier]}</span>
|
||||
<span className="aug-tag">{KIND_KO[m.kind]}</span>
|
||||
{m.once && <span className="aug-tag">1회</span>}
|
||||
{m.win && <span className="aug-tag win">승리 조건</span>}
|
||||
{m.win && m.kind !== 'win' && <span className="aug-tag win">승리 조건</span>}
|
||||
{m.custom && <span className="aug-tag custom">추가</span>}
|
||||
</span>
|
||||
<p>{m.text}</p>
|
||||
@@ -225,6 +233,7 @@ const PROMPT_TITLE: Record<NonNullable<YutAugView['prompt']>['kind'], string> =
|
||||
plan: '계획대로: 최종 순위를 예언해 주세요',
|
||||
duel: '승부다! 누구와 겨룰까요?',
|
||||
thief: '손버릇: 어떤 증강을 빼앗을까요?',
|
||||
copycat: '따라쟁이: 어떤 증강을 따라 할까요?',
|
||||
};
|
||||
|
||||
export function AugPrompt({ v, act, pending, players }: { v: YutView; act: Act; pending: boolean; players: Record<string, PublicUser> }) {
|
||||
@@ -332,6 +341,7 @@ export function AugFxLayer({ v, players, me }: { v: YutView; players: Record<str
|
||||
<Sheet onClose={() => setPopup(null)} label="증강 알림">
|
||||
<div className="aug-popup">
|
||||
<span className="kicker">{popup.kind === 'out' ? '탈락' : popup.kind === 'bronze' ? '3위 확정' : popup.aug ? '특수 승리 조건 달성' : '완주'}</span>
|
||||
{popup.aug && <AugIcon id={popup.aug} size={72} />}
|
||||
<h2>{popup.aug ? AUGS[popup.aug].name : popup.kind === 'out' ? '탈락' : '전원 완주'}</h2>
|
||||
<strong style={{ color: COLORS[popup.side] }}>{who(v, players, popup.side)}</strong>
|
||||
<p style={{ margin: 0 }}>{popup.text}</p>
|
||||
@@ -412,6 +422,7 @@ export function AugUses({
|
||||
else setTargetUid(targetUid === uid ? null : uid);
|
||||
}}
|
||||
>
|
||||
<AugIcon id={id} size={20} />
|
||||
{AUGS[id].name}
|
||||
</button>
|
||||
);
|
||||
@@ -516,8 +527,8 @@ const nodeKo = (n: number | 'home' | 'goal') => (n === 'home' ? '대기' : n ===
|
||||
// ---------------------------------------------------------------- board layers (inside the board <svg>)
|
||||
|
||||
export const KIND_ICON: Record<PieceKind, string> = { dokkaebi: '👹', vanguard: '🚩', cannon: '包', pawn: '♟', kim: '🧔', queen: '👑', cultist: '🕯', marathon: '🏃' };
|
||||
const OBJ_ICON = { skull: '💀', hat: '🎩', gift: '🎁', poop: '💩', garlic: '🧄', mark: '🎯', mine: '💣' } as const;
|
||||
const OBJ_KO = { skull: '해골 함정', hat: '마녀 모자 함정', gift: '선물', poop: '똥', garlic: '마늘', mark: '명사수 조준', mine: '지뢰' } as const;
|
||||
const OBJ_ICON = { skull: '💀', hat: '🎩', gift: '🎁', poop: '💩', garlic: '🧄', mark: '🎯', mine: '💣', hole: '🕳' } as const;
|
||||
const OBJ_KO = { skull: '해골 함정', hat: '마녀 모자 함정', gift: '선물', poop: '똥', garlic: '마늘', mark: '명사수 조준', mine: '지뢰', hole: '블랙홀' } as const;
|
||||
|
||||
export function BoardObjects({ v }: { v: YutView }) {
|
||||
return (
|
||||
|
||||
@@ -32,6 +32,7 @@ import { houseRules, optionsSummary } from './house-rules';
|
||||
import { quickStart } from './quick';
|
||||
import { HOP_MS, moveSound, throwSound } from './sound';
|
||||
import { fxMs } from '../../lib/motion';
|
||||
import { AugIcon } from './aug-icons';
|
||||
|
||||
type From = number | 'home';
|
||||
/** A source the player can pick: a stack (`"7"`, or `"7#2"` when stacks stand apart on 7) or the waiting pieces (`"home"`). */
|
||||
@@ -741,6 +742,7 @@ function YutBoard({ view: v, me, players, act, pending, deadline }: BoardProps<Y
|
||||
|
||||
function badge(m: YutLegalMove): string | null {
|
||||
if (m.captures) return '잡기!';
|
||||
if (m.ownCaptures) return '내 말 잡기';
|
||||
if (m.finishes) return '날!';
|
||||
if (m.stacks) return '업기';
|
||||
if (m.stack === false) return '따로';
|
||||
@@ -946,9 +948,16 @@ const OPT_CSS = `
|
||||
.yut-opt-tabs button[aria-selected='true'] { border-color: var(--primary); background: var(--primary-soft); font-weight: 700; }
|
||||
`;
|
||||
|
||||
/** Open settings tab; kept outside the component so a re-mount of the room panel (room updates) keeps it. */
|
||||
let lastOptTab: 'base' | 'aug' = 'base';
|
||||
|
||||
function Options({ value: o, onChange }: OptionsProps<YutOptions>) {
|
||||
const [more, setMore] = useState(false);
|
||||
const [tab, setTab] = useState<'base' | 'aug'>('base');
|
||||
const [tab, setTabState] = useState<'base' | 'aug'>(() => lastOptTab);
|
||||
const setTab = (t: 'base' | 'aug') => {
|
||||
lastOptTab = t;
|
||||
setTabState(t);
|
||||
};
|
||||
const set = (patch: Partial<YutOptions>) => onChange({ ...o, ...patch });
|
||||
const aug = o.augmented === true;
|
||||
const onOff = (b: boolean) => (b ? 'on' : 'off');
|
||||
@@ -1166,12 +1175,15 @@ function AugRules({ o }: { o: YutOptions }) {
|
||||
<summary style={{ cursor: 'pointer', fontWeight: 800 }}>
|
||||
{title} ({list.length})
|
||||
</summary>
|
||||
<ul className="stack small" style={{ gap: 4, margin: '6px 0 0', paddingLeft: 18 }}>
|
||||
<ul className="stack small" style={{ gap: 6, margin: '6px 0 0', paddingLeft: 0 }}>
|
||||
{list.map((id) => (
|
||||
<li key={id}>
|
||||
<strong>{AUGS[id].name}</strong>
|
||||
{AUGS[id].once ? ' (1회)' : ''}: {AUGS[id].text}
|
||||
{AUGS[id].note ? <span className="muted"> {AUGS[id].note}</span> : null}
|
||||
<li key={id} style={{ display: 'flex', gap: 8, alignItems: 'flex-start', listStyle: 'none' }}>
|
||||
<AugIcon id={id} size={28} />
|
||||
<span>
|
||||
<strong>{AUGS[id].name}</strong>
|
||||
{AUGS[id].once ? ' (1회)' : ''}: {AUGS[id].text}
|
||||
{AUGS[id].note ? <span className="muted"> {AUGS[id].note}</span> : null}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@@ -132,7 +132,9 @@
|
||||
| `cancel` | 취~소 | 즉시 | 모든 특수 승리를 취소해요. 승리 조건 증강은 모두 효과가 없어지고, 특수 승리로 끝낸 사람은 게임으로 돌아와요. | |
|
||||
| `cannibal` | 카니발리즘 | 규칙 | 내 말끼리 업을 수 없는 대신 내 말을 잡을 수 있어요. 내 말을 잡으면 한 번 더 던져요. | |
|
||||
|
||||
### 이 사이트 추가 (10개)
|
||||
### 이 사이트 추가 (30개)
|
||||
방 설정 기본값은 **모두 꺼짐**(`augOff` 기본값이 이 30개)이다. 방장이 [증강 윷놀이] 탭에서 켤 수 있다.
|
||||
|
||||
| id | 이름 | 종류 | 효과 | 세부 |
|
||||
|---|---|---|---|---|
|
||||
| `teleport` | 순간이동 | 사용·1회 | 내 말뭉치 하나를 다른 내 말뭉치 자리로 옮겨 업어요. | |
|
||||
@@ -145,6 +147,26 @@
|
||||
| `twins` | 쌍둥이 | 사용·1회 | 대기 중인 내 말 하나를 판 위 내 말뭉치에 바로 업혀요. | |
|
||||
| `swap` | 자리 바꾸기 | 사용·1회 | 내 말뭉치 하나와 다른 사람 말뭉치 하나의 자리를 맞바꿔요. | |
|
||||
| `storm` | 회오리 | 즉시·중간 전용 | 판 위의 모든 말뭉치가 회오리에 휩쓸려 무작위 칸으로 흩어져요. | 참먹이에는 떨어지지 않고, 말뭉치끼리 겹치지 않아요. |
|
||||
| `reroll` | 다시 던지기 | 사용(차례마다 1번) | 내 차례마다 한 번, 갖고 있는 윷 결과 하나를 버리고 다시 던져요. | |
|
||||
| `double` | 곱빼기 | 사용·1회 | 갖고 있는 윷 결과 하나를 하나 더 받아요. | |
|
||||
| `gamble` | 올인 | 사용·1회 | 반반 확률로 던지기 3번을 더 받거나, 모아 둔 결과를 모두 잃고 차례가 끝나요. | |
|
||||
| `curse` | 저주 인형 | 사용·1회 | 한 사람을 골라요. 그 사람은 다음 차례에 던질 때마다 도만 나와요. | 던진 차례가 끝나면 풀려요(건너뛴 차례는 세지 않음). 손은 눈보다 빠르다는 저주보다 먼저예요. |
|
||||
| `freeze` | 얼음! | 사용·1회 | 다른 사람 말뭉치 하나를 2라운드 동안 얼려 못 움직이게 해요. | |
|
||||
| `magnet` | 자석 | 사용·1회 | 내 말뭉치 하나를 골라요. 바로 옆 칸(선으로 이어진 칸)에 있는 다른 사람 말을 모두 끌어와 잡아요. | 잡아도 한 번 더 던지지는 않아요. |
|
||||
| `pushback` | 뒤로 돌아 | 사용·1회 | 다른 사람 말뭉치 하나를 뒤로 3칸 보내요. | 밀려난 칸에 다른 말이 있으면 마녀 모자 함정처럼 그 말을 잡아요. 참먹이를 넘어 뒤로 가게 되는 말뭉치는 고를 수 없어요. |
|
||||
| `underdog` | 꼴찌의 반란 | 규칙 | 내 차례가 시작될 때 내가 혼자 꼴찌면 한 번 더 던져요. | 난 말이 가장 적고, 같으면 남은 거리가 가장 먼 사람이 꼴찌예요. |
|
||||
| `homeground` | 텃세 | 규칙 | 참먹이로 들어가기 바로 전 칸들(날도~날윷, 사려·안찌)에 선 내 말은 잡히지 않아요. | 달걸음이 있으면 반대쪽 칸들이에요. 내가 잡는 것(카니발리즘)은 막지 않아요. |
|
||||
| `copycat` | 따라쟁이 | 즉시 | 다른 사람이 가진 증강 하나를 골라 똑같은 것을 하나 얻어요. | 즉시 효과 증강과 고양이는 따라 할 수 없어요. 이미 다 쓴 1회 증강도 새것으로 받아요. |
|
||||
| `frog` | 청개구리 | 규칙 | 내가 던져서 빽도가 나오면 모가 돼요. 대신 한 번 더 던지지는 않아요. | 빽도 규칙을 켠 방에서만 나와요. |
|
||||
| `hunter` | 사냥꾼 | 규칙 | 윷을 던져 말을 움직여 잡으면 한 번이 아니라 두 번 더 던져요. | |
|
||||
| `pickup` | 줍줍 | 규칙 | 앞으로 갈 때 지나가는 칸에 있는 내 말을 모두 주워 업고 가요. | 특수 말과 묶인 말은 줍지 않아요. |
|
||||
| `stamp` | 도장 깨기 | 승리 조건 | 윷을 던져 움직인 내 말이 모·뒷모·찌모·방에 한 번씩 멈추면 이겨요. | 이 증강을 얻은 뒤부터 세요. |
|
||||
| `dash` | 스타트 대시 | 즉시·시작 전용 | 대기 중인 내 말 하나가 걸 자리에서 시작해요. | 그 자리의 다른 사람 말은 잡아요. |
|
||||
| `bunker` | 방공호 | 즉시·시작 전용 | 내 말이 모두 보호막을 하나씩 두르고 시작해요. | 보호막은 잡힐 때 한 번 막아 줘요. |
|
||||
| `lightning` | 벼락 | 즉시·중간 전용 | 판 위 말뭉치 중 무작위 2개에 벼락이 떨어져 잡혀요. 내 말도 맞을 수 있어요. | |
|
||||
| `blackhole` | 블랙홀 | 즉시·중간 전용 | 방(판 가운데)이 블랙홀이 돼요. 방에 있던 말은 모두 빨려 들어가고, 이제 다른 사람 말이 방에 멈추면 잡혀요. | 방을 지나가기만 하면 괜찮아요. 블랙홀을 만든 사람의 말은 안전해요. |
|
||||
| `rocket` | 로켓 발사 | 사용·1회·마무리 전용 | 내 말뭉치 하나(또는 대기 말 하나)를 참먹이 바로 앞 칸(날윷)으로 보내요. | 그 칸에 있던 다른 사람 말은 잡아요. 특수 말·묶인 말은 못 보내요. |
|
||||
| `finisher` | 최후의 일격 | 즉시·마무리 전용 | 다른 사람 말뭉치 중 가장 앞선 것 하나를 잡아요. | 보호막 등 잡기를 막는 효과는 그대로 작동해요. |
|
||||
|
||||
## 5. 옵션
|
||||
| 키 | 설명 | 기본 |
|
||||
@@ -153,7 +175,7 @@
|
||||
| `augChaos` | 혼돈 모드(한 번에 2개) | `false` |
|
||||
| `augRounds` | 고르는 라운드 `standard`(1·6·12) / `quick`(1·4·8) / `many`(1·3·5·7·9) | `standard` |
|
||||
| `augOffers` | 후보 수 2·3·4 | 3 |
|
||||
| `augOff` | 나오지 않게 뺀 증강 id 목록 | `[]` |
|
||||
| `augOff` | 나오지 않게 뺀 증강 id 목록 | 이 사이트 추가 증강 30개 |
|
||||
|
||||
관리자 화면에서 기본값·잠금을 정할 수 있다(`augOff`는 체크 목록).
|
||||
|
||||
@@ -168,6 +190,8 @@
|
||||
- [✨ 내 증강 쓰기]: 지금 쓸 수 있는 증강 버튼 → 대상 목록(칸 대상은 판에서 눌러도 됨) → 바로 사용. 특수 말 이동 버튼.
|
||||
- 특수 승리·탈락 팝업(원작처럼 "특수 승리 조건 달성 / 증강 이름 / 사람 / N위 확보"), 그 밖의 효과는 판 위 알림.
|
||||
- 결과 화면 점수 칸에 순위 사유(전원 완주, 증강 이름, 탈락 사유).
|
||||
- 증강 아이콘(`apps/web/src/games/yut/aug-icons/`): 증강마다 48×48 SVG 하나. 타일 색이 종류(규칙 파랑, 즉시 보라, 사용 청록, 승리 조건 주황), 그림이 증강을 나타낸다. 선택 카드·사람 카드 칩·쓰기 버튼·팝업·방 설정 목록·규칙 보기에 나온다. 고양이가 된 증강은 회색 타일 고양이. 전체 모아 보기: `cd apps/web && bun scripts/aug-icon-sheet.tsx out.png`.
|
||||
- 판: 블랙홀 🕳(방). 사람 카드: 저주 인형 표시.
|
||||
|
||||
## 8. 컴퓨터
|
||||
`aug-bot.ts`: 증강마다 가치표로 고르고(동메달은 뒤처질 때, 취~소는 남이 승리 조건을 가졌을 때 높게), 질문은 선두를 견제(거머리·투표는 선두, 승부는 꼴찌), 능력은 잡을 말이 있을 때(트럭·바둑·합체·명사수), 알까기는 가까운 적을 겨냥, 변환은 바로. 나머지는 보통 윷놀이 컴퓨터.
|
||||
|
||||
@@ -1608,6 +1608,10 @@ const PLANS: Record<string, Plan> = {
|
||||
await host.getByRole('tab', { name: '증강 윷놀이' }).click();
|
||||
await host.getByText(/켜진 증강/).first().waitFor();
|
||||
await host.screenshot({ path: join(SHOTS, 'yut-aug-options-pc.png'), fullPage: true });
|
||||
// this site's augments start off; switch them on so the game shows them too
|
||||
await host.getByText(/켜진 증강 71\/101/).first().waitFor();
|
||||
await host.getByRole('button', { name: '추가 증강 켜기' }).click();
|
||||
await host.getByText(/켜진 증강 101\/101/).first().waitFor();
|
||||
await host.getByRole('tab', { name: '윷놀이 설정' }).click();
|
||||
await host.getByRole('button', { name: '3개', exact: true }).click();
|
||||
// 증강을 자주 고르도록 1·3·5·7·9라운드, 후보 4개
|
||||
|
||||
@@ -15,6 +15,8 @@ const VALUE: Partial<Record<AugId, number>> = {
|
||||
domain: 4, getoff: 4, moordo: 4, leech: 4, illusion: 4, alkkagi: 4, four: 4, mine: 4, teleport: 4, cannibal: 3, alone: 3,
|
||||
nofriends: 3, plan: 3, necro: 3, cancel: 3, whoami: 3, roulette: 3, fold: 3, excess: 3, dual: 3, fog: 3, sniper: 3, ox: 3,
|
||||
detective: 3, delivery: 3, storm: 3, sacrifice: 3, moonwalk: 3, lastdance: 1, chosen: 2, objection: 2, timetravel: 2, cat: 1,
|
||||
rocket: 7, finisher: 7, hunter: 6, reroll: 6, double: 6, magnet: 5, curse: 5, freeze: 5, pushback: 5, underdog: 5, bunker: 5,
|
||||
dash: 5, pickup: 5, frog: 5, copycat: 5, homeground: 4, lightning: 4, blackhole: 4, stamp: 4, gamble: 3,
|
||||
};
|
||||
|
||||
type A = YutAction;
|
||||
@@ -62,7 +64,8 @@ export function augBotAction(view: YutView, legal: A[], random: () => number): A
|
||||
return { type: 'AUG_ANSWER', choice: order } as A;
|
||||
}
|
||||
case 'illusion':
|
||||
case 'thief': {
|
||||
case 'thief':
|
||||
case 'copycat': {
|
||||
const opts = pr.choices ?? [];
|
||||
const val = (label: string) => {
|
||||
const name = label.split(' · ')[1] ?? '';
|
||||
@@ -145,6 +148,31 @@ export function augBotAction(view: YutView, legal: A[], random: () => number): A
|
||||
case 'domain':
|
||||
consider(u, random() < 0.2 ? 3 : 0);
|
||||
break;
|
||||
case 'magnet':
|
||||
consider(u, (o?.kills ?? 0) > 0 ? 7 + (o?.kills ?? 0) : 0);
|
||||
break;
|
||||
case 'rocket':
|
||||
consider(u, (o?.label ?? '').startsWith('대기') ? 4 : 6 + (o?.kills ?? 0));
|
||||
break;
|
||||
case 'curse':
|
||||
consider(u, u.target === leaderSide ? 5 : 0);
|
||||
break;
|
||||
case 'freeze':
|
||||
case 'pushback': {
|
||||
if (u.target !== leaderSide || u.node === undefined) break;
|
||||
// the leader's stack nearest the finish
|
||||
consider(u, remainingDistance(u.node as NodeId, view.options.finishRule) <= 8 ? 5 + (o?.kills ?? 0) : 0);
|
||||
break;
|
||||
}
|
||||
case 'double':
|
||||
consider(u, u.result === 'mo' || u.result === 'yut' ? 6 : 0);
|
||||
break;
|
||||
case 'reroll':
|
||||
consider(u, u.result === 'backdo' || u.result === 'do' ? 4 : 0);
|
||||
break;
|
||||
case 'gamble':
|
||||
consider(u, random() < 0.15 ? 2 : 0);
|
||||
break;
|
||||
case 'swap': {
|
||||
if (o?.at === undefined || o.at === 'home' || u.node === undefined) break;
|
||||
const gain = remainingDistance(o.at, view.options.finishRule) - remainingDistance(u.node as NodeId, view.options.finishRule);
|
||||
|
||||
@@ -99,11 +99,11 @@ describe('증강 윷놀이: options and selection', () => {
|
||||
|
||||
test('명탐정 voids the same augment picked by someone else in that selection', () => {
|
||||
const s = yut.setup({ players: ['A', 'B'], options: yut.optionsSchema.parse({ augmented: true }), rng: SeededRng.fromSeed(seedN(2)), now: 0 });
|
||||
s.aug!.select!.offers = { '0': ['detective', 'cat', 'fog'], '1': ['tiger', 'cat', 'fog'] };
|
||||
let t = act(s, 'A', { type: 'AUG_PICK', aug: 'detective', target: 'tiger' });
|
||||
s.aug!.select!.offers = { '0': ['detective', 'cat', 'fog'], '1': ['shield', 'cat', 'fog'] };
|
||||
let t = act(s, 'A', { type: 'AUG_PICK', aug: 'detective', target: 'shield' });
|
||||
expect(yut.validate(t, 'B', { type: 'AUG_PICK', aug: 'detective' }).ok).toBe(false);
|
||||
t = act(t, 'B', { type: 'AUG_PICK', aug: 'tiger' });
|
||||
expect(t.aug!.sides[1]!.augs[0]).toMatchObject({ id: 'tiger', voided: true });
|
||||
t = act(t, 'B', { type: 'AUG_PICK', aug: 'shield' });
|
||||
expect(t.aug!.sides[1]!.augs[0]).toMatchObject({ id: 'shield', voided: true });
|
||||
expect(yut.view(t, 'A').aug!.sides[1]!.augs[0]!.voided).toBe(true);
|
||||
});
|
||||
|
||||
@@ -292,6 +292,20 @@ describe('증강 윷놀이: moves and catches', () => {
|
||||
expect(t.phase).toBe('throw');
|
||||
});
|
||||
|
||||
test('카니발리즘 + 개돼지: own catches are not counted as catches, so the computer does not loop on them', () => {
|
||||
const s = yut.setup({ players: ['bot', 'H'], options: yut.optionsSchema.parse({ augmented: true }), rng: SeededRng.fromSeed(seedN(3)), now: 0 });
|
||||
Object.assign(s.aug!, { select: null, selNo: 1, pendingBegin: false, firstSide: 0 });
|
||||
Object.assign(s, { turnSide: 0, current: 'bot', phase: 'move', throwsOwed: 0, pending: ['gae'] });
|
||||
give(s, 0, 'cannibal');
|
||||
give(s, 0, 'doggy');
|
||||
put(s, 0, 0, 2);
|
||||
const enter = yut.view(s, 'bot').legalMoves!.find((m) => m.from === 'home')!;
|
||||
expect(enter).toMatchObject({ captures: 0, ownCaptures: 1 });
|
||||
expect(decideBotAction(yut, s, 'bot', { now: 1, random: () => 0.5 })).toMatchObject({ type: 'MOVE', from: 2 });
|
||||
const t = yut.apply(s, 'bot', yut.onTimeout(s, 'bot'), { rng: SeededRng.fromSeed(seedN(5)), now: 1000 }).state;
|
||||
expect(nodesOf(t, 0)[0]).toBe(4); // the timeout moves the board piece instead of eating it
|
||||
});
|
||||
|
||||
test('히히 똥!: other pieces stop on the poop', () => {
|
||||
const s = make();
|
||||
s.aug!.objs.push({ kind: 'poop', node: 2, owner: 1 });
|
||||
@@ -689,6 +703,238 @@ describe('증강 윷놀이: review regressions', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------- this site's second batch
|
||||
|
||||
describe('증강 윷놀이: 이 사이트 추가 증강', () => {
|
||||
test('this site’s augments start switched off; the room can switch them on', () => {
|
||||
const custom = AUG_IDS.filter((id) => AUGS[id].custom);
|
||||
expect(custom).toHaveLength(30);
|
||||
expect(yut.defaultOptions.augOff).toEqual(custom);
|
||||
const seen = new Set<AugId>();
|
||||
for (let i = 0; i < 30; i++) {
|
||||
const s = yut.setup({ players: ['A', 'B'], options: yut.optionsSchema.parse({ augmented: true }), rng: SeededRng.fromSeed(seedN(70 + i)), now: 0 });
|
||||
for (const k of ['0', '1']) for (const id of s.aug!.select!.offers[k]!) expect(AUGS[id].custom).toBeUndefined();
|
||||
const on = yut.setup({ players: ['A', 'B'], options: yut.optionsSchema.parse({ augmented: true, augOff: [] }), rng: SeededRng.fromSeed(seedN(70 + i)), now: 0 });
|
||||
for (const k of ['0', '1']) for (const id of on.aug!.select!.offers[k]!) seen.add(id);
|
||||
}
|
||||
expect([...seen].some((id) => AUGS[id].custom)).toBe(true);
|
||||
});
|
||||
|
||||
test('다시 던지기 drops one result and throws again, once a turn', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'reroll');
|
||||
moving(s, ['do']);
|
||||
let t = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'reroll'), result: 'do' });
|
||||
expect(t.pending).toEqual([]);
|
||||
expect(t.phase).toBe('throw');
|
||||
t = act(t, 'A', { type: 'THROW' }, script('gae'));
|
||||
expect(t.pending).toEqual(['gae']);
|
||||
expect(yut.view(t, 'A').aug!.uses.some((u) => u.id === 'reroll')).toBe(false);
|
||||
});
|
||||
|
||||
test('곱빼기 copies a result once', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'double');
|
||||
moving(s, ['yut', 'do']);
|
||||
const t = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'double'), result: 'yut' });
|
||||
expect(t.pending).toEqual(['yut', 'do', 'yut']);
|
||||
expect(yut.view(t, 'A').aug!.uses.some((u) => u.id === 'double')).toBe(false);
|
||||
});
|
||||
|
||||
test('올인: three more throws, or the results are gone and the turn ends', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'gamble');
|
||||
const win = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'gamble') }, new Script([0.1]));
|
||||
expect(win.throwsOwed).toBe(4);
|
||||
const u = make();
|
||||
give(u, 0, 'gamble');
|
||||
moving(u, ['mo']);
|
||||
const t = act(u, 'A', { type: 'AUG_USE', uid: uidOf(u, 0, 'gamble') }, new Script([0.9]));
|
||||
expect(t.pending).toEqual([]);
|
||||
expect(t.current).toBe('B');
|
||||
});
|
||||
|
||||
test('저주 인형: the cursed player throws only 도 for one turn', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'curse');
|
||||
let t = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'curse'), target: 1 });
|
||||
expect(yut.view(t, 'A').aug!.sides[1]!.cursed).toBe(true);
|
||||
t = act(t, 'A', { type: 'THROW' }, script('gae'));
|
||||
t = act(t, 'A', { type: 'MOVE', throwIndex: 0, from: 'home' });
|
||||
expect(t.current).toBe('B');
|
||||
t = act(t, 'B', { type: 'THROW' }, new Script([]));
|
||||
expect(t.lastThrow).toMatchObject({ result: 'do', note: '저주 인형' });
|
||||
t = act(t, 'B', { type: 'MOVE', throwIndex: 0, from: 'home' });
|
||||
expect(t.aug!.sides[1]!.curse).toBeUndefined();
|
||||
});
|
||||
|
||||
test('얼음! freezes one enemy stack for two rounds', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'freeze');
|
||||
put(s, 1, 0, 9);
|
||||
const t = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'freeze'), target: 1, node: 9 });
|
||||
expect(t.sides[1]!.pieces[0]!.frozenUntil).toBe(t.aug!.round + 2);
|
||||
expect(yut.view(t, 'B').stacks.find((st) => st.side === 1)).toMatchObject({ node: 9, frozen: true });
|
||||
});
|
||||
|
||||
test('자석 catches the enemy pieces next to my stack', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'magnet');
|
||||
put(s, 0, 0, 7);
|
||||
put(s, 1, 0, 6);
|
||||
put(s, 1, 1, 8);
|
||||
put(s, 1, 2, 12);
|
||||
const v = yut.view(s, 'A').aug!.uses.find((u) => u.id === 'magnet')!;
|
||||
expect(v.kills).toBe(2);
|
||||
const t = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'magnet'), piece: 0 });
|
||||
expect(nodesOf(t, 1).slice(0, 3)).toEqual(['home', 'home', 12]);
|
||||
});
|
||||
|
||||
test('뒤로 돌아 pushes a stack 3 back (catching where it lands), never past 참먹이', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'pushback');
|
||||
put(s, 1, 0, 9, [1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
||||
put(s, 1, 1, 2, [1, 2]);
|
||||
put(s, 0, 0, 6);
|
||||
const opts = yut.view(s, 'A').aug!.uses.filter((u) => u.id === 'pushback');
|
||||
expect(opts.map((u) => u.action.node)).toEqual([9]);
|
||||
const t = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'pushback'), target: 1, node: 9 });
|
||||
expect(nodesOf(t, 1)[0]).toBe(6);
|
||||
expect(nodesOf(t, 0)[0]).toBe('home');
|
||||
});
|
||||
|
||||
test('로켓 발사 sends a stack (or a waiting piece) to 날윷, catching there', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'rocket');
|
||||
put(s, 0, 0, 3);
|
||||
put(s, 1, 0, 19);
|
||||
expect(yut.view(s, 'A').aug!.uses.filter((u) => u.id === 'rocket')).toHaveLength(2);
|
||||
const t = act(s, 'A', { type: 'AUG_USE', uid: uidOf(s, 0, 'rocket'), piece: 0 });
|
||||
expect(nodesOf(t, 0)[0]).toBe(19);
|
||||
expect(nodesOf(t, 1)[0]).toBe('home');
|
||||
});
|
||||
|
||||
test('꼴찌의 반란: one more throw when my turn starts and I am last', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'underdog');
|
||||
s.sides[1]!.pieces[3]!.status = 'done';
|
||||
Object.assign(s, { turnSide: 1, current: 'B' });
|
||||
let t = act(s, 'B', { type: 'THROW' }, script('do'));
|
||||
t = act(t, 'B', { type: 'MOVE', throwIndex: 0, from: 'home' });
|
||||
expect(t.current).toBe('A');
|
||||
expect(t.throwsOwed).toBe(2);
|
||||
});
|
||||
|
||||
test('텃세: my pieces just before 참먹이 cannot be caught', () => {
|
||||
const s = make();
|
||||
give(s, 1, 'homeground');
|
||||
put(s, 1, 0, 18);
|
||||
put(s, 0, 0, 16);
|
||||
moving(s, ['gae']);
|
||||
expect(yut.view(s, 'A').legalMoves!.find((m) => m.from === 16)!.captures).toBe(0);
|
||||
const t = act(s, 'A', { type: 'MOVE', throwIndex: 0, from: 16 });
|
||||
expect(nodesOf(t, 1)[0]).toBe(18);
|
||||
expect(nodesOf(t, 0)[0]).toBe(18);
|
||||
});
|
||||
|
||||
test('따라쟁이 copies another player’s augment', () => {
|
||||
const s = make();
|
||||
give(s, 1, 'excess');
|
||||
give(s, 0, 'copycat');
|
||||
expect(s.phase).toBe('prompt');
|
||||
const t = act(s, 'A', { type: 'AUG_ANSWER', choice: uidOf(s, 1, 'excess') });
|
||||
expect(yut.view(t, 'A').aug!.sides.map((x) => x.sticks)).toEqual([6, 6]);
|
||||
});
|
||||
|
||||
test('청개구리: my 빽도 is a 모 without the extra throw', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'frog');
|
||||
const t = act(s, 'A', { type: 'THROW' }, script('backdo'));
|
||||
expect(t.pending).toEqual(['mo']);
|
||||
expect(t.phase).toBe('move');
|
||||
});
|
||||
|
||||
test('사냥꾼: a catch gives two more throws', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'hunter');
|
||||
put(s, 0, 0, 1);
|
||||
put(s, 1, 0, 3);
|
||||
moving(s, ['gae']);
|
||||
const t = act(s, 'A', { type: 'MOVE', throwIndex: 0, from: 1 });
|
||||
expect(t.throwsOwed).toBe(2);
|
||||
});
|
||||
|
||||
test('줍줍 picks up my pieces on the way', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'pickup');
|
||||
put(s, 0, 0, 2);
|
||||
put(s, 0, 1, 4, [1, 2, 3, 4]);
|
||||
moving(s, ['yut']);
|
||||
expect(yut.view(s, 'A').legalMoves!.find((m) => m.from === 2)!.count).toBe(2);
|
||||
const t = act(s, 'A', { type: 'MOVE', throwIndex: 0, from: 2 });
|
||||
expect(nodesOf(t, 0).slice(0, 2)).toEqual([6, 6]);
|
||||
});
|
||||
|
||||
test('도장 깨기 wins after stopping on 모, 뒷모, 찌모 and 방', () => {
|
||||
const s = make();
|
||||
give(s, 0, 'stamp');
|
||||
s.aug!.sides[0]!.augs[0]!.list = [5, 10, 15];
|
||||
put(s, 0, 0, 21, [1, 2, 3, 4, 5, 20, 21]);
|
||||
moving(s, ['do']);
|
||||
const t = act(s, 'A', { type: 'MOVE', throwIndex: 0, from: 21 });
|
||||
expect(t.sides[0]!.finishedRank).toBe(1);
|
||||
expect(t.phase).toBe('finished');
|
||||
});
|
||||
|
||||
test('스타트 대시 and 방공호 at the start', () => {
|
||||
const s = make();
|
||||
put(s, 1, 0, 3);
|
||||
give(s, 0, 'dash');
|
||||
expect(nodesOf(s, 0)[0]).toBe(3);
|
||||
expect(s.sides[0]!.pieces[0]!.trail).toEqual([1, 2, 3]);
|
||||
expect(nodesOf(s, 1)[0]).toBe('home');
|
||||
give(s, 1, 'bunker');
|
||||
expect(s.sides[1]!.pieces.every((p) => p.shield)).toBe(true);
|
||||
put(s, 1, 0, 4);
|
||||
moving(s, ['do']);
|
||||
const t = act(s, 'A', { type: 'MOVE', throwIndex: 0, from: 3 });
|
||||
expect(nodesOf(t, 1)[0]).toBe(4); // the shield held
|
||||
expect(t.sides[1]!.pieces[0]!.shield).toBeUndefined();
|
||||
});
|
||||
|
||||
test('벼락 hits two random stacks', () => {
|
||||
const s = make();
|
||||
put(s, 0, 0, 5);
|
||||
put(s, 1, 0, 9);
|
||||
put(s, 1, 1, 12);
|
||||
give(s, 0, 'lightning');
|
||||
const left = s.sides.flatMap((x) => x.pieces).filter((p) => p.status === 'board').length;
|
||||
expect(left).toBe(1);
|
||||
});
|
||||
|
||||
test('블랙홀: 방 swallows what is there and every other piece that stops on it', () => {
|
||||
const s = make();
|
||||
put(s, 1, 0, 22);
|
||||
give(s, 0, 'blackhole');
|
||||
expect(nodesOf(s, 1)[0]).toBe('home');
|
||||
expect(s.aug!.objs).toContainEqual({ kind: 'hole', node: 22, owner: 0 });
|
||||
put(s, 1, 1, 21, [5, 20, 21]);
|
||||
Object.assign(s, { turnSide: 1, current: 'B' });
|
||||
moving(s, ['do']);
|
||||
const t = act(s, 'B', { type: 'MOVE', throwIndex: 0, from: 21 });
|
||||
expect(nodesOf(t, 1)[1]).toBe('home');
|
||||
});
|
||||
|
||||
test('최후의 일격 catches the furthest enemy stack', () => {
|
||||
const s = make(3);
|
||||
put(s, 1, 0, 3);
|
||||
put(s, 2, 0, 18);
|
||||
give(s, 0, 'finisher');
|
||||
expect(nodesOf(s, 1)[0]).toBe(3);
|
||||
expect(nodesOf(s, 2)[0]).toBe('home');
|
||||
});
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------- winning & going out
|
||||
|
||||
describe('증강 윷놀이: special wins and ranks', () => {
|
||||
@@ -802,6 +1048,7 @@ describe('증강 윷놀이: whole games', () => {
|
||||
const players = PLAYERS.slice(0, n);
|
||||
const options = yut.optionsSchema.parse({
|
||||
augmented: true,
|
||||
augOff: [],
|
||||
augRounds: (['standard', 'quick', 'many'] as const)[i % 3],
|
||||
augChaos: i % 4 === 0,
|
||||
augOffers: 4,
|
||||
@@ -832,7 +1079,7 @@ describe('증강 윷놀이: whole games', () => {
|
||||
for (let g = 0; g < playoutSeeds(30); g++) {
|
||||
const n = 2 + (g % 3);
|
||||
const players = ['bot1', 'bot2', 'bot3', 'H'].slice(0, n);
|
||||
const r = botPlayout(yut, { players, options: yut.optionsSchema.parse({ augmented: true, augChaos: g % 3 === 0 }), seed: seedN(g + 7), isBot: (p) => p.startsWith('bot') });
|
||||
const r = botPlayout(yut, { players, options: yut.optionsSchema.parse({ augmented: true, augOff: [], augChaos: g % 3 === 0 }), seed: seedN(g + 7), isBot: (p) => p.startsWith('bot') });
|
||||
expect(r.finished).toBe(true);
|
||||
expect(r.botTimeouts).toBe(0);
|
||||
}
|
||||
|
||||
@@ -102,16 +102,18 @@ export interface AugSide {
|
||||
bronze?: true;
|
||||
/** Went out by an augment (네크로맨서 can bring it back), not by conceding. */
|
||||
outByAug?: true;
|
||||
/** 저주 인형: every throw of this side's next turn is a 도. */
|
||||
curse?: true;
|
||||
}
|
||||
|
||||
export type AugObjKind = 'skull' | 'hat' | 'gift' | 'poop' | 'garlic' | 'mark' | 'mine';
|
||||
export type AugObjKind = 'skull' | 'hat' | 'gift' | 'poop' | 'garlic' | 'mark' | 'mine' | 'hole';
|
||||
export interface AugObj {
|
||||
kind: AugObjKind;
|
||||
node: NodeId;
|
||||
owner: SideId;
|
||||
}
|
||||
|
||||
export type AugPromptKind = 'leech' | 'fold' | 'whoami' | 'vote' | 'roulette' | 'illusion' | 'plan' | 'duel' | 'thief';
|
||||
export type AugPromptKind = 'leech' | 'fold' | 'whoami' | 'vote' | 'roulette' | 'illusion' | 'plan' | 'duel' | 'thief' | 'copycat';
|
||||
export interface AugPrompt {
|
||||
kind: AugPromptKind;
|
||||
owner: SideId;
|
||||
@@ -213,6 +215,8 @@ export interface AugSideView {
|
||||
links: { to: SideId; by: AugId; on: boolean }[];
|
||||
reason: string | null;
|
||||
bronze: boolean;
|
||||
/** 저주 인형: the next turn throws only 도. */
|
||||
cursed: boolean;
|
||||
/** Waiting special pieces (they enter on their own, see the MOVE `piece` field). */
|
||||
homeSpecial: { piece: number; kind: PieceKind }[];
|
||||
}
|
||||
@@ -400,6 +404,18 @@ const sticksOf = (s: YutState, side: SideId) => A(s).sides[side]!.sticks + (hasA
|
||||
|
||||
const emptyThrown = (): Record<Throw, number> => ({ do: 0, gae: 0, geol: 0, yut: 0, mo: 0, backdo: 0 });
|
||||
|
||||
/** 텃세: the nodes just before 참먹이 (날도~날윷, 사려·안찌), mirrored for 달걸음. */
|
||||
const HOME_STRETCH: readonly NodeId[] = [16, 17, 18, 19, 27, 28];
|
||||
function homeSafe(s: YutState, side: SideId, p: Piece): boolean {
|
||||
if (p.status !== 'board' || !hasAug(s, side, 'homeground')) return false;
|
||||
const n = hasAug(s, side, 'moonwalk') ? MIRROR_DIAG[p.node!]! : p.node!;
|
||||
return HOME_STRETCH.includes(n);
|
||||
}
|
||||
/** The node right before 참먹이 on this side's road (날윷; 도 under 달걸음). */
|
||||
const lastNode = (s: YutState, side: SideId): NodeId => (hasAug(s, side, 'moonwalk') ? MIRROR_DIAG[19]! : 19);
|
||||
/** 도장 깨기 nodes: 모, 뒷모, 찌모, 방. */
|
||||
const STAMP_NODES: readonly NodeId[] = [5, 10, 15, 22];
|
||||
|
||||
// ---------------------------------------------------------------- setup
|
||||
|
||||
export function augSetup(s: YutState, rng: Rng, events: GameEvent[]): void {
|
||||
@@ -522,8 +538,10 @@ interface AugPlan {
|
||||
piece?: number;
|
||||
alt: boolean;
|
||||
apart: boolean;
|
||||
/** Pieces that would actually be caught (enemies, or own under 카니발리즘). */
|
||||
/** Enemy pieces that would actually be caught. */
|
||||
captures: number;
|
||||
/** Own pieces caught there (카니발리즘). */
|
||||
own: number;
|
||||
}
|
||||
|
||||
type MoveSel = Pick<YutMoveAction, 'piece' | 'alt' | 'stack'>;
|
||||
@@ -581,6 +599,13 @@ function planAug(s: YutState, sideId: SideId, throwIndex: number, from: NodeId |
|
||||
}
|
||||
}
|
||||
if (to === GOAL && movers.some((p) => p.kind === 'queen')) return null;
|
||||
// 줍줍: own pieces on the nodes passed on the way join the movers.
|
||||
if (t !== 'backdo' && hasAug(s, sideId, 'pickup') && !hasAug(s, sideId, 'cannibal') && !movers.some(isSpecial)) {
|
||||
const kind = movers[0]!.kind ?? 'n';
|
||||
const passed = new Set(to === GOAL ? path : path.slice(0, -1));
|
||||
for (const p of side.pieces)
|
||||
if (p.status === 'board' && passed.has(p.node!) && !movers.includes(p) && !isSpecial(p) && (p.kind ?? 'n') === kind && !frozen(s, p)) movers.push(p);
|
||||
}
|
||||
const stackWith: number[] = [];
|
||||
if (to !== GOAL && !hasAug(s, sideId, 'cannibal')) {
|
||||
for (const p of side.pieces) {
|
||||
@@ -604,19 +629,17 @@ function planAug(s: YutState, sideId: SideId, throwIndex: number, from: NodeId |
|
||||
alt,
|
||||
apart,
|
||||
captures: to === GOAL ? 0 : previewKills(s, sideId, to, movers.map((p) => p.id), t === 'backdo'),
|
||||
own: to === GOAL || !hasAug(s, sideId, 'cannibal') ? 0 : side.pieces.filter((p) => p.status === 'board' && p.node === to && !movers.includes(p)).length,
|
||||
};
|
||||
}
|
||||
|
||||
/** How many pieces landing on `node` would catch (protections included). */
|
||||
/** How many enemy pieces landing on `node` would catch (protections included). */
|
||||
function previewKills(s: YutState, sideId: SideId, node: NodeId, movers: number[], _backdo: boolean): number {
|
||||
let n = 0;
|
||||
for (const x of s.sides) {
|
||||
const ids = x.pieces.filter((p) => p.status === 'board' && p.node === node && !(x.id === sideId && movers.includes(p.id)));
|
||||
if (x.id === sideId) continue;
|
||||
const ids = x.pieces.filter((p) => p.status === 'board' && p.node === node);
|
||||
if (!ids.length) continue;
|
||||
if (x.id === sideId) {
|
||||
if (hasAug(s, sideId, 'cannibal')) n += ids.length;
|
||||
continue;
|
||||
}
|
||||
n += killableCount(s, sideId, x.id, ids);
|
||||
}
|
||||
return n;
|
||||
@@ -625,6 +648,7 @@ function previewKills(s: YutState, sideId: SideId, node: NodeId, movers: number[
|
||||
function killableCount(s: YutState, killer: SideId | null, victim: SideId, ps: Piece[]): number {
|
||||
if (killer !== null && killer !== victim && (hasAug(s, killer, 'peace') || hasAug(s, victim, 'peace'))) return 0;
|
||||
if (killer !== victim && hasAug(s, victim, 'turtle') && ps.length >= 3) return 0;
|
||||
if (killer !== victim) ps = ps.filter((p) => !homeSafe(s, victim, p));
|
||||
let die = ps.filter((p) => !p.shield).length;
|
||||
if (killer !== victim && hasAug(s, victim, 'friendshield')) die = Math.min(die, 1);
|
||||
return die;
|
||||
@@ -695,6 +719,7 @@ const toLegal = (p: AugPlan): YutLegalMove => ({
|
||||
path: p.path,
|
||||
count: p.movers.length,
|
||||
captures: p.captures,
|
||||
...(p.own ? { ownCaptures: p.own } : {}),
|
||||
stacks: p.stackWith.length > 0,
|
||||
finishes: p.to === GOAL,
|
||||
...(p.piece !== undefined ? { piece: p.piece } : {}),
|
||||
@@ -739,6 +764,8 @@ function killPieces(s: YutState, ctx: Ctx, killer: SideId | null, victim: SideId
|
||||
if (!ps.length) return 0;
|
||||
if (other && (hasAug(s, killer!, 'peace') || hasAug(s, victim, 'peace'))) return 0;
|
||||
if (other && hasAug(s, victim, 'turtle') && ps.length >= 3 && new Set(ps.map((p) => p.node)).size === 1) return 0;
|
||||
if (killer !== victim) ps = ps.filter((p) => !homeSafe(s, victim, p));
|
||||
if (!ps.length) return 0;
|
||||
let die: Piece[] = [];
|
||||
for (const p of ps) {
|
||||
if (p.shield) {
|
||||
@@ -974,6 +1001,7 @@ function checkWins(s: YutState, ctx: Ctx): void {
|
||||
else if (has('summon') && a.sides[id]!.ritual >= 12) by = 'summon';
|
||||
else if (has('bear') && a.sides[id]!.garlic >= 3) by = 'bear';
|
||||
else if (has('queen') && (has('queen')!.n ?? 0) >= 12) by = 'queen';
|
||||
else if ((has('stamp')?.list?.length ?? 0) >= STAMP_NODES.length) by = 'stamp';
|
||||
else if (has('nofriends')) {
|
||||
const others = s.sides.filter((y) => y.id !== id && sideActive(y)).map((y) => y.id);
|
||||
if (others.length && others.every((o) => has('nofriends')!.list?.includes(o))) by = 'nofriends';
|
||||
@@ -1115,6 +1143,10 @@ function beginTurn(s: YutState, ctx: Ctx): void {
|
||||
log(s, ctx, { type: 'augEffect', side: id, aug: 'revenge', text: `복수의 칼날: ${as.bonus}번 더 던져요` });
|
||||
as.bonus = 0;
|
||||
}
|
||||
if (hasAug(s, id, 'underdog') && isLast(s, id)) {
|
||||
s.throwsOwed += 1;
|
||||
log(s, ctx, { type: 'augEffect', side: id, aug: 'underdog', text: '꼴찌의 반란: 한 번 더 던져요' });
|
||||
}
|
||||
checkWins(s, ctx);
|
||||
if (phaseOf(s) === 'finished') return;
|
||||
if (!sideActive(x)) {
|
||||
@@ -1128,10 +1160,18 @@ function beginTurn(s: YutState, ctx: Ctx): void {
|
||||
}
|
||||
}
|
||||
|
||||
/** 꼴찌의 반란: `side` alone has the fewest pieces home (ties: the longest way to go) among the sides still playing. */
|
||||
function isLast(s: YutState, side: SideId): boolean {
|
||||
const me = s.sides[side]!;
|
||||
const others = liveSides(s).filter((y) => y.id !== side);
|
||||
return others.length > 0 && others.every((y) => doneCount(y) > doneCount(me) || (doneCount(y) === doneCount(me) && sideDist(s, y) < sideDist(s, me)));
|
||||
}
|
||||
|
||||
/** The side to move is done: end-of-turn effects, then the next turn. */
|
||||
function endTurnAug(s: YutState, ctx: Ctx): void {
|
||||
const a = A(s);
|
||||
const id = s.turnSide;
|
||||
if (a.sides[id]!.curse && a.turnThrows > 0) delete a.sides[id]!.curse;
|
||||
if (a.lastDance) {
|
||||
a.lastDance = false;
|
||||
if (sideActive(s.sides[id]!)) eliminate(s, ctx, id, '라스트 댄스', 'lastdance');
|
||||
@@ -1206,6 +1246,7 @@ function eligible(s: YutState, side: SideId, id: AugId, tier: Exclude<AugTier, '
|
||||
return total >= 4;
|
||||
case 'score':
|
||||
case 'ox':
|
||||
case 'frog':
|
||||
return o.backdo;
|
||||
case 'bronze':
|
||||
return live >= 3 && !usedRanks(s).has(3) && freeRank(s) <= 3;
|
||||
@@ -1216,6 +1257,12 @@ function eligible(s: YutState, side: SideId, id: AugId, tier: Exclude<AugTier, '
|
||||
case 'whoami':
|
||||
case 'notme':
|
||||
case 'duel':
|
||||
case 'curse':
|
||||
case 'freeze':
|
||||
case 'pushback':
|
||||
case 'finisher':
|
||||
case 'copycat':
|
||||
case 'underdog':
|
||||
return live >= 2;
|
||||
}
|
||||
return true;
|
||||
@@ -1556,9 +1603,57 @@ function acquire(s: YutState, ctx: Ctx, side: SideId, id: AugId, target?: AugId)
|
||||
case 'thief':
|
||||
if (thiefTargets(s, side).length) a.prompts.push({ kind: 'thief', owner: side, actors: [side], answers: {} });
|
||||
break;
|
||||
case 'copycat':
|
||||
if (copyTargets(s, side).length) a.prompts.push({ kind: 'copycat', owner: side, actors: [side], answers: {} });
|
||||
break;
|
||||
case 'dash': {
|
||||
const p = homeDefault(x);
|
||||
if (p) {
|
||||
const path = hasAug(s, side, 'moonwalk') ? [19, 18, 17] : [1, 2, 3];
|
||||
killNodes(s, ctx, side, [path[2]!], id);
|
||||
Object.assign(p, { status: 'board', node: path[2]!, lapped: false, trail: path });
|
||||
mergeOwn(s, side, [p]);
|
||||
say(`스타트 대시: 말 하나가 ${nodeKo(path[2]!)} 자리에서 시작해요`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'bunker':
|
||||
for (const p of x.pieces) if (p.status !== 'done') p.shield = true;
|
||||
say('방공호: 내 말이 모두 보호막을 둘렀어요');
|
||||
break;
|
||||
case 'lightning': {
|
||||
const all = s.sides.flatMap((y) => stacksAug(y).map((g) => ({ side: y.id, ids: g.ids })));
|
||||
const hit = ctx.rng.shuffle(all).slice(0, 2);
|
||||
let k = 0;
|
||||
for (const g of hit) k += killPieces(s, ctx, side, g.side, s.sides[g.side]!.pieces.filter((p) => g.ids.includes(p.id) && p.status === 'board'), { aug: id });
|
||||
say(hit.length ? `벼락! ${hit.map((g) => nm(g.side)).join('·')} 말뭉치에 떨어져 말 ${k}개가 잡혔어요` : '벼락! 판에 말이 없어 빗나갔어요');
|
||||
if (k) checkAlone(s, ctx, side);
|
||||
break;
|
||||
}
|
||||
case 'blackhole': {
|
||||
const k = killNodes(s, ctx, side, [22], id);
|
||||
a.objs.push({ kind: 'hole', node: 22, owner: side });
|
||||
say(`블랙홀: 방이 블랙홀이 됐어요${k ? ` (말 ${k}개가 빨려 들어감)` : ''}`);
|
||||
break;
|
||||
}
|
||||
case 'finisher': {
|
||||
let best: { side: SideId; ps: Piece[]; d: number } | null = null;
|
||||
for (const y of others())
|
||||
for (const g of stacksAug(y)) {
|
||||
const ps = y.pieces.filter((p) => g.ids.includes(p.id));
|
||||
const d = distOf(s, y.id, ps[0]!);
|
||||
if (!best || d < best.d) best = { side: y.id, ps, d };
|
||||
}
|
||||
if (best) {
|
||||
const k = killPieces(s, ctx, side, best.side, best.ps, { aug: id });
|
||||
say(`최후의 일격: ${nm(best.side)}의 가장 앞선 말뭉치를 노려 말 ${k}개를 잡았어요`);
|
||||
if (k) checkAlone(s, ctx, side);
|
||||
} else say('최후의 일격: 판 위에 노릴 말이 없어요');
|
||||
break;
|
||||
}
|
||||
case 'storm': {
|
||||
const all = s.sides.flatMap((y) => stacksAug(y).map((g) => ({ side: y.id, ids: g.ids })));
|
||||
const nodes = ctx.rng.shuffle(Array.from({ length: 28 }, (_, i) => i + 1)).filter((n) => !a.objs.some((o) => o.node === n && (o.kind === 'skull' || o.kind === 'mine')));
|
||||
const nodes = ctx.rng.shuffle(Array.from({ length: 28 }, (_, i) => i + 1)).filter((n) => !a.objs.some((o) => o.node === n && (o.kind === 'skull' || o.kind === 'mine' || o.kind === 'hole')));
|
||||
all.forEach((g, i) => {
|
||||
const node = nodes[i];
|
||||
if (node === undefined) return;
|
||||
@@ -1577,6 +1672,20 @@ function illusionTargets(s: YutState, side: SideId): { side: SideId; o: AugOwned
|
||||
.flatMap((y) => a.sides[y.id]!.augs.filter((o) => !o.used && !o.voided && o.id !== 'cat' && !((o.catUntil ?? 0) > a.round)).map((o) => ({ side: y.id, o })));
|
||||
}
|
||||
|
||||
/** 따라쟁이: other players' augments (one per kind) I could get a copy of. */
|
||||
function copyTargets(s: YutState, side: SideId): { side: SideId; o: AugOwned }[] {
|
||||
const a = A(s);
|
||||
const seen = new Set<AugId>();
|
||||
return s.sides
|
||||
.filter((y) => y.id !== side && sideActive(y))
|
||||
.flatMap((y) => a.sides[y.id]!.augs.map((o) => ({ side: y.id, o })))
|
||||
.filter(({ o }) => {
|
||||
if (o.voided || AUGS[o.id].kind === 'instant' || o.id === 'cat' || seen.has(o.id) || a.sides[side]!.augs.some((m) => m.id === o.id && !m.voided)) return false;
|
||||
seen.add(o.id);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
function thiefTargets(s: YutState, side: SideId): { side: SideId; o: AugOwned }[] {
|
||||
const a = A(s);
|
||||
return s.sides
|
||||
@@ -1614,6 +1723,8 @@ function promptChoices(s: YutState, pr: AugPrompt, side: SideId): { value: numbe
|
||||
return illusionTargets(s, side).map((t) => ({ value: t.o.uid, label: `${nm(t.side)} · ${AUGS[t.o.id].name}` }));
|
||||
case 'thief':
|
||||
return thiefTargets(s, side).map((t) => ({ value: t.o.uid, label: `${nm(t.side)} · ${AUGS[t.o.id].name}` }));
|
||||
case 'copycat':
|
||||
return copyTargets(s, side).map((t) => ({ value: t.o.uid, label: `${nm(t.side)} · ${AUGS[t.o.id].name}` }));
|
||||
case 'plan':
|
||||
return s.sides.map((y) => ({ value: y.id, label: nm(y.id) }));
|
||||
}
|
||||
@@ -1746,6 +1857,15 @@ function resolvePrompt(s: YutState, ctx: Ctx, pr: AugPrompt): void {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'copycat': {
|
||||
const uid = ans(o) as number;
|
||||
const t = a.sides.flatMap((as) => as.augs).find((x) => x.uid === uid);
|
||||
if (t && sideActive(s.sides[o]!)) {
|
||||
say('copycat', `따라쟁이: ${josa(`[${AUGS[t.id].name}]`, '을/를')} 따라 했어요`);
|
||||
acquire(s, ctx, o, t.id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'plan': {
|
||||
const own = hasAug(s, o, 'plan');
|
||||
if (own) own.list = ans(o) as number[];
|
||||
@@ -1813,6 +1933,10 @@ function doThrowAug(s: YutState, ctx: Ctx, pick: 'do' | 'gae' | undefined, force
|
||||
results = [forced];
|
||||
sticks = sticksFor(forced, sticksOf(s, id));
|
||||
note = '손은 눈보다 빠르다';
|
||||
} else if (as.curse) {
|
||||
results = ['do'];
|
||||
sticks = sticksFor('do', sticksOf(s, id));
|
||||
note = '저주 인형';
|
||||
} else if (hasAug(s, id, 'doggy')) {
|
||||
const r = pick ?? 'gae';
|
||||
results = [r];
|
||||
@@ -1864,6 +1988,13 @@ function doThrowAug(s: YutState, ctx: Ctx, pick: 'do' | 'gae' | undefined, force
|
||||
}
|
||||
results = [throwOfCount(k, k === 1 && !!sticks[0], o.backdo)];
|
||||
}
|
||||
// 청개구리: my 빽도 becomes a 모 (without the extra throw).
|
||||
let frogged = false;
|
||||
if (!forced && !as.curse && hasAug(s, id, 'frog') && results.includes('backdo')) {
|
||||
results = results.map((r) => (r === 'backdo' ? 'mo' : r));
|
||||
frogged = true;
|
||||
note = '청개구리';
|
||||
}
|
||||
s.lastThrow = { no: s.throwNo, player: s.current, sticks, result: results[0]!, ...(results.length > 1 ? { results } : {}), ...(note ? { note } : {}) };
|
||||
for (const r of results) {
|
||||
s.pending.push(r);
|
||||
@@ -1871,7 +2002,7 @@ function doThrowAug(s: YutState, ctx: Ctx, pick: 'do' | 'gae' | undefined, force
|
||||
as.thrown[r] += 1;
|
||||
a.turnResults.push(r);
|
||||
log(s, ctx, { type: 'thrown', side: id, player: s.current, sticks, result: r });
|
||||
if ((r === 'yut' || r === 'mo') && results.length === 1) s.throwsOwed += 1;
|
||||
if ((r === 'yut' || r === 'mo') && results.length === 1 && !frogged) s.throwsOwed += 1;
|
||||
if (r === 'geol' && hasAug(s, id, 'tiger')) {
|
||||
s.throwsOwed += 1;
|
||||
log(s, ctx, { type: 'augEffect', side: id, aug: 'tiger', text: '호랑이 기운: 걸이라 한 번 더 던져요' });
|
||||
@@ -2027,10 +2158,11 @@ function landObjects(s: YutState, ctx: Ctx, side: SideId, movers: Piece[]): void
|
||||
a.objs.splice(a.objs.indexOf(ob), 1);
|
||||
a.sides[side]!.garlic += 1;
|
||||
log(s, ctx, { type: 'augEffect', side, aug: 'bear', text: `마늘을 주웠어요 (${a.sides[side]!.garlic}/3)` });
|
||||
} else if ((ob.kind === 'skull' || ob.kind === 'mine') && ob.owner !== side) {
|
||||
} else if ((ob.kind === 'skull' || ob.kind === 'mine' || ob.kind === 'hole') && ob.owner !== side) {
|
||||
if (ob.kind === 'mine') a.objs.splice(a.objs.indexOf(ob), 1);
|
||||
const k = killPieces(s, ctx, ob.owner, side, movers, { aug: ob.kind === 'mine' ? 'mine' : 'party' });
|
||||
log(s, ctx, { type: 'augEffect', side: ob.owner, aug: ob.kind === 'mine' ? 'mine' : 'party', text: ob.kind === 'mine' ? `지뢰가 터져 말 ${k}개가 잡혔어요` : `해골 함정에 말 ${k}개가 잡혔어요` });
|
||||
const aug: AugId = ob.kind === 'mine' ? 'mine' : ob.kind === 'hole' ? 'blackhole' : 'party';
|
||||
const k = killPieces(s, ctx, ob.owner, side, movers, { aug });
|
||||
log(s, ctx, { type: 'augEffect', side: ob.owner, aug, text: ob.kind === 'mine' ? `지뢰가 터져 말 ${k}개가 잡혔어요` : ob.kind === 'hole' ? `블랙홀에 말 ${k}개가 빨려 들어갔어요` : `해골 함정에 말 ${k}개가 잡혔어요` });
|
||||
return;
|
||||
} else if (ob.kind === 'hat' && ob.owner !== side) {
|
||||
const b = walkBack(s, side, node, movers[0]!.trail, 2);
|
||||
@@ -2129,7 +2261,19 @@ function doMoveAug(s: YutState, ctx: Ctx, act: YutMoveAction): void {
|
||||
info.captured = s.sides.map((x, i) => ({ side: x.id, count: before[i]! - x.pieces.filter((p) => p.status === 'board' && p.node === plan.to).length })).filter((c) => c.count > 0 && c.side !== id);
|
||||
s.lastMove = info;
|
||||
if (phaseOf(s) === 'finished') return;
|
||||
if (k.enemy && (plan.throw !== 'backdo' || s.options.backdoCaptureBonus)) bonus += 1;
|
||||
if (k.enemy && (plan.throw !== 'backdo' || s.options.backdoCaptureBonus)) {
|
||||
bonus += 1;
|
||||
if (hasAug(s, id, 'hunter')) {
|
||||
bonus += 1;
|
||||
log(s, ctx, { type: 'augEffect', side: id, aug: 'hunter', text: '사냥꾼: 두 번 더 던져요' });
|
||||
}
|
||||
}
|
||||
// 도장 깨기: count the corner / 방 this move stopped on.
|
||||
const stamp = hasAug(s, id, 'stamp');
|
||||
if (stamp && STAMP_NODES.includes(plan.to) && movers.some((p) => p.status === 'board') && !(stamp.list ?? []).includes(plan.to)) {
|
||||
stamp.list = [...(stamp.list ?? []), plan.to];
|
||||
log(s, ctx, { type: 'augEffect', side: id, aug: 'stamp', text: `도장 깨기: ${nodeKo(plan.to)} 도장 (${stamp.list.length}/4)` });
|
||||
}
|
||||
if (k.treason) {
|
||||
bonus += 1;
|
||||
log(s, ctx, { type: 'augEffect', side: id, aug: 'treason', text: '역모: 한 번 더 던져요' });
|
||||
@@ -2171,6 +2315,7 @@ function pieceLabel(s: YutState, side: SideId, ps: Piece[]): string {
|
||||
const kind = p.kind ? PIECE_KO[p.kind] : '말';
|
||||
return `${where} ${kind}${ps.length > 1 ? ` ${ps.length}개` : ''}`;
|
||||
}
|
||||
const THROW_NAME: Record<Throw, string> = { backdo: '빽도', do: '도', gae: '개', geol: '걸', yut: '윷', mo: '모' };
|
||||
const NODE_KO = ['참먹이', '도', '개', '걸', '윷', '모', '뒷도', '뒷개', '뒷걸', '뒷윷', '뒷모', '찌도', '찌개', '찌걸', '찌윷', '찌모', '날도', '날개', '날걸', '날윷', '앞모도', '앞모개', '방', '속윷', '속모', '뒷모도', '뒷모개', '사려', '안찌'];
|
||||
const nodeKo = (n: NodeId) => NODE_KO[n] ?? String(n);
|
||||
|
||||
@@ -2325,6 +2470,47 @@ export function useOptions(s: YutState, side: SideId): AugUseOption[] {
|
||||
for (const h of stacksAug(y)) if (h.node !== g.node) add({ piece: g.ids[0]!, target: y.id, node: h.node }, `${pieceLabel(s, side, g.ps)} ↔ ${nm(y.id)} ${nodeKo(h.node)}`);
|
||||
}
|
||||
break;
|
||||
case 'reroll':
|
||||
if (!a.sides[side]!.usedTurn.includes('reroll')) for (const r of [...new Set(s.pending)]) add({ result: r }, `${THROW_NAME[r]} 버리고 다시 던지기`);
|
||||
break;
|
||||
case 'double':
|
||||
for (const r of [...new Set(s.pending)]) add({ result: r }, `${THROW_NAME[r]} 하나 더`);
|
||||
break;
|
||||
case 'gamble':
|
||||
add({}, '올인!');
|
||||
break;
|
||||
case 'curse':
|
||||
for (const y of s.sides) if (y.id !== side && sideActive(y) && !a.sides[y.id]!.curse) add({ target: y.id }, nm(y.id));
|
||||
break;
|
||||
case 'freeze':
|
||||
case 'pushback':
|
||||
for (const y of s.sides) {
|
||||
if (y.id === side || !sideActive(y)) continue;
|
||||
const seen = new Set<NodeId>();
|
||||
for (const h of stacksAug(y)) {
|
||||
if (seen.has(h.node)) continue;
|
||||
seen.add(h.node);
|
||||
const ps = y.pieces.filter((p) => h.ids.includes(p.id));
|
||||
if (o.id === 'freeze') {
|
||||
if (!ps.every((p) => frozen(s, p))) add({ target: y.id, node: h.node }, `${nm(y.id)} ${pieceLabel(s, y.id, ps)}`);
|
||||
} else {
|
||||
const b = walkBack(s, y.id, h.node, ps[0]!.trail, 3);
|
||||
// never past 참먹이 (that would put the stack next to the finish)
|
||||
if (b.to !== GOAL && !b.path.includes(0)) add({ target: y.id, node: h.node }, `${nm(y.id)} ${pieceLabel(s, y.id, ps)} → ${nodeKo(b.to)}`, previewKills(s, y.id, b.to, h.ids, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'magnet':
|
||||
for (const g of stacks) add({ piece: g.ids[0]! }, pieceLabel(s, side, g.ps), enemiesOn([...NEIGHBOURS[g.node]!]));
|
||||
break;
|
||||
case 'rocket': {
|
||||
const dest = lastNode(s, side);
|
||||
for (const g of stacks) if (g.node !== dest && !g.ps.some((p) => isSpecial(p) || frozen(s, p))) add({ piece: g.ids[0]! }, `${pieceLabel(s, side, g.ps)} → ${nodeKo(dest)}`, enemiesOn([dest]));
|
||||
const h = homeDefault(x);
|
||||
if (h) add({ piece: h.id }, `대기 말 → ${nodeKo(dest)}`, enemiesOn([dest]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
@@ -2550,6 +2736,64 @@ function applyUse(s: YutState, ctx: Ctx, side: SideId, act: AugUse): void {
|
||||
say(`자리 바꾸기: ${nm(y.id)} 말과 자리를 바꿨어요`);
|
||||
break;
|
||||
}
|
||||
case 'reroll':
|
||||
as.usedTurn.push('reroll');
|
||||
s.pending.splice(s.pending.indexOf(act.result!), 1);
|
||||
s.throwsOwed += 1;
|
||||
s.phase = 'throw';
|
||||
say(`다시 던지기: ${josa(THROW_NAME[act.result!], '을/를')} 버리고 다시 던져요`);
|
||||
break;
|
||||
case 'double':
|
||||
s.pending.push(act.result!);
|
||||
say(`곱빼기: ${josa(THROW_NAME[act.result!], '을/를')} 하나 더 받았어요`);
|
||||
break;
|
||||
case 'gamble':
|
||||
if (ctx.rng.next() < 0.5) {
|
||||
s.throwsOwed += 3;
|
||||
s.phase = 'throw';
|
||||
say('올인 성공! 던지기 3번을 더 받아요');
|
||||
} else {
|
||||
say('올인 실패… 모아 둔 결과를 모두 잃고 차례가 끝나요');
|
||||
endsTurn = true;
|
||||
}
|
||||
break;
|
||||
case 'curse':
|
||||
a.sides[act.target!]!.curse = true;
|
||||
say(`저주 인형: ${nm(act.target!)}은 다음 차례에 도만 나와요`);
|
||||
break;
|
||||
case 'freeze': {
|
||||
const y = s.sides[act.target!]!;
|
||||
for (const p of y.pieces) if (p.status === 'board' && p.node === act.node) p.frozenUntil = Math.max(p.frozenUntil ?? 0, a.round + 2);
|
||||
say(`얼음! ${nm(y.id)}의 ${nodeKo(act.node!)} 말이 2라운드 동안 얼었어요`);
|
||||
break;
|
||||
}
|
||||
case 'pushback': {
|
||||
const y = s.sides[act.target!]!;
|
||||
const g = stacksAug(y).find((h) => h.node === act.node!)!;
|
||||
const ps = y.pieces.filter((p) => g.ids.includes(p.id));
|
||||
const b = walkBack(s, y.id, act.node!, ps[0]!.trail, 3);
|
||||
say(`뒤로 돌아: ${nm(y.id)}의 ${nodeKo(act.node!)} 말이 ${nodeKo(b.to as NodeId)}까지 밀려났어요`);
|
||||
shiftStack(s, ctx, y.id, ps, b.to, b.trail);
|
||||
break;
|
||||
}
|
||||
case 'magnet': {
|
||||
const ps = stackOf(act.piece!);
|
||||
let n = 0;
|
||||
for (const y of s.sides) if (y.id !== side) for (const node of NEIGHBOURS[ps[0]!.node!]!) n += killPieces(s, ctx, side, y.id, y.pieces.filter((p) => p.status === 'board' && p.node === node), { aug: 'magnet' });
|
||||
say(`자석: 옆 칸의 말 ${n}개를 끌어와 잡았어요`);
|
||||
if (n) checkAlone(s, ctx, side);
|
||||
break;
|
||||
}
|
||||
case 'rocket': {
|
||||
const p0 = x.pieces.find((q) => q.id === act.piece)!;
|
||||
const ps = p0.status === 'home' ? [p0] : stackOf(act.piece!);
|
||||
const dest = lastNode(s, side);
|
||||
for (const p of ps) relocate(p, dest);
|
||||
const k = landKills(s, ctx, side, ps, dest, false);
|
||||
mergeOwn(s, side, ps);
|
||||
say(`로켓 발사! ${nodeKo(dest)}까지 날아갔어요${k.enemy ? ` (말 ${k.enemy}개 잡음)` : ''}`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (phaseOf(s) === 'finished') return;
|
||||
checkWins(s, ctx);
|
||||
@@ -2949,6 +3193,8 @@ function ownedNote(s: YutState, side: SideId, o: AugOwned): string | null {
|
||||
case 'detective':
|
||||
case 'delivery':
|
||||
return o.target !== undefined ? AUGS[AUG_IDS[o.target]!].name : null;
|
||||
case 'stamp':
|
||||
return `도장 ${STAMP_NODES.map((n) => ((o.list ?? []).includes(n) ? '●' : '○')).join('')}`;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -2985,6 +3231,7 @@ export function augView(s: YutState, viewer: PlayerId | null, base: YutView): Yu
|
||||
links: as.links.map((l) => ({ to: l.to, by: l.by, on: activeLink(s, x.id, l) })),
|
||||
reason: as.reason,
|
||||
bronze: !!as.bronze,
|
||||
cursed: !!as.curse,
|
||||
homeSpecial: x.pieces.filter((p) => p.status === 'home' && p.kind).map((p) => ({ piece: p.id, kind: p.kind! })),
|
||||
};
|
||||
}),
|
||||
@@ -3064,7 +3311,7 @@ export function augView(s: YutState, viewer: PlayerId | null, base: YutView): Yu
|
||||
const [i, j] = [l.indexOf(u.action.node!), l.indexOf(u.action.node2!)].sort((p, q) => p - q);
|
||||
return seen(l.slice(i!, j! + 1));
|
||||
}
|
||||
if (u.id === 'swap') return seen([u.action.node]);
|
||||
if (u.id === 'swap' || u.id === 'freeze' || u.id === 'pushback') return seen([u.action.node]);
|
||||
return true;
|
||||
})
|
||||
.map((u) => ({ ...u, kills: undefined, label: u.id === 'baduk' ? u.label.replace(/ 사이 \d+개$/, ' 사이') : u.label }));
|
||||
|
||||
@@ -42,6 +42,8 @@ export const AUG_IDS = [
|
||||
'cannibal',
|
||||
// 이 사이트 추가
|
||||
'teleport', 'shortcut', 'turtle', 'revenge', 'thief', 'mine', 'tiger', 'twins', 'swap', 'storm',
|
||||
'reroll', 'double', 'gamble', 'curse', 'freeze', 'magnet', 'pushback', 'underdog', 'homeground', 'copycat', 'frog', 'hunter',
|
||||
'pickup', 'stamp', 'dash', 'bunker', 'lightning', 'blackhole', 'rocket', 'finisher',
|
||||
] as const;
|
||||
export type AugId = (typeof AUG_IDS)[number];
|
||||
|
||||
@@ -132,6 +134,26 @@ const L: Omit<AugInfo, 'id'>[] = [
|
||||
{ name: '쌍둥이', tier: 'any', kind: 'active', once: true, custom: true, text: '대기 중인 내 말 하나를 판 위 내 말뭉치에 바로 업혀요.' },
|
||||
{ name: '자리 바꾸기', tier: 'any', kind: 'active', once: true, custom: true, text: '내 말뭉치 하나와 다른 사람 말뭉치 하나의 자리를 맞바꿔요.' },
|
||||
{ name: '회오리', tier: 'mid', kind: 'instant', custom: true, text: '판 위의 모든 말뭉치가 회오리에 휩쓸려 무작위 칸으로 흩어져요.', note: '참먹이에는 떨어지지 않고, 말뭉치끼리 겹치지 않아요.' },
|
||||
{ name: '다시 던지기', tier: 'any', kind: 'active', custom: true, text: '내 차례마다 한 번, 갖고 있는 윷 결과 하나를 버리고 다시 던져요.' },
|
||||
{ name: '곱빼기', tier: 'any', kind: 'active', once: true, custom: true, text: '갖고 있는 윷 결과 하나를 하나 더 받아요.' },
|
||||
{ name: '올인', tier: 'any', kind: 'active', once: true, custom: true, text: '반반 확률로 던지기 3번을 더 받거나, 모아 둔 결과를 모두 잃고 차례가 끝나요.' },
|
||||
{ name: '저주 인형', tier: 'any', kind: 'active', once: true, custom: true, text: '한 사람을 골라요. 그 사람은 다음 차례에 던질 때마다 도만 나와요.' },
|
||||
{ name: '얼음!', tier: 'any', kind: 'active', once: true, custom: true, text: '다른 사람 말뭉치 하나를 2라운드 동안 얼려 못 움직이게 해요.' },
|
||||
{ name: '자석', tier: 'any', kind: 'active', once: true, custom: true, text: '내 말뭉치 하나를 골라요. 바로 옆 칸(선으로 이어진 칸)에 있는 다른 사람 말을 모두 끌어와 잡아요.' },
|
||||
{ name: '뒤로 돌아', tier: 'any', kind: 'active', once: true, custom: true, text: '다른 사람 말뭉치 하나를 뒤로 3칸 보내요.', note: '밀려난 칸에 다른 말이 있으면 마녀 모자 함정처럼 그 말을 잡아요.' },
|
||||
{ name: '꼴찌의 반란', tier: 'any', kind: 'passive', custom: true, text: '내 차례가 시작될 때 내가 혼자 꼴찌면 한 번 더 던져요.', note: '난 말이 가장 적고, 같으면 남은 거리가 가장 먼 사람이 꼴찌예요.' },
|
||||
{ name: '텃세', tier: 'any', kind: 'passive', custom: true, text: '참먹이로 들어가기 바로 전 칸들(날도~날윷, 사려·안찌)에 선 내 말은 잡히지 않아요.', note: '달걸음이 있으면 반대쪽(뒷도 쪽) 칸들이에요.' },
|
||||
{ name: '따라쟁이', tier: 'any', kind: 'instant', custom: true, text: '다른 사람이 가진 증강 하나를 골라 똑같은 것을 하나 얻어요.', note: '즉시 효과 증강과 고양이는 따라 할 수 없어요.' },
|
||||
{ name: '청개구리', tier: 'any', kind: 'passive', custom: true, text: '내가 던져서 빽도가 나오면 모가 돼요. 대신 한 번 더 던지지는 않아요.' },
|
||||
{ name: '사냥꾼', tier: 'any', kind: 'passive', custom: true, text: '윷을 던져 말을 움직여 잡으면 한 번이 아니라 두 번 더 던져요.' },
|
||||
{ name: '줍줍', tier: 'any', kind: 'passive', custom: true, text: '앞으로 갈 때 지나가는 칸에 있는 내 말을 모두 주워 업고 가요.' },
|
||||
{ name: '도장 깨기', tier: 'any', kind: 'win', win: true, custom: true, text: '윷을 던져 움직인 내 말이 모·뒷모·찌모·방에 한 번씩 멈추면 이겨요.', note: '이 증강을 얻은 뒤부터 세요.' },
|
||||
{ name: '스타트 대시', tier: 'start', kind: 'instant', custom: true, text: '대기 중인 내 말 하나가 걸 자리에서 시작해요.' },
|
||||
{ name: '방공호', tier: 'start', kind: 'instant', custom: true, text: '내 말이 모두 보호막을 하나씩 두르고 시작해요.', note: '보호막은 잡힐 때 한 번 막아 줘요.' },
|
||||
{ name: '벼락', tier: 'mid', kind: 'instant', custom: true, text: '판 위 말뭉치 중 무작위 2개에 벼락이 떨어져 잡혀요. 내 말도 맞을 수 있어요.' },
|
||||
{ name: '블랙홀', tier: 'mid', kind: 'instant', custom: true, text: '방(판 가운데)이 블랙홀이 돼요. 방에 있던 말은 모두 빨려 들어가고, 이제 다른 사람 말이 방에 멈추면 잡혀요.' },
|
||||
{ name: '로켓 발사', tier: 'final', kind: 'active', once: true, custom: true, text: '내 말뭉치 하나(또는 대기 말 하나)를 참먹이 바로 앞 칸(날윷)으로 보내요.', note: '그 칸에 있던 다른 사람 말은 잡아요.' },
|
||||
{ name: '최후의 일격', tier: 'final', kind: 'instant', custom: true, text: '다른 사람 말뭉치 중 가장 앞선 것 하나를 잡아요.' },
|
||||
];
|
||||
|
||||
export const AUGS: Record<AugId, AugInfo> = Object.fromEntries(AUG_IDS.map((id, i) => [id, { id, ...L[i]! }])) as Record<AugId, AugInfo>;
|
||||
|
||||
@@ -56,6 +56,8 @@ export const yutBot: BotStrategy<YutView, YutAction> = ({ view, legal, random })
|
||||
if (m.finishes) return v + 15 * m.count;
|
||||
const to = m.to as NodeId;
|
||||
if (m.captures) v += 30 + m.captures * (STEP * (home - dist(to)) + 10);
|
||||
// 카니발리즘: catching my own pieces throws their progress away.
|
||||
if (m.ownCaptures) v -= m.ownCaptures * (STEP * (home - dist(to)) + 10);
|
||||
// Standing apart still shares the node, so a catch there takes everything; only stacking earns the small bonus.
|
||||
const group = m.count + (m.stacks || m.stack === false ? mineAt(to) : 0);
|
||||
if (m.stacks) v += 6;
|
||||
|
||||
@@ -105,7 +105,12 @@ export const yutOptionsSchema = z.object({
|
||||
.union([z.literal(2), z.literal(3), z.literal(4)])
|
||||
.default(3)
|
||||
.meta({ title: '증강: 후보 수', labels: { 2: '2개', 3: '3개', 4: '4개' } }),
|
||||
augOff: z.array(z.enum(AUG_IDS).meta({ labels: Object.fromEntries(AUG_IDS.map((id) => [id, AUGS[id].name])) })).max(AUG_IDS.length).default([]).meta({ title: '증강: 나오지 않게 뺀 증강' }),
|
||||
// This site's own augments start switched off (the room can switch them on).
|
||||
augOff: z
|
||||
.array(z.enum(AUG_IDS).meta({ labels: Object.fromEntries(AUG_IDS.map((id) => [id, AUGS[id].name])) }))
|
||||
.max(AUG_IDS.length)
|
||||
.default(() => AUG_IDS.filter((id) => AUGS[id].custom))
|
||||
.meta({ title: '증강: 나오지 않게 뺀 증강' }),
|
||||
});
|
||||
export type YutOptions = z.infer<typeof yutOptionsSchema>;
|
||||
|
||||
@@ -275,6 +280,8 @@ export interface YutLegalMove {
|
||||
count: number;
|
||||
/** Opponent pieces caught. */
|
||||
captures: number;
|
||||
/** 증강 카니발리즘: own pieces caught there. */
|
||||
ownCaptures?: number;
|
||||
stacks: boolean;
|
||||
finishes: boolean;
|
||||
/** Action fields that pick this variant (see the MOVE schema); absent for the ordinary move. */
|
||||
|
||||
Reference in New Issue
Block a user