Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.7.0
    Preparing search index...

    Class InjuryMovementModifier

    Injury-Based Movement Modifier System.

    Korean: 손상 기반 이동 수정자 시스템

    Calculates dynamic movement speed based on injuries, stance, and pain. Integrates with MovementPhysics to apply realistic combat trauma effects.

    const modifier = new InjuryMovementModifier();

    const result = modifier.calculateMovementSpeed(
    5.0, // base speed
    bodyPartHealth, // current health
    TrigramStance.GEON, // current stance
    65 // pain level
    );

    console.log(`Speed: ${result.finalSpeed} m/s`);
    console.log(`Status: ${result.statusText.korean} | ${result.statusText.english}`);

    손상기반이동수정자

    Index

    Constructors

    Methods

    • Private

      Checks if both legs are significantly injured (>30% penalty each). Uses epsilon-based comparison for floating-point robustness.

      Parameters

      • leftLegPenalty: number

        Penalty for left leg (0-1)

      • rightLegPenalty: number

        Penalty for right leg (0-1)

      Returns boolean

      True if both legs are significantly injured

    • Private

      Calculate movement penalty from leg injury severity.

      Korean: 다리 부상 페널티 계산

      Progressive penalty scaling:

      • 100-70%: No penalty (0%)
      • 70-30%: Linear scaling (0-40%)
      • 30-10%: Accelerated scaling (40-80%)
      • 10-0%: Critical scaling (80-100%)

      Parameters

      • legHealth: number

        Leg health (0-100)

      Returns number

      Penalty factor (0.0-1.0), clamped to valid range

    • Calculate modified movement speed based on all injury factors.

      Korean: 이동 속도 계산

      Applies penalties from:

      1. Leg injuries (primary factor)
      2. Torso injuries (minor factor)
      3. Both legs injured (cumulative penalty)
      4. Stance modifiers
      5. Pain overload

      Parameters

      • baseSpeed: number

        Base movement speed (m/s)

      • bodyPartHealth: BodyPartHealth

        Current body part health values

      • stance: TrigramStance

        Current trigram stance

      • painLevel: number

        Current pain level (0-100)

      Returns InjuryMovementResult

      Complete movement calculation result

      이동속도계산

    • Private

      Generate bilingual status text based on injury state.

      Korean: 상태 텍스트 생성

      Parameters

      • legHealthForStatus: number

        Leg health percentage used for status determination (typically worst leg)

      • bothLegsInjured: boolean

        Whether both legs are significantly injured

      • painOverload: boolean

        Whether pain is over threshold

      Returns { english: string; korean: string }

      Bilingual status text

    • Get current injury state description.

      Korean: 부상 상태 설명

      Uses worst leg health to match movement penalty behavior.

      Parameters

      Returns { english: string; korean: string }

      Bilingual injury description

    Properties

    BOTH_LEGS_THRESHOLD: number = ...

    Threshold for determining if both legs are significantly injured. Uses epsilon to avoid floating-point rounding issues at boundary.