Commit Graph

4 Commits

Author SHA1 Message Date
troytt 13b2a4c326 refactor(client): remove leftover single-player client code
Delete the 29 src/client files that were no longer reachable from
src/client/main.ts (launcher/play-entry, world/act-runtime, the SP scene
modules, sim/*, cull/roofs/unit-sprites/animation/char-appearance,
ground-labels, browser-mpq-source, and the dead barrels/re-export shims).

Strip the GameEngine coupling from the online HUD: HudManager no longer
binds/syncs an engine (bindEngine, syncFromEngine, switchClass,
classProfiles, grantExperience/takeDamage/heal, pickupGroundGold, ...) or
publishes window.__d2webHud/__d2webHudInstance; inventory/world-panels drop
_boundEngine; globes stop writing __d2webHud. world-renderer,
lighting-presets and ground-item-renderer keep only the online halves.

Remove demo-only exports from src/common and src/client
(DEFAULT_UNIVERSAL/SORCERESS_SKILLS, STARTER_EQUIPPED_GEAR/BAG_ITEMS,
DEFAULT_BELT_POTIONS, BeltModel.seedDefaultPotions,
createStarterProfileForClass, CLASS_DEFAULT_SKILLS). The data now lives in
tests/fixtures/demo-profile-data.ts. Tables re-exported by
src/server/world/class-starter-profiles.ts are kept.

Tests: retarget imports of re-exported helpers to their origin modules;
delete cases that only covered removed SP code; rewrite surviving
behavior against GameEngine / common data (p0-520, p0-521, p0-528,
starter-items, issue-503/506, class-switching, glacial-spike,
skill-quickbar-tooltip, monster-target-bar MonUMod). e2e-module-split now
targets src/client/main.ts instead of play-entry. Tools that imported
deleted modules are removed or trimmed (verify-renderer-lifecycle).
2026-10-01 06:03:55 +00:00
troytt 820ca12221 refactor: split into isolated common/netproto/server/client/baker modules
Split the mixed src/ and scripts/ trees into five compiler-enforced modules
aligned with the 1.13c DLL architecture, plus tools/:

- src/common/   (D2Common/Storm/D2Lang): formats, MPQ, data tables, DRLG,
                items/skills/units metadata, RNG, pack contracts. No DOM/Node.
- src/netproto/ (D2Net/Bnclient/D2MCPClient): BNCS/MCP/D2GS protocol; external
                code imports only src/netproto/index.ts.
- src/server/   (D2Game): authoritative simulation + LocalLoopbackAdapter.
                All 23 reverse deps into client removed; no Math.random /
                Date.now / performance.now.
- src/client/   (D2Client/D2Gfx/D2Win/D2Launch/D2Sound): render, UI, frontend,
                audio, session, toolbar and the play.html entry.
- src/baker/    Node-only offline packers/extractors + unified `npm run bake`.
- tools/        bot, replay, unlock, verify/audit/benchmark CLIs.

play.html is now the only HTML entry; index.html, acts*.html and bnet.html
plus legacy entry glue (src/main.ts, act-scene, net-scene, lockstep src/net)
are removed.

Adds tsconfig.{common,netproto,server,client,baker}.json wired into
`npm run typecheck`, and tests/arch/boundaries.test.ts enforcing the module
boundaries with zero whitelist exceptions.

Verification: typecheck 6/6 clean; vitest 556 files / 6640 tests pass;
npm run build clean; bake --verify (136/136 levels, universal DT1s);
netproto-replay --strict 0 unknown/opaque/errors; d2-bot walk hardSnaps=0;
audit-levels 136/136; verify-play 9/9 gates at 800x600 and 1024x768.
2026-10-01 00:10:18 +00:00
troytt d393a48043 feat(drop): embed MonStats and SuperUniques with 1.13c multi-diff TC parity (Fixes #410, #411)
- Pack and embed authentic 1.13c MonStats drop columns (734 kinds) with noRatio support
- Embed SuperUniques multi-difficulty TCs (66 unique bosses) and fail-fast loading
- Fix SuperUnique minion TC3 inheritance and minion monsterType identification
- Add adversarial drop parity audit and superunique minion test suites
- Update D2MOO oracle seed generator and Paladin skill tree parity
2026-09-25 13:44:35 +00:00
troytt 29a53233a8 fix(necro): remediate challenger findings for Poison & Bone spells
- Fix dagger classification in getAttackWeaponInfo: authentic 1.13c dagger 'Blade' (bld, knif) properly classified as dagger instead of sword
- Prevent runaway recursive sub-missile explosion cascade loops on piercing missiles (Bone Spear, Teeth, Bone Spirit)
- Fix Bone Spirit homing scalar speed doubling on non-horizontal angles (ensure scalar speed is invariant to homing angle)
- Ensure Poison Nova projectile TTL is exactly 50 frames per D2 1.13c standard
- Include adv-pnb-kinematics-stress.test.ts and adv-pnb-synergy-stress.test.ts stress test suites
2026-09-24 08:37:27 +00:00