[Skill #049] [SOR] Lightning (1.13c Parity) #203

Closed
opened 2026-09-22 02:40:06 +00:00 by troytt · 2 comments
Owner

Diablo II: Lord of Destruction v1.13c Skill Parity Specification

Field Value
Skill ID 49 (#049)
Skill Name Lightning (skilldesc: lightning)
Class sor (Sorceress)
Required Level (reqlevel) 12
Prerequisites (reqskill1..3) Charged Bolt, -, -
Isolated Implementation Module src/game/skills/impl/sor/skill-049-lightning.ts
Isolated Vitest Suite tests/skills/sor/skill-049-lightning.test.ts

1. Authoritative 1.13c Skills.txt Function & Handler Dispatch

Function Slot 1.13c Value
srvstfunc (Server Start / Pre-Cast) -
srvdofunc (Server Action Frame 0x01/0x02) -
srvprgfunc1..3 (Progressive Charge Release) - / - / -
cltstfunc / cltdofunc (Client Start / Action) - / -
cltprgfunc1..3 (Client Progressive Release) - / - / -
passive / checkfunc passive=- / checkfunc=-
auraevent1 / auraeventfunc1 - / -

2. Associated Missiles, States, Auras, Curses & Summons

Subsystem 1.13c Configuration
Server Missiles (srvmissile / a..c) lightningbolt / a:-, b:-, c:-
Client Missiles (cltmissile / cltmissilea) lightningbolt / -
Aura / Buff States (aurastate / auratgtstate) self:- / tgt:-
Aura / Buff Stats (aurastat1..3) -, -, -
Passive State & Stats (passivestate / passivestat1..3) state:- / -, -, -
Curse Priority (cursetype) -
Summon / Pet (summon / pettype / petmax) mon:- / type:- / max:-

3. 1.13c Base Numerical & Synergy Formulas (Patch_D2.mpq)

  • Mana Cost: mana=16, lvlmana=1 (256-fixed-point << HitShift)
  • Physical / Elemental Damage: MinDam=-, MaxDam=-, EType=ltng, EMin=1, EMax=40, ELen=-
  • AST calc1..4: calc1=-, calc2=-, calc3=-, calc4=-
  • Synergy Calculations (blvl strictly base allocated STAT_SKILLPTS only):
    • EDmgSymPerCalc: (skill('Charged Bolt'.blvl)+skill('Chain Lightning'.blvl)+skill('Nova'.blvl))*par8
    • DmgSymPerCalc: -
    • ELenSymPerCalc: -

4. R3 Verification & Merge Checklist

  • Isolated Git Worktree: Created via git worktree add ../wt-skill-49 -b feat/skill-49 from main.
  • 1.13c Implementation: src/game/skills/impl/sor/skill-049-lightning.ts implements exact 1.13c srvstfunc/srvdofunc/srvprgfunc & numerical evaluation.
  • Automated Unit & Numerical Tests (slvl 1, 10, 20 + blvl Synergies): tests/skills/sor/skill-049-lightning.test.ts passes 100% in Vitest verifying ManaCost, MinDmg, MaxDmg, ToHit, Duration, Radius, synergy scaling, and runtime combat/missile/state/summon effect.
  • Real-Browser Casting & Screenshot: Executed in headless Chromium (acts.html?arena=1&class=sor&skill=49&slvl=20&autocast=1) with zero console/page errors and PNG screenshot attached to this Issue.
  • Merge & Cleanup: Merged to main with fixes #<issue_number>, pushed to origin/main, verified Issue is closed, and removed worktree ../wt-skill-49 + branch feat/skill-49.
## Diablo II: Lord of Destruction v1.13c Skill Parity Specification | Field | Value | |---|---| | **Skill ID** | `49` (`#049`) | | **Skill Name** | **Lightning** (`skilldesc: lightning`) | | **Class** | `sor` (Sorceress) | | **Required Level (`reqlevel`)** | `12` | | **Prerequisites (`reqskill1..3`)** | `Charged Bolt`, `-`, `-` | | **Isolated Implementation Module** | `src/game/skills/impl/sor/skill-049-lightning.ts` | | **Isolated Vitest Suite** | `tests/skills/sor/skill-049-lightning.test.ts` | --- ### 1. Authoritative 1.13c `Skills.txt` Function & Handler Dispatch | Function Slot | 1.13c Value | |---|---| | **`srvstfunc`** (Server Start / Pre-Cast) | `-` | | **`srvdofunc`** (Server Action Frame `0x01`/`0x02`) | `-` | | **`srvprgfunc1..3`** (Progressive Charge Release) | `-` / `-` / `-` | | **`cltstfunc` / `cltdofunc`** (Client Start / Action) | `-` / `-` | | **`cltprgfunc1..3`** (Client Progressive Release) | `-` / `-` / `-` | | **`passive` / `checkfunc`** | `passive=-` / `checkfunc=-` | | **`auraevent1` / `auraeventfunc1`** | `-` / `-` | ### 2. Associated Missiles, States, Auras, Curses & Summons | Subsystem | 1.13c Configuration | |---|---| | **Server Missiles (`srvmissile` / `a..c`)** | `lightningbolt` / `a:-`, `b:-`, `c:-` | | **Client Missiles (`cltmissile` / `cltmissilea`)** | `lightningbolt` / `-` | | **Aura / Buff States (`aurastate` / `auratgtstate`)** | `self:-` / `tgt:-` | | **Aura / Buff Stats (`aurastat1..3`)** | `-`, `-`, `-` | | **Passive State & Stats (`passivestate` / `passivestat1..3`)** | `state:-` / `-`, `-`, `-` | | **Curse Priority (`cursetype`)** | `-` | | **Summon / Pet (`summon` / `pettype` / `petmax`)** | `mon:-` / `type:-` / `max:-` | ### 3. 1.13c Base Numerical & Synergy Formulas (`Patch_D2.mpq`) - **Mana Cost**: `mana=16`, `lvlmana=1` (256-fixed-point `<< HitShift`) - **Physical / Elemental Damage**: `MinDam=-`, `MaxDam=-`, `EType=ltng`, `EMin=1`, `EMax=40`, `ELen=-` - **AST `calc1..4`**: `calc1=-`, `calc2=-`, `calc3=-`, `calc4=-` - **Synergy Calculations (`blvl` strictly base allocated `STAT_SKILLPTS` only)**: - `EDmgSymPerCalc`: `(skill('Charged Bolt'.blvl)+skill('Chain Lightning'.blvl)+skill('Nova'.blvl))*par8` - `DmgSymPerCalc`: `-` - `ELenSymPerCalc`: `-` --- ### 4. R3 Verification & Merge Checklist - [ ] **Isolated Git Worktree**: Created via `git worktree add ../wt-skill-49 -b feat/skill-49` from `main`. - [ ] **1.13c Implementation**: `src/game/skills/impl/sor/skill-049-lightning.ts` implements exact 1.13c `srvstfunc`/`srvdofunc`/`srvprgfunc` & numerical evaluation. - [ ] **Automated Unit & Numerical Tests (`slvl` 1, 10, 20 + `blvl` Synergies)**: `tests/skills/sor/skill-049-lightning.test.ts` passes 100% in Vitest verifying `ManaCost`, `MinDmg`, `MaxDmg`, `ToHit`, `Duration`, `Radius`, synergy scaling, and runtime combat/missile/state/summon effect. - [ ] **Real-Browser Casting & Screenshot**: Executed in headless Chromium (`acts.html?arena=1&class=sor&skill=49&slvl=20&autocast=1`) with zero console/page errors and PNG screenshot attached to this Issue. - [ ] **Merge & Cleanup**: Merged to `main` with `fixes #<issue_number>`, pushed to `origin/main`, verified Issue is `closed`, and removed worktree `../wt-skill-49` + branch `feat/skill-49`.
troytt added this to the All Player Skills (v1.13c Parity) milestone 2026-09-22 02:40:06 +00:00
Author
Owner

✅ Completed: [Skill #049] Lightning (SOR) — 1.13c Parity Verified

1. Isolated Worktree & Module Implementation

  • Worktree & Branch: ../wt-skill-049 (feat/skill-049)
  • Skill Module: src/game/skills/impl/sor/skill-049-lightning.ts
  • Vitest Suite: tests/skills/sor/skill-049-lightning.test.ts
  • 1.13c Dispatch: srvstfunc=0, srvdofunc=0, missile=lightningbolt, state=none, summon=none

2. 1.13c Numerical & Synergy Verification Table

Metric slvl = 1 slvl = 10 slvl = 20 (0 Syn) slvl = 20 (+20 blvl Syn)
Mana Cost (usmc) 8 (2048) 12 (3200) 17 (4480) 17 (4480)
Phys Dmg (Min-Max) 0-0 0-0 0-0 0-0
Elem Dmg (Min-Max) 1-40 (ltng) 1-120 (ltng) 1-272 (ltng) 2-707 (+160%)
AR % / Duration / Radius +0% / 0f / 10 +0% / 0f / 190 +0% / 0f / 390 +0% / 0f / 390

3. Headless Chromium (chromium-1228) Runtime Telemetry & Screenshot

  • Arena State: ready=true, classCode=sor (so), castCount=1, anim=SQ:7, totalDamageDealt=137, consoleErrors=0
  • Captured PNG Size: 588741 bytes

Skill #049 Lightning

### ✅ Completed: [Skill #049] Lightning (`SOR`) — 1.13c Parity Verified #### 1. Isolated Worktree & Module Implementation - **Worktree & Branch**: `../wt-skill-049` (`feat/skill-049`) - **Skill Module**: `src/game/skills/impl/sor/skill-049-lightning.ts` - **Vitest Suite**: `tests/skills/sor/skill-049-lightning.test.ts` - **1.13c Dispatch**: `srvstfunc=0`, `srvdofunc=0`, `missile=lightningbolt`, `state=none`, `summon=none` #### 2. 1.13c Numerical & Synergy Verification Table | Metric | `slvl = 1` | `slvl = 10` | `slvl = 20` (0 Syn) | `slvl = 20` (+20 `blvl` Syn) | | :--- | :---: | :---: | :---: | :---: | | **Mana Cost (`usmc`)** | `8` (`2048`) | `12` (`3200`) | `17` (`4480`) | `17` (`4480`) | | **Phys Dmg (`Min-Max`)** | `0-0` | `0-0` | `0-0` | `0-0` | | **Elem Dmg (`Min-Max`)** | `1-40` (`ltng`) | `1-120` (`ltng`) | `1-272` (`ltng`) | `2-707` (+160%) | | **AR % / Duration / Radius** | `+0%` / `0f` / `10` | `+0%` / `0f` / `190` | `+0%` / `0f` / `390` | `+0%` / `0f` / `390` | #### 3. Headless Chromium (`chromium-1228`) Runtime Telemetry & Screenshot - **Arena State**: `ready=true`, `classCode=sor` (`so`), `castCount=1`, `anim=SQ:7`, `totalDamageDealt=137`, `consoleErrors=0` - **Captured PNG Size**: `588741` bytes ![Skill #049 Lightning](https://git.projectdiablo2.cn/attachments/9021763e-d06b-43cd-a782-9d4c7985a1d2)
Author
Owner

⚡ Milestone M2 Update: 1.13c Runtime Missile & Scene Integration Verified

  • Branch & Commit: Merged to main (commit 6fefc68)
  • Runtime Integration: Fully integrated in src/game/engine/missile-engine.ts, src/game/skills.ts, and src/scene/act-scene.ts
  • 1.13c Ground Truth Invariants:
    • Infinite penetration piercing beam (lightningbolt)
    • Authentic speed 30 px/tick (750 px/s) and 25-frame lifetime
    • Sub-stepping wall & obstacle collision clipping at 8 px intervals
    • Exact 5-band piecewise formula: 1-40 base, +8/+12/+20/+28/+36 scaling, +8% synergies from Charged Bolt, Nova, Chain Lightning
    • 0-frame cooldown, light_cast_1 overlay attachment
  • Vitest Suite: tests/skills/sor/skill-049-lightning.test.ts (20/20 passing across 7 dimensions)
  • Verification Status: Full repository test suite passing (4,140 passed, 0 failed, 0 type errors)
### ⚡ Milestone M2 Update: 1.13c Runtime Missile & Scene Integration Verified - **Branch & Commit**: Merged to `main` (commit `6fefc68`) - **Runtime Integration**: Fully integrated in `src/game/engine/missile-engine.ts`, `src/game/skills.ts`, and `src/scene/act-scene.ts` - **1.13c Ground Truth Invariants**: - Infinite penetration piercing beam (`lightningbolt`) - Authentic speed `30 px/tick` (`750 px/s`) and 25-frame lifetime - Sub-stepping wall & obstacle collision clipping at 8 px intervals - Exact 5-band piecewise formula: `1-40` base, `+8/+12/+20/+28/+36` scaling, `+8%` synergies from Charged Bolt, Nova, Chain Lightning - 0-frame cooldown, `light_cast_1` overlay attachment - **Vitest Suite**: `tests/skills/sor/skill-049-lightning.test.ts` (20/20 passing across 7 dimensions) - **Verification Status**: Full repository test suite passing (`4,140 passed`, `0 failed`, `0 type errors`)
Sign in to join this conversation.
No Label
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#203
No description provided.