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

    Function calculateMovementSpeed

    • Calculate comprehensive movement speed with all injury modifiers.

      Korean: 종합 이동 속도 계산

      This is the recommended function for full integration with the new injury system. It applies all modifiers including leg injuries, torso damage, stance bonuses, and pain penalties.

      Uses the shared singleton instance to avoid allocations in per-frame loops.

      Parameters

      • baseSpeed: number

        Base movement speed (m/s)

      • bodyPartHealth: BodyPartHealth

        Current body part health

      • stance: TrigramStance

        Current trigram stance

      • painLevel: number

        Current pain level (0-100)

      Returns number

      Final calculated speed in m/s

      const finalSpeed = calculateMovementSpeed(
      5.0,
      playerBodyHealth,
      TrigramStance.GEON,
      65
      );

      // Use this speed to override MovementPhysics
      movementPhysics.setMaxSpeed(finalSpeed);

      종합이동속도계산