Commit Graph

154 Commits

Author SHA1 Message Date
troytt 3465c8052b fix(render): fail fast on missing missile sprite atlases without fallback art (#530)
Remove silent catch handlers, procedural drawSolid blocks, and borrowed
fireexplode fallbacks when loading or rendering missile sprite atlases.

TAG=agy
CONV=4e31689c-063a-4965-968b-59c0f5795f97
2026-09-29 21:01:50 +00:00
troytt 112c12808b fix(sim): enforce deterministic seeded RNG and tick-aligned simulation (#523)
Eliminate Math.random and wall-clock timers in simulation paths, queue DOM/UI
actions into tick-aligned engine commands, and roll monster death drops synchronously.

TAG=agy
CONV=4e31689c-063a-4965-968b-59c0f5795f97
2026-09-29 21:01:49 +00:00
troytt 995f594fe7 fix(net): enforce lockstep peerId authentication, bounds checks, and future-tick window (#518)
Bind peerId at the relay session layer, reject out-of-range peerIds and
out-of-window future ticks without leaking memory, and store N-peer inputs per tick.

TAG=agy
CONV=4e31689c-063a-4965-968b-59c0f5795f97
2026-09-29 21:01:47 +00:00
troytt 7bc21df07c fix(net): harden WebSocket relay frame validation and crash isolation (#517)
Enforce RFC 6455 framing checks, connection/room/rate limits, and per-socket
error isolation so malformed or truncated frames never crash the relay.

TAG=agy
CONV=4e31689c-063a-4965-968b-59c0f5795f97
2026-09-29 21:01:47 +00:00
troytt c2c1d280d5 fix(drlg): resolve M1 iteration 2 audit findings (animSpeed, crossActObjOf, strip-types, __d2Scene, D2Rng.int) 2026-09-29 10:29:42 +00:00
troytt 8ddfbd318a feat(drlg,rng): unify 64-bit D2Rng and 136-level 1:1 DRLG port (DRLG_ACT_VARIANTS=1, seed 0x5eed0100) 2026-09-29 09:24:58 +00:00
troytt 9077b5889d Merge branch 'feat/drlg-496-499' into main (Fixes #496, #497, #498, #499, #500, #501, #502) 2026-09-28 17:44:56 +00:00
troytt a241763f7c feat(drlg): integrate Acts 2-5 outdoor DRLG, remove legacy wilderness, and verify all 136 levels (#496, #497, #498, #499, #500, #501, #502) 2026-09-28 16:57:18 +00:00
troytt a05c97c438 fix(ui,tests): cover multi-color ÿc tooltip alignment, High-DPI HUD/label scaling, and socket/pack test parity (Fixes #504) 2026-09-28 14:20:23 +00:00
troytt 1d7445a64e fix(ui): align CharacterSheet stone recess centers, bilingual CJK+space wrapping, bnet.html @font-face & pack:ui font parity (Fixes #504) 2026-09-28 12:56:17 +00:00
troytt 9d0138f69b fix(ui,fonts): hybrid DC6+CJK rendering, middle-dot atlas mask, TTF contour refinement, and recess centering (Issue #504 R2 review) 2026-09-28 12:53:32 +00:00
troytt f488ac8743 fix(ui,fonts): fix Formal 436 quest/dialog prose, TTF glyph contours, and char-sheet spacing (Issue #504 R1 review) 2026-09-28 12:53:32 +00:00
troytt 3ced5b08b9 feat(ui): integrate authentic 1.13c Exocet & Formal 436 DC6 bitmap & TrueType fonts (#504) 2026-09-28 12:53:32 +00:00
troytt 6601dcde82 feat(char,items): dynamic Sorceress equipment paperdoll appearance, weapon classes, and 1.13c palette dye shifts 2026-09-28 12:42:21 +00:00
troytt e1a58631d1 Merge branch 'feat/fixes-500-502' into feat/drlg-496-499 2026-09-28 11:27:46 +00:00
troytt d887b39485 feat(drlg): port 1:1 D2MOO outdoor DRLG for Acts 2, 3, 4, and 5 (#496, #497, #498, #499) 2026-09-28 11:22:08 +00:00
troytt 909c50eb48 fix(drlg,pack): pack XX minion art, fix L123 var3 waypoint, and pin exact DRLG tile variants (#500, #501, #502) 2026-09-28 09:23:12 +00:00
troytt 99e23b9a53 fix(frontend): use act1/pal.pl2 and BIGMENU/radiobutton.dc6 for Battle.net Lobby per D2WinPalette.cpp & D2Multi.dll 2026-09-28 08:58:31 +00:00
troytt a100885552 chore: remove standalone simulator pages (arena, loot, boss, skills) and related entry code 2026-09-28 08:09:37 +00:00
troytt 4914b4f770 Merge branch 'feat/bnet-flow'
# Conflicts:
#	src/scene/act-scene.ts
#	vite.config.ts
2026-09-28 07:42:22 +00:00
troytt af9a091356 feat(frontend): add bnet.html 7-stage Diablo II v1.13c pre-game & Battle.net flow into Act 1 Rogue Encampment 2026-09-28 07:39:13 +00:00
troytt ef8a7ffff6 fix(i18n): resolve all Iteration 1 bilingual parity findings for Issue #503
- Prefer item.damageEn in ENG item tooltips and normalize 2H, versatile 1H/2H, and throwing weapon damage labels in localizeStarterTooltipLine and item-bridge.ts
- Fix starter set item tooltip regex ordering (+所有技能 without trailing $ and +生命补给 before +生命)
- Use getLocalizedNpcName for Town NPC stone menu headers in both ENG and CHI modes across getNpcMenuLayout, handleNpcMenuClick, and drawNpcMenu
- Add SUPERUNIQUE_TBL_ALIASES in monsterDisplayName for 7 SuperUniques whose SuperUniques.txt IDs differ from .tbl keys
- Export cleanChiItemName in ground-labels.ts and apply to CHI ground item labels and drop-to-ground status messages
- Update verify-issue-503-browser.ts LeftDockPanelKind loop + vendor/NPC coverage and expand issue-503-bilingual-parity.test.ts

Refs #503
2026-09-28 07:35:16 +00:00
troytt 6fa9c7784e feat(i18n): implement full Chinese (CHI) and English (ENG) bilingual versions (#503)
- Add src/i18n/lang.ts for URL/query/storage language detection, runtime state, and language switcher URL generation preserving query parameters
- Expand scripts/pack-canonical-tbl.ts and regenerate src/data/canonical-tbl-strings.ts with 3,721 ENG and 3,374 CHI 1.13c .tbl entries (UI, monsters, SuperUniques, levels, skills, items)
- Add completedEn speech strings for Act II Quest 2 and Act IV Quest 2 in src/data/canonical-quest-data.ts
- Add index.html bilingual entry portal, acts-zh.html (CHI), acts-en.html (ENG), and language switcher in acts.html; configure multi-page rollup inputs in vite.config.ts
- Localize all 15 UI/game modules (level-names-zh, character-sheet, control-bar, globes, ground-items, ground-labels, item-bridge, inventory, skill-tree-panel, hotkeys, npc-table, world-panels, monsters, hud-manager, act-scene) for authentic CHI and zero-CJK ENG modes
- Add tests/issue-503-bilingual-parity.test.ts and scripts/verify-issue-503-browser.ts

TAG=agy
CONV=5016e6fd-4af8-421f-ae4b-6d443a0a102a
2026-09-28 07:35:16 +00:00
troytt b084aaba7f feat(hud): implement authentic 1.13c monster hover lifebar and 2-line subtext tooltip 2026-09-28 04:18:50 +00:00
troytt 526d623f66 Merge branch 'feat/automap-113c'
# Conflicts:
#	public/ui/manifest.json
#	src/scene/act-scene.ts
#	src/ui/baked-ui-meta.ts
2026-09-28 01:33:06 +00:00
troytt 14aa512e85 feat(automap): implement authentic Diablo II v1.13c isometric sprite Automap & Minimap 2026-09-28 01:27:10 +00:00
troytt b6fc2512d4 feat(drlg): generate Act I outdoor levels with the 1:1 D2MOO port (#455)
The eight Act I outdoor levels (Blood Moor 2, Cold Plains 3, Stony Field
4, Dark Wood 5, Black Marsh 6, Tamoe Highland 7, Burial Grounds 17, Moo
Moo Farm 39) are now generated by the function-by-function port of
D2MOO's D2Common DRLG in src/game/drlg, bit-exact against a native D2MOO
oracle. The legacy Act I generator (src/game/wilderness/*, the Blood Moor
branch and the Act I paths of wilderness.ts) is deleted; there is no
fallback. Acts 2-5 are unchanged.

Port (completes the kernel committed earlier):
- Tile-map stage: DRLGROOMTILE_AddRoomMapTiles with its tile-data,
  linked-tile and warp helpers, DRLGPRESET_AddPresetRoomMapTiles,
  DRLGOUTROOM_InitializeDrlgOutdoorRoom (drlg-outroom.ts), the
  DrlgDrlgLogic.cpp parts they reach (drlg-logic.ts), D2CMP shim updates.
- drlg-dump.ts: runAct1() driver API; schema 3 dumps with per-room tile
  lists. The port is now type-checked (tsconfig no longer excludes it).

Integration:
- drlg-map.ts (replaces drlg/adapter.ts): turns a generated level into
  the bake's DS1-shaped canvas with exact (style, sequence, type) per
  tile and per-cell DT1 masks, objects, seams from the DRLG level links,
  warps from their UNIT_TILE preset units; blank cells stay blocked.
- pack-act-assets: one D2 game seed per (act, variant), a DRLG bake job
  and index.json actLayouts; scripts/lib/drlg-mpq-source.ts feeds the
  port from the MPQs with the oracle's file list.
- act-variants.ts: WorldVariants picks one generated copy per act (and
  the Rogue Encampment DS1 that copy fixed); act-scene.ts and
  verify-world-walk both use it. act-scene no longer paints grass into
  the blank cells of DRLG scenes.
- world-graph: remove the invented Stony Field <-> Dark Wood seam
  (gAct1WildernessDrlgLink / gAct1MonasteryDrlgLink keep them apart;
  they meet only through the Underground Passage); world-placement
  anchors the second group at the Monastery Gate (3000, 1000).
- level-links: findBorderOpening takes an optional edge range.
- d2map: dt1MaskAllows extracted, behaviour unchanged.

Tools and tests:
- tools/d2moo-oracle: tile-map stage and schema 3; the 4 fixtures are
  regenerated (scripts/drlg-fixtures.ts).
- scripts/render-drlg-compare.ts (both dumps through the same adapter
  and renderer, fails unless the XOR is empty) and
  scripts/audit-levels-browser.ts (headless audit of every baked map).
- tests/drlg-act1-oracle.test.ts (all stages, all 4 fixtures) and
  tests/drlg-act1-invariants.test.ts; tests and stress scripts of the
  deleted generator are retired or now run on Acts 2-5 only.
- verify-world-walk: start in the town the runtime opens and floor the
  spawn sub-tile like the movement collision does.

Verification:
- drlg-diff --levels 2-7,17,39 --seeds 32: 32/32 identical at every
  stage; --trace-check 64/64, --isolated 32/32, difficulty 1 and 2 16/16.
- render-drlg-compare, 3 bake copies x 8 levels: 24/24 XOR empty.
- Full re-bake: 365 maps, 0 missing tiles. Browser audit: 355/365 maps,
  133/136 level ids clean (112/124/129: Act 5 minions without art, as
  before).
- verify:world-graph 37583 assertions; verify:world-walk 29/29;
  verify:entity-packs, typecheck clean. vitest 6369 passed; the 6
  failures (5 ground-item name formatting, 123-var3 waypoint) and the
  verify:packs / verify:generators failures also occur at bad6806.

Test pins updated, measured on the new bake: SceneEntrance 172 -> 166
and world-graph edges 286 -> 284 (the removed seam), seamless pairs
27 -> 26 and placement pairs 19 -> 18; full-spectrum floors / walls /
PNGs 1008898 / 237542 / 1390 (the old pins matched no bake of the
current code).

TAG=agy
CONV=a4f9163c-a011-4161-b169-7f361b1ed57e
2026-09-27 15:20:41 +00:00
troytt 3bf9a8c220 fix(ui): restore Horadric Cube Transmute and Close buttons per D2Client.dll 1.13c parity 2026-09-27 08:36:19 +00:00
troytt 8c5ae5c623 fix(ui): 补齐物品栏金币按钮 (goldcoinbtn.dc6) 并对齐金币栏数值 2026-09-27 08:16:53 +00:00
troytt 855d610168 fix(ui): 点击商人面板买/卖/修理按钮后鼠标样式切换为原版 buysell.dc6 交易光标 (Fixes #491) 2026-09-27 07:47:31 +00:00
troytt d998a0551b fix(ui): restore authentic D2 v1.13c NPC dialog popup menu (Fixes #489) 2026-09-27 06:41:10 +00:00
troytt 7295dc8b3e feat(portal): implement v1.13c Town Portal tome/scroll, DS1 town positions & two-way travel (#394)
- Resolve exact Diablo II v1.13c DS1 Type-2 Object #33 (Objects.txt ID 59) Town Portal sub-tiles across all 9 town presets (Acts 1-5) in src/game/portal.ts
- Implement TownPortalSlot.mouthInLevel(levelId) and enterFrom(levelId) per ObjMode.cpp:3245 (wilderness -> town keeps portal open; town -> wilderness closes portal)
- Add 20-charge quantity tracking for Tome of Town Portal (tbk) and Tome of Identify (ibk), right-click casting for tbk/tsc in inventory, and scroll-to-tome refill
- Bake authentic TP DCC sprite atlases (tptrlitophth, tphdlitophth, tptrlitonhth, tphdlitonhth) into public/overlays/town_portal_*
- Render Town Portal entity with OP/ON DCC animation, dynamic blue light (Light=19, RGB 64/110/255), overhead destination label, and proximity walk-to-interact in src/scene/act-scene.ts
- Add unit and parity tests in tests/town-portal.test.ts

Closes #394
2026-09-26 15:11:09 +00:00
troytt cccc6ff527 chore(scripts): include anim, missiles, overlays, entities, and world-graph in publish-packs 2026-09-26 13:32:51 +00:00
troytt bdb3b4145a fix(ui): restore 1.13c buysell.dc6 vendor panel, tabs, and repair buttons 2026-09-26 11:45:37 +00:00
troytt 3b993cf04a feat(vendor): implement 1.13c vendor inventory generator, pricing engine & town NPC UI (Fixes #481, #482, #483, #484, #485, #486) 2026-09-26 05:49:03 +00:00
troytt b7ccc448b4 fix(items): strictly align item names & stat descriptions with 1.13c .tbl across inventory, stash, and ground (fixes #480) 2026-09-26 05:23:09 +00:00
troytt 92966abdee feat(skills): complete 1.13c D2MOO parity for Assassin and Universal skills (#154-#374) 2026-09-25 22:13:38 +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 880b196c43 feat(ass): Milestone M26 Assassin Asset Pipeline and Trap Mechanics (closes #473) 2026-09-25 03:30:28 +00:00
troytt 51ac3b2d77 feat(dru): Milestone M21 Druid asset pipeline and foundation (closes #468) 2026-09-25 02:35:14 +00:00
troytt 98210321da feat(bar): Milestone M16 Barbarian asset pipeline and foundation
- Extracted and baked authentic Diablo II v1.13c missile DCC sprites from MPQ archives:
  * BAYellShockWave01 (Howl, Shout, Battle Cry, Battle Command, Battle Orders)
  * WarcryShockwave (War Cry)
  * GrimWardSmallStart, GrimWardSmall, GrimWardSmallStop
  * GrimWardMediumStart, GrimWardMedium, GrimWardMediumStop
  * GrimWardLargeStart, GrimWardLarge, GrimWardLargeStop
- Extracted and baked authentic v1.13c overlay DCC sprites with Trans=3 additive blending:
  * ShoutStart, Shout, BattleCry, BattleOrdersStart, BattleOrders
  * BattleCommandStart, BattleCommand, BerserkOverlay, Frenzy, WarcryHit
- Added aliases for Taunt (CurseConfuseEffect) and Stun (Stun)
- Generated typed metadata in src/render/missiles-meta.ts and src/render/overlays-meta.ts
- Added comprehensive unit and adversarial test suites:
  * tests/skills/bar/bar-assets.test.ts
  * tests/skills/bar/adv-bar-assets-audit.test.ts
- Passed 38/38 test files (196/196 tests green, 0 typecheck errors)
- Preserved BATCH1_SKILLS length = 38 and zero runtime MPQ invariant

Closes #463
2026-09-25 01:46:57 +00:00
troytt e6b3c5b06d feat(ama): implement Milestone M11 Amazon assets, animations & foundation setup (#458) 2026-09-24 18:07:04 +00:00
troytt a88b02ae33 test: fix 29 pre-existing vitest failures and ensure test hygiene (Fixes #451) 2026-09-24 17:15:59 +00:00
troytt d421a4549c test(audit): use authentic combat and drop pipeline in browser verification (Fixes #449) 2026-09-24 15:28:03 +00:00
troytt a7110143fc fix(monsters): enforce 1.13c champion [2,4] and unique [3,6] minion pack sizes (Fixes #448) 2026-09-24 14:01:16 +00:00
troytt e3a7918a16 fix(ground): hover ground item reveals label & fix grand charm flippy sprite (Fixes #447, Fixes #452)
- Hover ground item icon reveals authentic name label without needing Alt key (Fixes #447)
- Connect SceneMouseController pointermove/pointerleave with GroundLabelOverlay hover callback and ladder layout rendering
- Correct Grand Charm (cm3) and Gheed's Fortune ground flippy sprite mapping to flpchm3 (Fixes #452)
- Correct Small Charm (cm1) and Large Charm (cm2) default flippy mappings to flpchm1 and flpchm2
- Add 1.13c charm ground flippy resolution tier and Chinese semantic fallbacks in resolveGroundItemSpriteRect
- Add comprehensive vitest suites in tests/charm-ground-flippy-parity.test.ts and tests/ground-items-alt-labels.test.ts
2026-09-24 13:06:15 +00:00
troytt 71466df5e7 fix(skill): implement Glacial Spike explosion and 64px AoE freeze (Fixes #430) 2026-09-24 12:23:39 +00:00
troytt 0aa6c3680d feat(paladin): Milestone M6 — 1.13c Paladin assets packaging & metadata registry
- Update scripts/pack-missiles.ts with Paladin missiles (fistoftheheavensbolt, foa, blessedhammerex, blood1) with trans: 1 and dark border suppression max(r,g,b) <= 4 -> alpha = 0.
- Update scripts/pack-overlays.ts with 16 Paladin combat, cast, hit, and state overlays (charge, conversion, conversioncast, holy_bolt_cast, fist_of_the_heavens_cast, handofgod, sanctuary_knockback, holy_fire_hit, holy_fire_indicate, thorns_hit, thorns_indicate, cast_resistfire, cast_resistcold, cast_resistlight, cast_resistall, stun) with preDraw flags and trans: 3 dark halo thresholding.
- Bake and mirror assets across public/ and samples/d2-packs/.
- Generate compile-time metadata in src/render/missiles-meta.ts and src/render/overlays-meta.ts with zero runtime MPQ invariant.
- Add comprehensive unit tests in tests/skills/pal/pal-assets.test.ts.
- Add adversarial coverage audit tests in tests/skills/pal/adv-pal-assets-audit.test.ts.
- Resolves Gitea issue #445.
2026-09-24 11:30:34 +00:00
troytt ef86fc55f3 test(drop): end-to-end deterministic drop tests and headless browser audit (Fixes #408) 2026-09-24 11:13:35 +00:00
troytt ac9999cd5b feat(nec): bake missing Necromancer missiles, overlays, and register metadata (M1)
- Update scripts/pack-missiles.ts to include missing Necromancer missiles: corpseexplosion, poisoncorpseexplosion, poisonexplosioncloud, poisonpuff, cursecast, bonecast, bonespeartrail, revive
- Update scripts/pack-overlays.ts to include 15 Necromancer overlays: 10 Curses overhead state icons, 2 hit overlays, 3 Bone Armor overlays
- Extract and bake 32-bit RGBA sprite sheets into public/missiles/ and public/overlays/ with transparent border thresholding (max(r,g,b) <= 4 -> alpha = 0)
- Generate strongly-typed metadata in src/render/missiles-meta.ts and src/render/overlays-meta.ts
- Add comprehensive Vitest test suite in tests/skills/nec/necro-assets.test.ts verifying physical file existence, JSON frame geometry, and 0 transparent border artifacts
- Verified typecheck with 0 errors and all asset test suites passing 100%
2026-09-24 07:04:38 +00:00