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

    Function calculateFacialDamage

    • Calculate facial damage from hit

      Updates facial damage state based on hit location and damage amount. Different facial regions accumulate damage independently.

      Parameters

      • currentDamage: FacialDamageState

        Current facial damage state

      • hitLocation: string

        Location of hit on face ("left_eye", "right_eye", "mouth", "nose", etc.)

      • damageAmount: number

        Amount of damage dealt (0-100)

      Returns FacialDamageState

      Updated facial damage state

      const damage = calculateFacialDamage(
      DEFAULT_FACIAL_DAMAGE,
      "left_eye",
      25
      );
      // Returns damage state with left eye swelling increased

      얼굴손상계산