← All scenarios
SC-009computeEffectTick

DoT effect: Poison status damage over time

Tests Effect with periodic tickAction. Poison ticks every N seconds dealing damage based on max HP. Verify (a) the library returns per-tick damage when given the tick number, (b) the snapshot policy works (default dynamic: poison damage changes if MaxHP changes mid-poison), (c) total damage over duration matches expected.

effectTicksDoTpercentMaxHPDamagedynamicSnapshot
Action
computeEffectTick
Compute tick #2 of effect poison
effectId
poison
atTick
2
context.mapType
pvp

Actors

Player
player · Lv50
defender
Primary stats
str
30
agi
30
vit
40
int
30
dex
30
luk
10
demihumanneutral 1mediumnormal
Active effects
  • poison
HP 3200 / 3200
Hard DEF 20
Hard MDEF 10
Expected output
From the scenario fixture. Numerical values marked as null are placeholders pending rAthena verification.
tickDamage: pending

First poison tick at tick=2. Verify formula evaluates against defender's current state (not snapshotted). Also test: a separate call with the same poison but with a Blessing buff active that raised VIT should yield a different MaxHP and therefore different tick damage — proves dynamic re-evaluation works.

Computed: EffectTickResult

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

Damage at tick 2
poisonpoisonmisc
Per-tick value; caller decides whether to apply.
1
Formula evaluation
D-015 tick pipeline
formula result1
after stacks1
floor + max(0)1

Stack-aware formulas (e.g. stacks * floor(maxHP * 0.005)) handle scaling themselves; the library does not auto-multiply.

Formula scope
Dynamic — read live from the carrier
maxHP3,200
currentHP3,200
maxSP0
currentSP0
baseLevel50
stacks1
atTick2
str30
agi30
vit40
int30
dex30
luk10