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

    Function applyCounterStanceDamage

    • Apply counter stance damage bonus when appropriate.

      This helper should be used by combat damage calculation code after it has determined whether the current stance matchup is a counter stance (for example, via an isCounterStance check elsewhere in the system).

      When isCounterStance is true, the base damage is multiplied by COUNTER_STANCE_DAMAGE_MULTIPLIER. Non-positive damage values are returned unchanged to avoid introducing invalid negative or zero scaling.

      Parameters

      • baseDamage: number

        The pre-modifier damage value.

      • isCounterStance: boolean

        Whether the attacker is using a counter stance.

      Returns number

      The adjusted damage value with counter stance bonus applied when relevant.

      const isCounter = trigramSystem.isCounterStance(attackerStance, defenderStance);
      const finalDamage = applyCounterStanceDamage(baseDamage, isCounter);

      반격 자세(상극 자세)일 때만 피해 배율(1.2배)을 적용합니다.