All files / systems/trigram/techniques GamTechniques.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                                                                          31x                                                                                                                                                                                                                                                                                                                                                                                                             31x                                  
/**
 * ☵ 감 (GAM) - Water Stance Techniques
 * 수류반격 - Adaptive Flow (Hapkido Redirect & Counter)
 *
 * The Water stance (감괘) embodies adaptation and redirection.
 * Based on Hapkido (합기도) principles of using opponent's force
 * against them, flowing around attacks like water around rocks.
 *
 * Philosophy: "물처럼 흘러 적의 힘을 이용하라"
 *             Flow like water and use the enemy's force
 *
 * @module GamTechniques
 */
 
import type { KoreanTechnique } from "@/systems/vitalpoint";
import {
  CombatAttackType,
  DamageType,
  TrigramStance,
} from "../../../types/common";
import { AnimationType } from "../../animation/MartialArtsAnimationBuilder";
 
/**
 * GAM stance techniques - Water / Adaptive Flow
 * Hapkido redirect and counter techniques
 *
 * Technique characteristics:
 * - Counter-attack focus
 * - Force redirection
 * - Flowing defense-to-offense
 * - Throws using opponent's momentum
 *
 * Animation speeds are calibrated for flowing responses:
 * - Reactive: 1.1-1.2 (quick counters)
 * - Normal: 1.0 (standard redirects)
 * - Controlled: 0.9 (throwing techniques)
 */
export const GAM_TECHNIQUES: readonly KoreanTechnique[] = [
  // ============= Primary Technique =============
  {
    id: "gam_water_counter",
    name: {
      korean: "수류반격",
      english: "Water Counter",
      romanized: "suryu_bangyeok",
    },
    koreanName: "수류반격",
    englishName: "Water Counter",
    romanized: "suryu_bangyeok",
    description: {
      korean: "물의 흐름으로 적의 공격을 받아넘기는 반격",
      english: "Counter-attack that flows like water",
    },
    stance: TrigramStance.GAM,
    type: CombatAttackType.COUNTER_ATTACK,
    damageType: DamageType.BLUNT,
    damage: 32,
    kiCost: 20,
    staminaCost: 12,
    accuracy: 0.85,
    range: 0.9,
    executionTime: 600,
    recoveryTime: 900,
    critChance: 0.18,
    critMultiplier: 1.7,
    effects: [],
    // Animation: Flowing counter-attack
    animationType: AnimationType.COUNTER_STRIKE,
    animationSpeed: 1.1,
  },
 
  // ============= Throwing Techniques =============
  {
    id: "gam_redirect_throw",
    name: {
      korean: "유도던지기",
      english: "Redirect Throw",
      romanized: "yudo-deonjigi",
    },
    koreanName: "유도던지기",
    englishName: "Redirect Throw",
    romanized: "yudo-deonjigi",
    description: {
      korean: "합기도 방향전환으로 상대의 힘을 이용해 던짐",
      english: "Hapkido redirect using opponent's force for throw",
    },
    stance: TrigramStance.GAM,
    type: CombatAttackType.THROW,
    damageType: DamageType.BLUNT,
    damage: 30,
    kiCost: 18,
    staminaCost: 24,
    accuracy: 0.82,
    range: 1.0,
    executionTime: 850,
    recoveryTime: 1200,
    critChance: 0.16,
    critMultiplier: 1.8,
    effects: [],
    // Animation: Redirect throw motion
    animationType: AnimationType.THROW,
    animationSpeed: 0.9,
  },
  {
    id: "gam_hip_throw",
    name: {
      korean: "허리던지기",
      english: "Hip Throw",
      romanized: "heori-deonjigi",
    },
    koreanName: "허리던지기",
    englishName: "Hip Throw",
    romanized: "heori-deonjigi",
    description: {
      korean: "합기도 허리 던지기로 상대를 제압",
      english: "Hapkido hip throw for control",
    },
    stance: TrigramStance.GAM,
    type: CombatAttackType.THROW,
    damageType: DamageType.BLUNT,
    damage: 34,
    kiCost: 22,
    staminaCost: 28,
    accuracy: 0.8,
    range: 1.1,
    executionTime: 900,
    recoveryTime: 1300,
    critChance: 0.2,
    critMultiplier: 1.9,
    effects: [],
    // Animation: Hip throw motion
    animationType: AnimationType.THROW,
    animationSpeed: 0.85,
  },
 
  // ============= Blocking & Parry Techniques =============
  {
    id: "gam_flowing_block",
    name: {
      korean: "유수막기",
      english: "Flowing Block",
      romanized: "yusu-makgi",
    },
    koreanName: "유수막기",
    englishName: "Flowing Block",
    romanized: "yusu-makgi",
    description: {
      korean: "물의 흐름처럼 부드럽게 막고 반격",
      english: "Soft flowing block leading to counter",
    },
    stance: TrigramStance.GAM,
    type: CombatAttackType.BLOCK,
    damageType: DamageType.BLUNT,
    damage: 18,
    kiCost: 10,
    staminaCost: 15,
    accuracy: 0.92,
    range: 0.7,
    executionTime: 400,
    recoveryTime: 700,
    critChance: 0.08,
    critMultiplier: 1.3,
    effects: [],
    // Animation: Soft blocking motion
    animationType: AnimationType.BLOCK,
    animationSpeed: 1.0,
  },
  {
    id: "gam_circular_parry",
    name: {
      korean: "원형받기",
      english: "Circular Parry",
      romanized: "wonhyeong-batgi",
    },
    koreanName: "원형받기",
    englishName: "Circular Parry",
    romanized: "wonhyeong-batgi",
    description: {
      korean: "합기도 원형 움직임으로 공격을 무력화",
      english: "Hapkido circular motion neutralizing attack",
    },
    stance: TrigramStance.GAM,
    type: CombatAttackType.COUNTER_ATTACK,
    damageType: DamageType.PRESSURE,
    damage: 24,
    kiCost: 14,
    staminaCost: 18,
    accuracy: 0.88,
    range: 0.9,
    executionTime: 550,
    recoveryTime: 850,
    critChance: 0.12,
    critMultiplier: 1.5,
    effects: [],
    // Animation: Circular parry motion
    animationType: AnimationType.COUNTER_STRIKE,
    animationSpeed: 1.0,
  },
 
  // ============= Joint Control Counter =============
  {
    id: "gam_wrist_twist_counter",
    name: {
      korean: "손목비틀기반격",
      english: "Wrist Twist Counter",
      romanized: "sonmok-biteulgi-bangyeok",
    },
    koreanName: "손목비틀기반격",
    englishName: "Wrist Twist Counter",
    romanized: "sonmok-biteulgi-bangyeok",
    description: {
      korean: "공격을 받아 손목을 비틀어 반격",
      english: "Counter by catching and twisting wrist",
    },
    stance: TrigramStance.GAM,
    type: CombatAttackType.COUNTER_ATTACK,
    damageType: DamageType.JOINT,
    damage: 28,
    kiCost: 16,
    staminaCost: 20,
    accuracy: 0.86,
    range: 0.8,
    executionTime: 700,
    recoveryTime: 1000,
    critChance: 0.16,
    critMultiplier: 1.7,
    effects: [],
    // Animation: Wrist control transition
    animationType: AnimationType.WRIST_LOCK,
    animationSpeed: 1.0,
  },
] as const;
 
/**
 * Get GAM techniques count
 */
export const GAM_TECHNIQUE_COUNT = GAM_TECHNIQUES.length;
 
/**
 * Get GAM technique by ID
 */
export function getGamTechniqueById(id: string): KoreanTechnique | undefined {
  return GAM_TECHNIQUES.find((t) => t.id === id);
}
 
/**
 * Get all GAM techniques by attack type
 */
export function getGamTechniquesByType(
  type: CombatAttackType
): readonly KoreanTechnique[] {
  return GAM_TECHNIQUES.filter((t) => t.type === type);
}