All files / blacktrigram/src/systems/vitalpoint KoreanVitalPoints.ts

84.37% Statements 135/160
100% Branches 0/0
0% Functions 0/6
84.37% Lines 135/160

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    1x           1x             1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x   1x           1x       1x             1x                 1x                           1x           1x  
// Korean vital points for Black Trigram (흑괘)
// Complete, culturally accurate, bilingual (Korean, English, Romanization)
import {
  TrigramStance,
  VitalPointCategory,
  VitalPointEffectType,
  VitalPointSeverity,
} from "../../types/common";
import { EffectIntensity } from "../effects";
import { VitalPoint } from "./types";
 
/**
 * Korean vital points (급소) definitions for authentic martial arts targeting
 */
 
export const KOREAN_VITAL_POINTS: readonly VitalPoint[] = [
  {
    id: "baekhoehoel",
    names: {
      korean: "백회혈",
      english: "Crown Point",
      romanized: "baekhoehoel",
    },
    position: { x: 0, y: -50 },
    category: VitalPointCategory.NEUROLOGICAL,
    severity: VitalPointSeverity.CRITICAL,
    baseDamage: 50,
    effects: [
      {
        id: "unconsciousness_effect",
        type: VitalPointEffectType.UNCONSCIOUSNESS,
        intensity: EffectIntensity.HIGH,
        duration: 5000,
        description: {
          korean: "의식 잃음",
          english: "Loss of consciousness",
        },
        stackable: false,
        source: "vital_point_system",
      },
    ],
    description: {
      korean: "머리 정수리의 중요 혈점",
      english: "Critical pressure point at crown of head",
    },
    targetingDifficulty: 0.9,
    effectiveStances: [TrigramStance.GEON, TrigramStance.LI, TrigramStance.JIN],
 
    // Backwards compatibility properties
    korean: { korean: "백회혈", english: "Crown Point" },
    english: "Crown Point",
    anatomicalName: "Anterior Fontanelle",
    radius: 15,
    damage: { min: 40, max: 60, average: 50 },
    difficulty: 0.9,
    requiredForce: 30,
    safetyWarning: "Extremely dangerous - can cause death",
  },
  {
    id: "inmyeong",
    names: {
      korean: "인영",
      english: "Man's Welcome",
      romanized: "inmyeong",
    },
    position: { x: -30, y: 70 },
    category: VitalPointCategory.VASCULAR,
    severity: VitalPointSeverity.MAJOR,
    baseDamage: 32,
    effects: [
      {
        id: "breathlessness_effect",
        type: VitalPointEffectType.BREATHLESSNESS,
        intensity: EffectIntensity.MEDIUM,
        duration: 3000,
        description: {
          korean: "호흡 곤란",
          english: "Breathing difficulty",
        },
        stackable: false,
        source: "vital_point_system",
      },
    ],
    description: {
      korean: "목 옆의 중요 혈관",
      english: "Critical blood vessel on side of neck",
    },
    targetingDifficulty: 0.7,
    effectiveStances: [TrigramStance.SON, TrigramStance.GAM, TrigramStance.TAE],
 
    // Backwards compatibility properties
    korean: { korean: "인영", english: "Man's Welcome" },
    english: "Man's Welcome",
    anatomicalName: "Carotid Artery",
    radius: 20,
    damage: { min: 25, max: 40, average: 32 },
    difficulty: 0.7,
    requiredForce: 20,
    safetyWarning: "Can cause unconsciousness",
  },
  {
    id: "myeongmun",
    names: {
      korean: "명문",
      english: "Gate of Life",
      romanized: "myeongmun",
    },
    position: { x: 0, y: 250 },
    category: VitalPointCategory.NEUROLOGICAL,
    severity: VitalPointSeverity.MAJOR,
    baseDamage: 40,
    effects: [
      {
        id: "severe_pain_effect",
        type: VitalPointEffectType.PAIN,
        intensity: EffectIntensity.HIGH,
        duration: 4000,
        description: {
          korean: "극심한 통증",
          english: "Severe pain",
        },
        stackable: false,
        source: "vital_point_system",
      },
    ],
    description: {
      korean: "등 아래쪽의 중요 혈점",
      english: "Critical point on lower back",
    },
    targetingDifficulty: 0.8,
    effectiveStances: [
      TrigramStance.GAN,
      TrigramStance.GON,
      TrigramStance.GEON,
    ],
 
    // Backwards compatibility properties
    korean: { korean: "명문", english: "Gate of Life" },
    english: "Gate of Life",
    anatomicalName: "L2-L3 Vertebrae",
    radius: 25,
    damage: { min: 30, max: 50, average: 40 },
    difficulty: 0.8,
    requiredForce: 25,
    safetyWarning: "Can cause temporary paralysis",
  },
] as const;
 
export const getVitalPointsByCategory = (
  category: VitalPointCategory
): VitalPoint[] => {
  return KOREAN_VITAL_POINTS.filter((vp) => vp.category === category);
};
 
export const getVitalPointsByRegion = (region: string): VitalPoint[] => {
  return KOREAN_VITAL_POINTS.filter((vp) => vp.region === region);
};
 
export const getVitalPointById = (id: string): VitalPoint | undefined => {
  return KOREAN_VITAL_POINTS.find((vp) => vp.id === id);
};
 
/**
 * Get vital points that are most effective with a specific trigram stance
 */
export const getVitalPointsByStance = (stance: TrigramStance): VitalPoint[] => {
  return KOREAN_VITAL_POINTS.filter((vp) =>
    vp.effectiveStances.includes(stance)
  );
};
 
/**
 * Get vital points by targeting difficulty range
 */
export const getVitalPointsByDifficulty = (
  minDifficulty: number,
  maxDifficulty: number
): VitalPoint[] => {
  return KOREAN_VITAL_POINTS.filter(
    (vp) =>
      vp.targetingDifficulty >= minDifficulty &&
      vp.targetingDifficulty <= maxDifficulty
  );
};
 
/**
 * Get vital points by severity level
 */
export const getVitalPointsBySeverity = (
  severity: VitalPointSeverity
): VitalPoint[] => {
  return KOREAN_VITAL_POINTS.filter((vp) => vp.severity === severity);
};
 
export default KOREAN_VITAL_POINTS;