- 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
1. Sub-Tile Scatter Spacing (D2Common.dll COLLISION_GetFreeCoordinatesImpl 0x6FD9D140):
- Unify GameEngine.triggerMonsterDrop, GameEngine.dropItem, GameEngine.dropGold,
and net-scene monster drops on findIsometricDropPosition (16x8 sub-tile diamond
lattice, 16px orthogonal / 8px vertical spacing) instead of 80x40px macro cells.
- Derive GroundItemEntity (cellX, cellY) from final scattered (finalX, finalY)
via worldToCell rather than overwriting with stale origin cell coordinates.
2. Monster vs. Inventory Drop Metadata & Bilingual Name Parity:
- Add formatBilingualGroundItemName in src/game/ground-items.ts using
translateItemName / translateMagicName / translateRareName so raw monster-dropped
Item objects receive identical '中文名 (English Name)' nameZh as UiInventoryItem.
- Detect runes via isRuneCode in resolveItemQualityString so monster-dropped runes
render with #ff9c18 orange labels matching inventory-dropped runes.
- Preserve flippyFile, dropSound, and dropSfxFrame in itemToUiInventoryItem, fix
socket count resolution so unsocketed items do not inherit base.gemsockets, and
add embedded drop table fallback in resolveGroundItemMetadata.
3. Anti-Stacking for Sequential Player Inventory/Body Drops:
- Simplify act-scene onDropItemToGround / onDropGoldToGround to delegate directly
to engine.dropItem / engine.dropGold at (player.x, player.y) so every dropped
item checks engine.groundItems.all and scatters to a unique sub-tile slot.
Fixes#479
- 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
- LightGrid Radial Ray-Marching (src/game/engine/light-grid.ts):
* Only count line-of-sight blockers (COLLIDE_VISIBLE | COLLIDE_DOOR) in updateObstacles
so floor rocks, stairs, and walkable blockers do not create dark spots.
* Trace radial rays from emitter to target cell (1 <= s < steps) so the emitter's
own cell is never self-occluded when hugging a wall, wall front-faces receive full
illumination, and authentic shadows are cast behind walls.
- Ground-Plane Vertical Elevation Compensation (src/render/renderer.ts):
* Encode vertical sprite elevation (elevationY) in top quad vertices while strictly
preserving the 10-float vertex stride (FLOATS_PER_VERTEX = 10) so upright walls,
objects, characters, and monsters sample the lightmap at their ground footprint.
- Scene Lighting & Clear Color Parity (src/scene/act-scene.ts):
* Set canvas clear color to pure pitch black [0, 0, 0] when lighting is enabled,
eliminating #08080a diamond void bands around cave boundaries.
* Scale light radii by SUB_TILES_PER_LIGHT_CELL (8 sub-tiles per cell: player torch 88).
* Register Objects.txt Lit0..2 emitters (TO, T1, T2, FB, B2, WP, SH, etc.) for cave torches.
* Map all spell skillIds (including Glacial Spike '55') for dynamic projectile lighting.
- 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
- Implement 10 Poison and Bone skills (Teeth 67, Bone Armor 68, Poison Dagger 73,
Corpse Explosion 74, Bone Wall 78, Poison Explosion 83, Bone Spear 84, Bone Prison 88,
Poison Nova 92, Bone Spirit 93) per 1.13c ground truth.
- Decouple damage formulas into standalone exported functions: calculateTeethDamage,
calculateBoneArmorCapacity, calculatePoisonDaggerDamage, calculateCorpseExplosionDamage,
calculateBoneWallStats, calculatePoisonExplosionDamage, calculateBoneSpearDamage,
calculateBonePrisonStats, calculatePoisonNovaDamage, calculateBoneSpiritDamage.
- Preserve BATCH1_SKILLS length strictly at 38 skills.
- Enforce 2:1 isometric ground projection geometry (ISO_GROUND_ASPECT_RATIO = 0.5)
for collision, radial Poison Nova bursts (64 bolts), and trajectory kinematics.
- Implement Bone Spirit homing steering and Bone Spear piercing (collideKill = 0).
- Integrate casting lifecycle in act-scene: mana deduction, overlays, corpse consumption,
and dagger weapon requirement for Poison Dagger.
- Add comprehensive 37-test suite in tests/skills/nec/poison-bone.test.ts.
- Fix ghost property resistLightning to respect monster resistances and lightningResist in act-scene.ts
- Wire monster resistances across MonsterStats and applyEliteModifiers in combat.ts and monsters.ts
- Clamp Static Field damage non-lethally post-resistance scaling and protect against difficulty floor underflow in missile-engine.ts
- Implement continuous sub-step collision and raycast line-of-sight in missile-engine.ts and skills.ts
- Add persistent NextDelay tracking on GameEngine with automatic per-tick expired entry pruning
- Align Nova (64 bolts, aspect ratio 0.5, NextDelay 4) and Static Field in executeSkillCore113c
- Dual sprite falling trajectory: render falling meteor fireball (meteor) and flame tail (meteortail) descending diagonally during 60-tick countdown with additive blending
- Animation frame indexing: meteorcenter advances monotonically starting at frame 0, meteorfire plays emergence once (0..11) then loops 12..36 indefinitely
- Detonation timing: center expires and detonates at tick 60 exact (isExpired when ttl <= 1)
- Wall collision: drop meteorfire ground patches landing inside solid walls in MissileEngine
- Full test coverage: Dimensions 8 & 9 added to skill-056-meteor.test.ts, stress and adversarial test suites verified
- Remove targetX and targetY from stationary turret projectile definition in castSkill (act-scene.ts)
- Remove idle fallback to projectile.targetX/Y in tickProjectiles (skills.ts) so turrets only fire when an alive target is found within range
- Add negative unit test in Dimension 3 verifying 0 projectiles are spawned over 50 ticks with empty targets array