콘텐츠로 이동
GameDesign

HP 손실 / 데미지 흐름 작성완료구현밸런싱미완료

코드(PlayerHpLossCause) 기준 플레이어 HP가 감소하는 원인은 5종.

원인의미
MonsterAttack몬스터의 일반 공격 피해
MonsterGuardHit막기 실패 / 가드 붕괴로 인한 피해
Thirst갈증 누적으로 인한 HP DoT
Hunger허기 누적으로 인한 HP DoT
HpConsumption스킬·아이템 사용 시 HP 자기 소모

PlayerHpLossRecord에 사망 시 마지막 손실 원인이 기록되어 결과 팝업으로 전달된다.

flowchart TD
subgraph IN [입력]
  E[몬스터 공격]
  H{플레이어 상태}
end
subgraph DEFEND [방어 처리]
  P[패링 성공<br/>몬스터 그로기 · 피해 무효]
  B[막기 성공<br/>방어율 r · 스태미너 S 소모<br/>안정도로 S 경감]
  F[가드 붕괴<br/>D × k_break · 즉시 HP]
  A[방어구 감산 + 흡수율]
end
subgraph RESULT [결과]
  HP[HP · 강인함 감소]
  ST[자세 풀림]
  D[사망]
end

E --> H
H -->|패링 판정| P
H -->|막기 성공| B --> A
H -->|막기 실패| F
H -->|무방비| A
A --> HP
HP -->|강인함 0| ST
HP -->|HP 0| D

classDef input fill:#fed7aa,stroke:#ea580c,stroke-width:2px,color:#7c2d12
classDef decide fill:#e9d5ff,stroke:#9333ea,stroke-width:2.5px,color:#581c87
classDef parry fill:#bbf7d0,stroke:#16a34a,stroke-width:2.5px,color:#14532d
classDef block fill:#dbeafe,stroke:#3b82f6,stroke-width:2px,color:#1e3a8a
classDef fail fill:#fecaca,stroke:#dc2626,stroke-width:2.5px,color:#7f1d1d
classDef neutral fill:#f1f5f9,stroke:#64748b,stroke-width:2px,color:#0f172a
class E input
class H decide
class P parry
class B,A block
class F fail
class HP neutral
class ST input
class D fail
linkStyle 1 stroke:#16a34a,stroke-width:2.5px
linkStyle 2 stroke:#3b82f6,stroke-width:2.5px
linkStyle 4 stroke:#dc2626,stroke-width:2.5px

전투 진입 트리거는 몬스터의 시야·청각 인지에 의존한다. 인지/탐지 로직은 감지 시스템 문서로 분리한다.

  • 몬스터는 3단계 상태를 가진다 — 평온 / 의심 / 인지(전투).
  • 의심 전환 기준은 청각(소음 임계), 인지 전환 기준은 전방 시야 120도 + 거리.
  • 소음은 발소리·질주·무기 소리·물체 파손 등 행동에 종속.