Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | 156x 156x 66x 90x 90x 2x 88x 3x 85x 34x 86x 86x | /**
* Type definitions for trigram types
* Auto-generated by type migration script
*/
// Trigram system imports from shared types
import { TrigramStance } from "../../types/common";
import {
KOREAN_COLORS,
type KoreanText,
type PlayerArchetype,
} from "../../types";
import { EffectType } from "../effects";
/**
* Stance laterality representing which foot/side is forward.
*
* **Korean**: 자세 측면성
*
* In authentic Korean martial arts (태권도, 합기도, 택견), stances have
* distinct left and right configurations:
* - **왼발서기 (Oenbal Seogi)**: Left foot forward, left guard high
* - **오른발서기 (Oreun Bal Seogi)**: Right foot forward, right guard high
*
* @public
* @category Trigram System
* @korean 측면성
*/
export type StanceLaterality = "left" | "right";
/**
* Combined stance with laterality for complete stance specification.
*
* **Korean**: 측면 포함 자세
*
* Combines the trigram stance (8 types) with laterality (2 sides) to create
* 16 distinct stance configurations. Format: `{stance}_{laterality}`
*
* Examples:
* - "geon_left" - Heaven stance, left foot forward
* - "tae_right" - Lake stance, right foot forward
*
* @public
* @category Trigram System
* @korean 측면포함자세
*/
export type StanceWithSide = `${TrigramStance}_${StanceLaterality}`;
/**
* Parse a combined stance+laterality string into its components.
*
* **Korean**: 자세 측면 분리
*
* Takes a string in the format "stance_laterality" and returns the
* individual stance and laterality components.
*
* @param stanceWithSide - Combined stance string (e.g., "geon_left")
* @returns Object with stance and laterality, or null if invalid format
*
* @example
* ```typescript
* const result = parseStanceWithSide("geon_left");
* // { stance: "geon", laterality: "left" }
*
* const invalid = parseStanceWithSide("invalid");
* // null
* ```
*
* @public
* @category Trigram System
* @korean 자세측면분리
*/
export function parseStanceWithSide(
stanceWithSide: string
): { stance: TrigramStance; laterality: StanceLaterality } | null {
const parts = stanceWithSide.split("_");
if (parts.length !== 2) {
return null;
}
const [stancePart, lateralityPart] = parts;
// Validate stance
if (!Object.values(TrigramStance).includes(stancePart as TrigramStance)) {
return null;
}
// Validate laterality
if (lateralityPart !== "left" && lateralityPart !== "right") {
return null;
}
return {
stance: stancePart as TrigramStance,
laterality: lateralityPart as StanceLaterality,
};
}
/**
* Create a combined stance+laterality string.
*
* **Korean**: 자세 측면 결합
*
* Combines a trigram stance and laterality into a single string identifier.
*
* @param stance - Trigram stance
* @param laterality - Stance laterality
* @returns Combined string in format "stance_laterality"
*
* @example
* ```typescript
* const combined = combineStanceWithSide("geon", "left");
* // "geon_left"
* ```
*
* @public
* @category Trigram System
* @korean 자세측면결합
*/
export function combineStanceWithSide(
stance: TrigramStance,
laterality: StanceLaterality
): StanceWithSide {
return `${stance}_${laterality}` as StanceWithSide;
}
export interface TrigramTransitionCost {
readonly ki: number;
readonly stamina: number;
readonly timeMilliseconds: number;
}
export interface TrigramTransitionRule {
readonly from: TrigramStance;
readonly to: TrigramStance;
readonly cost: TrigramTransitionCost;
readonly effectiveness: number;
readonly conditions?: ReadonlyArray<{
type: "player_stat" | "archetype" | "active_effect";
stat?: "health" | "ki" | "stamina";
archetype?: PlayerArchetype;
effectType?: EffectType;
threshold?: number;
value?: boolean | string;
}>;
readonly description: KoreanText;
}
export interface TransitionMetrics {
readonly cost: TrigramTransitionCost;
readonly effectiveness: number;
readonly risk: number;
readonly stamina: number;
readonly timeMilliseconds: number;
}
export interface TransitionPath {
readonly path: readonly TrigramStance[];
readonly totalCost: TrigramTransitionCost;
readonly effectiveness: number;
readonly name: string;
readonly description: KoreanText;
}
export interface TrigramTheme {
readonly primary: number;
readonly secondary: number;
readonly active: number;
readonly hover: number;
readonly text: number;
}
export interface TrigramData {
readonly id: TrigramStance;
readonly korean: string;
readonly english: string;
readonly symbol: string;
readonly element: string;
readonly nature: "yin" | "yang";
readonly philosophy: KoreanText;
readonly combat: KoreanText;
readonly theme: TrigramTheme;
readonly name: KoreanText;
readonly defensiveBonus: number;
readonly kiFlowModifier: number;
readonly techniques: {
readonly primary: {
readonly korean: string;
readonly english: string;
readonly damage: number;
readonly kiCost: number;
readonly staminaCost: number;
readonly hitChance: number;
readonly criticalChance: number;
readonly description: KoreanText;
readonly targetAreas: readonly string[];
readonly effects: readonly string[];
};
};
}
export interface StanceTransition {
readonly from: TrigramStance;
readonly to: TrigramStance;
readonly difficulty: number;
readonly time: number;
readonly kiCost: number;
readonly requirements?: string[];
}
export interface TrigramPhilosophy {
readonly trigram: TrigramStance;
readonly principle: KoreanText;
readonly application: KoreanText;
readonly strengthsAgainst: readonly TrigramStance[];
readonly weaknessesAgainst: readonly TrigramStance[];
}
export interface TrigramCombatStyle {
readonly trigram: TrigramStance;
readonly combatApproach: string;
readonly preferredRange: "close" | "medium" | "long";
readonly focusArea: "offense" | "defense" | "balance";
readonly keyCharacteristics: readonly string[];
}
// Minimal representations to avoid deep coupling to other systems
export interface TrigramTechniqueSummary {
readonly id: string;
readonly stance: TrigramStance;
readonly name?: KoreanText;
}
export interface TrigramPlayerContext {
readonly currentStance?: TrigramStance;
readonly ki?: number;
readonly stamina?: number;
}
export interface TrigramSystemInterface {
getTechniqueForStance: (
stance: TrigramStance,
archetype?: PlayerArchetype
) => TrigramTechniqueSummary | undefined;
calculateStanceEffectiveness: (
attackerStance: TrigramStance,
defenderStance: TrigramStance,
technique?: TrigramTechniqueSummary
) => number;
isValidTransition: (from: TrigramStance, to: TrigramStance) => boolean;
getTransitionCost: (
from: TrigramStance,
to: TrigramStance,
player?: TrigramPlayerContext
) => { ki: number; stamina: number; timeMs: number };
recommendStance: (
player: TrigramPlayerContext,
opponent?: TrigramPlayerContext
) => TrigramStance;
}
export interface TrigramSystem {
readonly getCurrentStance: (playerId: string) => TrigramStance;
readonly changeStance: (playerId: string, stance: TrigramStance) => boolean;
readonly getStanceEffectiveness: (
attacker: TrigramStance,
defender: TrigramStance
) => number;
}
// Ki flow factors with all required properties
export interface KiFlowFactors {
readonly playerLevelModifier: number;
readonly stanceAffinity: number;
readonly distance: number; // Added missing property
readonly elementalHarmony: number; // Added missing property
}
// Trigram effectiveness matrix
export interface TrigramEffectivenessMatrix {
readonly [attacker: string]: {
readonly [defender: string]: number;
};
}
// Trigram stance transition
export interface TrigramTransition {
readonly from: TrigramStance;
readonly to: TrigramStance;
readonly difficulty: number;
readonly kiCost: number;
readonly staminaCost: number;
readonly transitionTime: number;
}
// Archetype-trigram affinity
export interface ArchetypeTrigramAffinity {
readonly archetype: PlayerArchetype;
readonly preferredTrigrams: readonly TrigramStance[];
readonly bonusEffectiveness: Record<TrigramStance, number>;
readonly penaltyTrigrams: readonly TrigramStance[];
}
// Order of Trigrams for UI elements like wheels or selection lists
export const TRIGRAM_STANCES_ORDER: readonly TrigramStance[] = [
"geon" as TrigramStance,
"tae" as TrigramStance,
"li" as TrigramStance,
"jin" as TrigramStance,
"son" as TrigramStance,
"gam" as TrigramStance,
"gan" as TrigramStance,
"gon" as TrigramStance,
] as const;
export const TRIGRAM_DATA: Record<TrigramStance, TrigramStanceData> = {
[TrigramStance.GEON]: {
name: { korean: "건", english: "Heaven" },
symbol: "☰",
element: "metal",
nature: "yang",
chinese: "天",
attribute: { korean: "강건", chinese: "剛健" },
meaning: { korean: "창조와 리더십", english: "Creation and Leadership" },
philosophy: { korean: "하늘", english: "Heaven" },
combat: { korean: "직접 공격", english: "Direct attack" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_GEON_PRIMARY,
secondary: KOREAN_COLORS.WHITE_SOLID,
},
defensiveBonus: 1.0,
kiFlowModifier: 1.0,
techniques: {
primary: {
korean: "천둥벽력",
english: "Thunder Strike",
damage: 15,
kiCost: 8,
staminaCost: 12,
hitChance: 0.85,
criticalChance: 0.12,
description: {
korean: "하늘의 힘으로 적을 타격한다",
english: "Strike the enemy with heavenly force",
},
targetAreas: ["torso", "head"],
effects: ["stun"],
},
},
},
[TrigramStance.TAE]: {
name: { korean: "태", english: "Lake" },
symbol: "☱",
element: "metal",
nature: "yin",
chinese: "澤",
attribute: { korean: "기쁨", chinese: "愉悅" },
meaning: { korean: "기쁨과 교류", english: "Joy and Exchange" },
philosophy: { korean: "호수", english: "Lake" },
combat: { korean: "유동적 적응", english: "Fluid adaptation" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_TAE_PRIMARY,
secondary: KOREAN_COLORS.UI_STEEL_GRAY,
},
defensiveBonus: 1.1,
kiFlowModifier: 1.2,
techniques: {
primary: {
korean: "유수연타",
english: "Flowing Strikes",
damage: 10,
kiCost: 5,
staminaCost: 8,
hitChance: 0.9,
criticalChance: 0.1,
description: {
korean: "물의 흐름처럼 연속적인 타격",
english: "Continuous strikes like flowing water",
},
targetAreas: ["torso", "arms"],
effects: ["knockback"],
},
},
},
[TrigramStance.LI]: {
name: { korean: "리", english: "Fire" },
symbol: "☲",
element: "metal",
nature: "yang",
chinese: "火",
attribute: { korean: "광명", chinese: "光明" },
meaning: { korean: "열정과 명료함", english: "Passion and Clarity" },
philosophy: { korean: "불", english: "Fire" },
combat: { korean: "접근 공격", english: "Close attack" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_LI_PRIMARY,
secondary: KOREAN_COLORS.ACCENT_RED,
},
defensiveBonus: 0.9,
kiFlowModifier: 1.1,
techniques: {
primary: {
korean: "화염베기",
english: "Flame Slash",
damage: 18,
kiCost: 9,
staminaCost: 11,
hitChance: 0.8,
criticalChance: 0.15,
description: {
korean: "불의 형상을 한 날카로운 베기",
english: "A sharp slash in the form of fire",
},
targetAreas: ["torso", "legs"],
effects: ["burn"],
},
},
},
[TrigramStance.JIN]: {
name: { korean: "진", english: "Thunder" },
symbol: "☳",
element: "metal",
nature: "yang",
chinese: "雷",
attribute: { korean: "진동", chinese: "震動" },
meaning: { korean: "움직임과 각성", english: "Movement and Awakening" },
philosophy: { korean: "천둥", english: "Thunder" },
combat: { korean: "돌진 공격", english: "Charge attack" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_JIN_PRIMARY,
secondary: KOREAN_COLORS.SECONDARY_YELLOW,
},
defensiveBonus: 0.8,
kiFlowModifier: 1.3,
techniques: {
primary: {
korean: "천둥의 박치기",
english: "Thunder Clap",
damage: 20,
kiCost: 10,
staminaCost: 15,
hitChance: 0.82,
criticalChance: 0.18,
description: {
korean: "천둥의 힘으로 적을 가격",
english: "Strike the enemy with the force of thunder",
},
targetAreas: ["head", "torso"],
effects: ["stun", "knockback"],
},
},
},
[TrigramStance.SON]: {
name: { korean: "손", english: "Wind" },
symbol: "☴",
element: "metal",
nature: "yin",
chinese: "風",
attribute: { korean: "손순", chinese: "巽順" },
meaning: { korean: "침투와 영향", english: "Penetration and Influence" },
philosophy: { korean: "바람", english: "Wind" },
combat: { korean: "회피 공격", english: "Evasive attack" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_SON_PRIMARY,
secondary: KOREAN_COLORS.POSITIVE_GREEN_DARK,
},
defensiveBonus: 1.2,
kiFlowModifier: 0.9,
techniques: {
primary: {
korean: "바람베기",
english: "Wind Cut",
damage: 12,
kiCost: 6,
staminaCost: 10,
hitChance: 0.88,
criticalChance: 0.14,
description: {
korean: "바람의 힘으로 적을 베어내다",
english: "Cut through the enemy with the power of wind",
},
targetAreas: ["torso", "arms"],
effects: ["bleed"],
},
},
},
[TrigramStance.GAM]: {
name: { korean: "감", english: "Water" },
symbol: "☵",
element: "metal",
nature: "yin",
chinese: "水",
attribute: { korean: "험난", chinese: "險難" },
meaning: { korean: "적응과 흐름", english: "Adaptation and Flow" },
philosophy: { korean: "물", english: "Water" },
combat: { korean: "유동 공격", english: "Flowing attack" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_GAM_PRIMARY,
secondary: KOREAN_COLORS.PRIMARY_BLUE_DARK,
},
defensiveBonus: 1.3,
kiFlowModifier: 1.1,
techniques: {
primary: {
korean: "수륙재해",
english: "Water Whip",
damage: 14,
kiCost: 7,
staminaCost: 9,
hitChance: 0.84,
criticalChance: 0.13,
description: {
korean: "물의 힘으로 적을 휘감아 타격",
english: "Strike the enemy by wrapping them with the power of water",
},
targetAreas: ["torso", "legs"],
effects: ["drown"],
},
},
},
[TrigramStance.GAN]: {
name: { korean: "간", english: "Mountain" },
symbol: "☶",
element: "metal",
nature: "yin",
chinese: "山",
attribute: { korean: "지정", chinese: "止靜" },
meaning: { korean: "안정과 명상", english: "Stability and Meditation" },
philosophy: { korean: "산", english: "Mountain" },
combat: { korean: "방어 자세", english: "Defensive stance" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_GAN_PRIMARY,
secondary: KOREAN_COLORS.UI_STEEL_GRAY_DARK,
},
defensiveBonus: 1.4,
kiFlowModifier: 0.8,
techniques: {
primary: {
korean: "산의 수호",
english: "Mountain Guard",
damage: 0,
kiCost: 10,
staminaCost: 15,
hitChance: 1.0,
criticalChance: 0.0,
description: {
korean: "산처럼 견고한 방어 자세",
english: "A defensive stance as solid as a mountain",
},
targetAreas: ["torso"],
effects: ["block"],
},
},
},
[TrigramStance.GON]: {
name: { korean: "곤", english: "Earth" },
symbol: "☷",
element: "metal",
nature: "yang",
chinese: "地",
attribute: { korean: "순종", chinese: "順從" },
meaning: { korean: "수용과 지지", english: "Receptiveness and Support" },
philosophy: { korean: "지구", english: "Earth" },
combat: { korean: "포용 공격", english: "Embracing attack" },
theme: {
primary: KOREAN_COLORS.TRIGRAM_GON_PRIMARY,
secondary: KOREAN_COLORS.SECONDARY_BROWN_DARK,
},
defensiveBonus: 1.1,
kiFlowModifier: 1.2,
techniques: {
primary: {
korean: "지구의 방패",
english: "Earth Shield",
damage: 0,
kiCost: 12,
staminaCost: 16,
hitChance: 1.0,
criticalChance: 0.0,
description: {
korean: "지구의 힘으로 적의 공격을 막다",
english: "Block the enemy's attack with the power of earth",
},
targetAreas: ["torso"],
effects: ["block"],
},
},
},
} as const;
/**
* Data structure for a Trigram stance containing philosophical,
* combat, and visual properties for the Eight Trigrams system.
* Includes Chinese characters, Korean/English names, attributes, and meanings.
*/
export interface TrigramStanceData {
readonly name: { korean: string; english: string };
readonly symbol: string;
readonly element: string;
readonly nature: "yin" | "yang";
readonly chinese: string; // Chinese character (天, 澤, etc.)
readonly attribute: { korean: string; chinese: string }; // Attribute (剛健, etc.)
readonly meaning: { korean: string; english: string }; // Core meaning
readonly philosophy: { korean: string; english: string };
readonly combat: { korean: string; english: string };
readonly theme: {
primary: number;
secondary: number;
};
readonly defensiveBonus: number;
readonly kiFlowModifier: number;
readonly techniques: {
primary: {
korean: string;
english: string;
damage: number;
kiCost: number;
staminaCost: number;
hitChance: number;
criticalChance: number;
description: { korean: string; english: string };
targetAreas: string[];
effects: string[];
};
};
}
|