Applies combat state modifiers to a player state.
Creates a modified player state with capability reductions based on current combat readiness.
Current player state
Combat readiness state to apply
Modified player state with applied modifiers
Checks if player can recover from HELPLESS state.
Recovery occurs after 5 seconds with no additional hits.
Current player state
Current timestamp
True if recovery is possible
PrivatecheckPrivateChecks if any body part has lost more than the specified percentage of health.
Current player state
Health loss threshold (0.0 to 1.0)
True if any body part has lost more than the threshold
PrivatecountPrivateCounts recent hits within a time window.
Current player state
Current timestamp (milliseconds)
Time window to check in milliseconds
Number of hits within the time window
Determines the current combat readiness state based on player condition.
Evaluates health, pain, consciousness, balance, and recent hits to determine the most appropriate combat state. State transitions follow acceptance criteria:
Current player state
OptionalcurrentTime: numberCurrent timestamp in milliseconds
Current combat readiness state
Updates player when entering HELPLESS state.
Records the timestamp for recovery tracking.
Current player state
Timestamp when entering helpless state
Updated player state
Gets the capability modifiers for a specific combat state.
Returns all modifiers that should be applied to player actions based on their current combat readiness.
Combat readiness state
Capability modifiers for the state
Gets emoji indicator for combat state.
Combat readiness state
Emoji representing the state
Gets bilingual name for combat state.
Combat readiness state
Korean and English state names
Records a hit on the player and updates recent hit tracking.
Should be called by combat system when player takes a hit. Maintains a rolling window of the last 10 hit timestamps.
Current player state
Timestamp of the hit
Updated player state with recorded hit
Private ReadonlystateState capability definitions with modifiers per state.
Based on acceptance criteria:
Combat State System managing readiness state transitions.
Evaluates player condition and determines current combat readiness state. States degrade based on:
Example
Korean
전투상태시스템