Combat Mechanics

Revision as of 18:28, 11 July 2026 by Mike (talk | contribs) (Fixed math syntax)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Combat Mechanics, Leveling Dynamics, and Discrete Math

The combat architecture operates on calculated mathematical systems that govern experience distribution, server-side hit resolution, and damage mitigation.

Experience Distribution

Characters accumulate combat experience dynamically during battle, splitting the earned XP at a strict 75% to 25% ratio. The larger share (75%) goes directly to the active stance skill (such as Attack, Archery, Block, Evasion, or Warding), while the remaining 25% is funnelled into the passive Health pool. Each level gained in Health grants a flat +10 HP increase to the character's base life pool.

Combat experience is generated as a function of damage dealt, scaled by a linear Combat Multiplier that increases based on the monster's level:

TotalXP=Damage×CombatMultiplier TrainingXP=TotalXP×0.75

The Combat Multiplier scales with the target's level to ensure that high-tier combat encounters remain rewarding: CombatMultiplier=1+(MonsterLevel×0.01)

For example, fighting a level 50 monster yields a multiplier of 1.50 (a 50% experience bonus). This formula allows players to accurately project experience rates by using the monster's maximum HP as the damage value.

Hit Resolution

To resolve physical hits, the backend engine compares two independent, uniform random integer rolls:

AccuracyRoll[0,A] DefenceRoll[0,D]

A hit is registered strictly if AccuracyRoll>DefenceRoll. The upper limits for these ranges (A and D) scale dynamically based on active combat skills and equipped item stats:

A=(Lattack+8)×(EquippedAccuracy+32)

To analyze DPS probabilities and calculate expected values, the continuous approximation of the hit chance is structured as follows:

HitChance={1D2Aif ADA2Dif D>A

For discrete probability models requiring strict server-side accuracy, the exact roll-based hit chance probability is modeled as:

HitChance={1D+22(A+1)if A>DA2D+1if DA

Damage Mitigation & Shields

Damage calculations are further balanced by comparing the attacker's penetration rating against the defender's damage reduction score. The damage reduction score is computed as:

DamageReductionScore=Ldefence×EquipmentStat×PotionEffects

These calculations make matching shield types essential during combat. Standard shields are divided into three categories to counter specific enemy attack colors:

  • Block Shields (Red Damage) counter heavy physical attacks.
  • Parry Shields (Green Damage) deflect quick, agile attacks.
  • Warding Shields (Blue Damage) mitigate mystical or arcane attacks.