← All scenarios
PHYS-004autoAttack

Damage floor clamp — tiny attacker vs over-armored target

Specifically constructs a case where (raw damage) - (hardDEF + softDEF) <= 0. The library must clamp to 1 (D-004 damage floor rule) and the outcome must remain 'hit', not 'immune'. This is the difference between 'hits do nothing' (still progresses certain mechanics) and 'attack misses entirely' (different game logic).

physicalDamagedamageFloorminDamageClamphighDEFTarget
Action
autoAttack
Auto-attack in expected mode
mode
expected
context.mapType
pve

Actors

Naked Novice
player · novice · Lv1
attacker
Primary stats
str
1
agi
1
vit
1
int
1
dex
1
luk
1
Equipment
  • mainhand: knife · dagger · ATK 17
Titanium Wall
monster · Lv95
defender
Primary stats
str
1
agi
1
vit
200
int
1
dex
1
luk
1
formlessneutral 1largeboss
HP 999999 / 999999
Hard DEF 500
Hard MDEF 500
Expected output
From the scenario fixture. Numerical values marked as null are placeholders pending rAthena verification.
hittotalDamage: 1

The attack lands (FLEE check passes given low FLEE), but DEF subtraction would yield a negative number. Library must clamp to 1. Outcome MUST be 'hit', not 'immune' or 'absorbed' — those are reserved for element interactions.

Show full expected JSON
{
  "breakdown": {
    "minDamageClamp": true,
    "preFloor": "negative or zero, exact value depends on formula",
    "hardDEFSubtracted_present": true,
    "softDEFSubtracted_present": true
  }
}

Computed: DamageResult

Server-evaluated by calculatePhysicalDamage() from @ro/core.

Outcome
hit
1 hit · 1 damage
1
Pipeline breakdown
D-003 steps 2–13
WeaponratioATK17
× size × skill8.5
× (1 + 0.0% ATK%)8.5
+ StatusATK (2)10.5
× 1.00 element10.5
× (1 + 0.0% race/elem/size/class)10.5
crit none10.5
− 0 hard DEF10.5
− 309 soft DEF-298.5
× (1 − 0.0% taken%)-298.5
+ MasteryATK (0)-298.5
floor + min(1)1
Inputs
From attacker / defender ResolvedStats
StatusATK2
WeaponATK17
EquipATK0
MasteryATK0
Size mult0.50×
Element mult1.00×
Race%0.0%
Element%0.0%
Size%0.0%
Class%0.0%
Taken%0.0%

Hits (1): hit 1