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

    Function applyDamageToBodyParts

    • Apply damage to player's body parts based on hit location.

      Korean: 타격 위치 기반 신체부위 피해 적용

      Takes total damage and distributes it across body parts according to the hit location. Updates both aggregate health and body part health.

      For combat compatibility, the aggregate health is directly reduced by the damage amount (traditional behavior), while body part health is updated proportionally for visualization purposes.

      Type Parameters

      Parameters

      • player: T

        Player receiving damage

      • totalDamage: number

        Total damage amount

      • bodyRegion: BodyRegion

        Body region that was hit

      Returns T

      Updated player state with body part damage applied