All files / systems/trigram/techniques GonTechniques.ts

33.33% Statements 2/6
100% Branches 0/0
0% Functions 0/4
50% Lines 2/4

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                                                                                        42x                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     42x                                      
/**
 * ☷ 곤 (GON) - Earth Stance Techniques
 * 대지포옹 - Grounding & Takedowns (Ssireum/Hapkido Throws)
 *
 * The Earth stance (곤괘) embodies grounding and powerful takedowns.
 * Based on Ssireum (씨름) traditional Korean wrestling and Hapkido throws,
 * connecting with the earth to uproot and control opponents.
 *
 * Philosophy: "대지와 하나되어 적을 쓰러뜨려라"
 *             Become one with the earth and bring down the enemy
 *
 * @module GonTechniques
 */
 
import type { ExtendedGonTechnique } from "../types/GonTechniqueExtensions";
import {
  CombatAttackType,
  DamageType,
  TrigramStance,
} from "../../../types/common";
import { AnimationType } from "../../animation";
 
/**
 * GON stance techniques - Earth / Grounding & Takedowns
 * Ssireum wrestling and Hapkido throws
 *
 * Technique characteristics:
 * - Powerful takedowns
 * - Ssireum wrestling throws
 * - Ground control techniques
 * - Heavy impact throws
 *
 * Animation speeds are calibrated for power and control:
 * - Setup: 0.8-0.9 (positioning for throw)
 * - Normal: 1.0 (standard grappling)
 * - Impact: 1.1 (explosive finish)
 *
 * Enhanced with Korean martial arts expert analysis:
 * - Authentic throw trajectories from Ssireum/Hapkido
 * - Ground impact multipliers for realistic damage
 * - Post-throw control durations
 * - Earth's supportive healing philosophy
 * - Visual earth crack effects
 */
export const GON_TECHNIQUES: readonly ExtendedGonTechnique[] = [
  // ============= Primary Technique =============
  {
    id: "gon_earth_embrace",
    name: {
      korean: "대지포옹",
      english: "Earth Embrace",
      romanized: "daeji_poong",
    },
    koreanName: "대지포옹",
    englishName: "Earth Embrace",
    romanized: "daeji_poong",
    description: {
      korean: "대지의 힘으로 상대를 제압하는 기술",
      english: "Grappling technique using earth's power",
    },
    stance: TrigramStance.GON,
    type: CombatAttackType.GRAPPLE,
    damageType: DamageType.BLUNT,
    damage: 26,
    kiCost: 16,
    staminaCost: 22,
    accuracy: 0.72,
    reachConfig: {
      bodyPart: "arm",
      techniqueType: "punch",
      baseExtension: 0.9,
    },
    executionTime: 1260,
    recoveryTime: 1819,
    critChance: 0.08,
    critMultiplier: 1.4,
    effects: [],
    // Combo metadata - Clinch control setup
    comboWindow: 230,
    comboPriority: 1, // Starter - establishes grappling position
    pressureStacks: 2,
    // NEW ARCHITECTURE: Separate type (category) from ID (unique)
    animationCategory: "grapple", // Type: shared category
    animationId: "gon_earth_embrace", // ID: unique 1-1 mapping
    // Legacy field for backward compatibility
    // Animation: Clinch grapple position
    animationType: AnimationType.GON_EARTH_EMBRACE,
    animationSpeed: 0.7,
    category: "medium",
    range: "short",
    speed: 0.9,
 
    // ============= GON ENHANCEMENTS (Korean Martial Arts Expert Analysis) =============
    // 앞무릎치기 (Ap-mureup-chigi) - Front Knee Push clinch control
    throwTrajectory: "clinch_control", // Setup position, not a throw itself
    groundImpactMultiplier: 1.0, // No impact (control only)
    controlDuration: 1500, // 1.5 seconds of grip control
    supportiveHealing: 2, // Minor Ki recovery from grounding connection
    earthCrackEffect: false, // Visual effect not needed for control
    gripStrength: 0.85, // Strong clinch grip
  },
 
  // ============= Leg Techniques =============
  {
    id: "gon_leg_sweep",
    name: {
      korean: "다리걸기",
      english: "Leg Sweep",
      romanized: "dari-geolgi",
    },
    koreanName: "다리걸기",
    englishName: "Leg Sweep",
    romanized: "dari-geolgi",
    description: {
      korean: "상대의 다리를 걸어 넘어뜨리는 기술",
      english: "Sweeping opponent's leg for takedown",
    },
    stance: TrigramStance.GON,
    type: CombatAttackType.KICK,
    damageType: DamageType.BLUNT,
    damage: 22,
    kiCost: 12,
    staminaCost: 18,
    accuracy: 0.8,
    reachConfig: {
      bodyPart: "leg",
      techniqueType: "kick",
      baseExtension: 0.95,
    },
    executionTime: 909,
    recoveryTime: 1330,
    critChance: 0.12,
    critMultiplier: 1.5,
    effects: [],
    // Combo metadata - Sweeping takedown
    comboWindow: 230,
    comboPriority: 2, // Mid-chain - destabilizing sweep
    pressureStacks: 2,
    // NEW ARCHITECTURE: Separate type (category) from ID (unique)
    animationCategory: "sweep", // Type: shared category
    animationId: "gon_leg_sweep", // ID: unique 1-1 mapping
    // Legacy field for backward compatibility
    // Animation: Reaping leg sweep
    animationType: AnimationType.GON_LEG_SWEEP,
    animationSpeed: 0.75,
    category: "medium",
    range: "medium",
    speed: 1.0,
 
    // ============= GON ENHANCEMENTS =============
    // 안다리걸기 (An-dari-geolgi) - Inner Leg Reap
    throwTrajectory: "horizontal_sweep", // Low sweeping arc
    groundImpactMultiplier: 1.3, // Medium impact from horizontal fall
    controlDuration: 1200, // 1.2 seconds post-sweep advantage
    supportiveHealing: 3, // Earth connection during sweep motion
    earthCrackEffect: true, // Ground sweep creates dust/crack visual
    sweepDirection: "inward", // 안(an) = inner reap direction
    takedownType: "leg_reap", // 걸기(geolgi) specific classification
  },
  {
    id: "gon_ankle_pick",
    name: {
      korean: "발목잡기",
      english: "Ankle Pick",
      romanized: "balmok-japgi",
    },
    koreanName: "발목잡기",
    englishName: "Ankle Pick",
    romanized: "balmok-japgi",
    description: {
      korean: "발목을 잡아 상대를 넘어뜨리는 기술",
      english: "Grabbing ankle to take opponent down",
    },
    stance: TrigramStance.GON,
    type: CombatAttackType.GRAPPLE,
    damageType: DamageType.BLUNT,
    damage: 24,
    kiCost: 14,
    staminaCost: 20,
    accuracy: 0.82,
    reachConfig: {
      bodyPart: "arm",
      techniqueType: "punch",
      baseExtension: 0.9,
    },
    executionTime: 979,
    recoveryTime: 1400,
    critChance: 0.14,
    critMultiplier: 1.6,
    effects: [],
    // Combo metadata - Low level grappling
    comboWindow: 230,
    comboPriority: 1, // Starter - ankle control setup
    pressureStacks: 2,
    // NEW ARCHITECTURE: Separate type (category) from ID (unique)
    animationCategory: "sweep", // Type: shared category
    animationId: "gon_ankle_pick", // ID: unique 1-1 mapping
    // Legacy field for backward compatibility
    // Animation: Low shooting motion
    animationType: AnimationType.GRAPPLE,
    animationSpeed: 0.75,
    category: "medium",
    range: "short",
    speed: 1.1,
 
    // ============= GON ENHANCEMENTS =============
    // 발목당기기 (Balmok Danggigi) - Ankle Pull
    throwTrajectory: "forward_drive", // Drive forward while pulling ankle
    groundImpactMultiplier: 1.4, // Face-first fall = higher impact
    controlDuration: 1000, // 1 second of ankle control
    supportiveHealing: 4, // Strong earth connection (low stance)
    earthCrackEffect: true, // Driving motion creates ground effect
    penetrationDepth: "low", // Very low shooting entry
    setupSpeed: "fast", // Quick level change execution
  },
 
  // ============= Ssireum Throwing Techniques =============
  {
    id: "gon_ssireum_throw",
    name: {
      korean: "씨름던지기",
      english: "Ssireum Throw",
      romanized: "ssireum-deonjigi",
    },
    koreanName: "씨름던지기",
    englishName: "Ssireum Throw",
    romanized: "ssireum-deonjigi",
    description: {
      korean: "한국 전통 씨름의 던지기 기술",
      english: "Traditional Korean wrestling throw",
    },
    stance: TrigramStance.GON,
    type: CombatAttackType.THROW,
    damageType: DamageType.IMPACT,
    damage: 32,
    kiCost: 20,
    staminaCost: 28,
    accuracy: 0.82,
    reachConfig: {
      bodyPart: "arm",
      techniqueType: "punch",
      baseExtension: 0.7,
    },
    executionTime: 1190,
    recoveryTime: 1750,
    critChance: 0.24,
    critMultiplier: 2.1,
    effects: [],
    // Combo metadata - Traditional wrestling throw
    comboWindow: 230,
    comboPriority: 3, // Finisher - ssireum slam
    pressureStacks: 4,
    // NEW ARCHITECTURE: Separate type (category) from ID (unique)
    animationCategory: "throw", // Type: shared category
    animationId: "gon_ssireum_throw", // ID: unique 1-1 mapping
    // Legacy field for backward compatibility
    // Animation: Traditional belt throw
    animationType: AnimationType.THROW,
    animationSpeed: 0.7,
    category: "special",
    range: "short",
    speed: 0.9,
 
    // ============= GON ENHANCEMENTS =============
    // 샅바 메치기 (Satba Mechigi) - UNESCO Heritage Belt Throw
    throwTrajectory: "arc_over_hip", // Classical hip rotation throw
    groundImpactMultiplier: 1.7, // High impact from rotational velocity
    controlDuration: 1800, // 1.8 seconds of dominant position
    supportiveHealing: 5, // Maximum earth connection (traditional technique)
    earthCrackEffect: true, // Powerful traditional throw creates visual impact
    satbaGripRequired: true, // Uses traditional satba belt mechanics
    rotationalPower: "high", // Hip rotation generates force
    traditionalBonus: 1.15, // 15% damage bonus for cultural authenticity
    takedownType: "hip_throw", // Traditional hip throw classification
  },
  {
    id: "gon_ground_pound",
    name: {
      korean: "대지강타",
      english: "Ground Pound",
      romanized: "daeji-gangta",
    },
    koreanName: "대지강타",
    englishName: "Ground Pound",
    romanized: "daeji-gangta",
    description: {
      korean: "상대를 땅에 내리찍는 강력한 던지기",
      english: "Powerful throw slamming opponent to ground",
    },
    stance: TrigramStance.GON,
    type: CombatAttackType.THROW,
    damageType: DamageType.CRUSHING,
    damage: 36,
    kiCost: 24,
    staminaCost: 32,
    accuracy: 0.72,
    reachConfig: {
      bodyPart: "arm",
      techniqueType: "punch",
      baseExtension: 0.9,
    },
    executionTime: 1470,
    recoveryTime: 1959,
    critChance: 0.2,
    critMultiplier: 2.0,
    effects: [],
    // Combo metadata - Crushing throw finisher
    comboWindow: 230,
    comboPriority: 3, // Finisher - devastating slam
    pressureStacks: 4,
    // NEW ARCHITECTURE: Separate type (category) from ID (unique)
    animationCategory: "strike", // Type: shared category
    animationId: "gon_ground_pound", // ID: unique 1-1 mapping
    // Legacy field for backward compatibility
    // Animation: Slam throw
    animationType: AnimationType.SLAM, // Fixed: was wrongly set to GON_BODY_LOCK_TAKEDOWN
    animationSpeed: 0.75,
    category: "heavy",
    range: "short",
    speed: 1.0,
 
    // ============= GON ENHANCEMENTS =============
    // 들어올려 메치기 (Deureo-ollyeo Mechigi) - Lift and Slam
    throwTrajectory: "vertical_slam", // Straight down with maximum force
    groundImpactMultiplier: 2.0, // MAXIMUM impact (highest in game)
    controlDuration: 2000, // 2 seconds of complete dominance after slam
    supportiveHealing: 1, // Minimal healing (aggressive technique)
    earthCrackEffect: true, // DRAMATIC earth crack visual (signature move)
    liftHeight: "high", // Full body lift before slam
    stunChance: 0.4, // 40% chance to stun opponent from impact
    breathLoss: "severe", // Knocks wind out (respiratory effect)
    takedownType: "slam", // Slam technique classification
    endingPosition: "standing_dominant", // Attacker standing, opponent down
  },
  {
    id: "gon_body_lock_takedown",
    name: {
      korean: "몸통잡기넘어뜨리기",
      english: "Body Lock Takedown",
      romanized: "momtong-japgi-neomeotteurigi",
    },
    koreanName: "몸통잡기넘어뜨리기",
    englishName: "Body Lock Takedown",
    romanized: "momtong-japgi-neomeotteurigi",
    description: {
      korean: "몸통을 감싸 잡고 넘어뜨리는 씨름 기술",
      english: "Ssireum technique grabbing torso for takedown",
    },
    stance: TrigramStance.GON,
    type: CombatAttackType.GRAPPLE,
    damageType: DamageType.BLUNT,
    damage: 28,
    kiCost: 18,
    staminaCost: 24,
    accuracy: 0.78,
    reachConfig: {
      bodyPart: "arm",
      techniqueType: "punch",
      baseExtension: 0.9,
    },
    executionTime: 1120,
    recoveryTime: 1610,
    critChance: 0.16,
    critMultiplier: 1.7,
    effects: [],
    // Combo metadata - Body lock control
    comboWindow: 230,
    comboPriority: 2, // Mid-chain - torso control
    pressureStacks: 3,
    // NEW ARCHITECTURE: Separate type (category) from ID (unique)
    animationCategory: "takedown", // Type: shared category
    animationId: "gon_body_lock_takedown", // ID: unique 1-1 mapping
    // Legacy field for backward compatibility
    // Animation: Body lock clinch
    animationType: AnimationType.GRAPPLE, // Fixed: was wrongly set to GON_ANKLE_PICK
    animationSpeed: 0.7,
    category: "medium",
    range: "short",
    speed: 0.9,
 
    // ============= GON ENHANCEMENTS =============
    // 허리 감싸기 (Heori Gamssagi) - Waist Wrap / Bear Hug
    throwTrajectory: "circular_trip", // Circular motion while tripping legs
    groundImpactMultiplier: 1.5, // Solid impact from controlled throw
    controlDuration: 1600, // 1.6 seconds of body control advantage
    supportiveHealing: 3, // Moderate earth connection
    earthCrackEffect: true, // Medium impact creates ground effect
    takedownType: "body_lock", // Full torso encirclement
    breathRestriction: 0.3, // 30% breath restriction from compression
    gripStrength: 0.8, // Strong bear hug grip
  },
  {
    id: "gon_sacrifice_throw",
    name: {
      korean: "희생던지기",
      english: "Sacrifice Throw",
      romanized: "huisaeng-deonjigi",
    },
    koreanName: "희생던지기",
    englishName: "Sacrifice Throw",
    romanized: "huisaeng-deonjigi",
    description: {
      korean: "자신을 희생하여 상대를 크게 던지는 기술",
      english: "Sacrificing position to execute large throw",
    },
    stance: TrigramStance.GON,
    type: CombatAttackType.THROW,
    damageType: DamageType.BLUNT,
    damage: 34,
    kiCost: 22,
    staminaCost: 30,
    accuracy: 0.74,
    reachConfig: {
      bodyPart: "arm",
      techniqueType: "punch",
      baseExtension: 0.7,
    },
    executionTime: 1330,
    recoveryTime: 1889,
    critChance: 0.18,
    critMultiplier: 1.9,
    effects: [],
    // Combo metadata - Self-sacrificing throw
    comboWindow: 230,
    comboPriority: 3, // Finisher - high-risk high-reward throw
    pressureStacks: 4,
    // NEW ARCHITECTURE: Separate type (category) from ID (unique)
    animationCategory: "throw", // Type: shared category
    animationId: "gon_sacrifice_throw", // ID: unique 1-1 mapping
    // Legacy field for backward compatibility
    // Animation: Sacrifice throw motion
    animationType: AnimationType.GON_SACRIFICE_THROW,
    animationSpeed: 0.75,
    category: "medium",
    range: "short",
    speed: 1.0,
 
    // ============= GON ENHANCEMENTS =============
    // 몸 바치기 (Mom Bachigi) - Body Sacrifice Throw
    throwTrajectory: "sacrifice_arc", // Backwards fall + forward throw
    groundImpactMultiplier: 1.6, // High impact from momentum transfer
    controlDuration: 800, // Less control (you're also on ground)
    supportiveHealing: 6, // HIGH healing (earth embrace during fall)
    earthCrackEffect: true, // Double impact (both fighters hit ground)
    selfRisk: 0.2, // 20% chance of self-damage from sacrifice
    momentumTransfer: "high", // Uses falling momentum for throw
    endingPosition: "ground_mutual", // Both fighters on ground after
    transitionBonus: 0.3, // 30% bonus to follow-up ground techniques
    takedownType: "sacrifice", // Sacrifice throw classification
  },
] as const;
 
/**
 * Get GON techniques count
 */
export const GON_TECHNIQUE_COUNT = GON_TECHNIQUES.length;
 
/**
 * Get GON technique by ID
 */
export function getGonTechniqueById(
  id: string,
): ExtendedGonTechnique | undefined {
  return GON_TECHNIQUES.find((t) => t.id === id);
}
 
/**
 * Get all GON techniques by attack type
 */
export function getGonTechniquesByType(
  type: CombatAttackType,
): readonly ExtendedGonTechnique[] {
  return GON_TECHNIQUES.filter((t) => t.type === type);
}