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

    Function calculateStaminaRecovery

    • Calculate stamina regeneration rate based on age and fat mass.

      Korean: 체력 회복 속도 (Stamina Recovery Rate)

      Computes stamina recovery speed based on age (optimal 25-35) and fat mass (lower is better for recovery). Younger fighters and leaner builds recover faster.

      Formula: baseRate * ageFactor * fatFactor

      • Age factor peaks at 30 years (1.0), decreases before and after
      • Fat factor = 1.0 - (fatMass - 10) / 50

      Parameters

      • physical: PhysicalAttributes

        Physical attributes of the fighter

      • baseRate: number = 10

        Base recovery rate (default: 10 per second)

      Returns number

      Modified stamina recovery rate

      const amsaljaRecovery = calculateStaminaRecovery(AMSALJA_PHYSICAL);
      // Age 28, fat 9kg: ~10.2 per second

      const jojikRecovery = calculateStaminaRecovery(JOJIK_PHYSICAL);
      // Age 36, fat 18kg: ~8.4 per second (slower)

      체력회복계산