Commit Graph

107 Commits

Author SHA1 Message Date
b70ccbd5f6 fix(07-02): #06-03-1 resolve the reuse mapping in enemy creation
- createEnemy/createEnemyById now resolve prefabs through internalGetPrefab,
  matching getPrefab/deletePrefab/modifyPrefabAttribute behaviour
- add a Chinese invariant comment above createEnemyById covering all
  code/id prefab entry points
- un-skip the two correct-expectation reuse mapping cases in manager.test.ts
  (assertions unchanged) and sync their Chinese comments
2026-09-15 17:16:44 +08:00
8a7cda95ae test(06-13): tier map tile save/load across all compressions (G-06-09-B)
- StaticTile covered-event round trip looped over NoCompression/LowCompression/HighCompression
- DynamicTile covered-event round trip looped over the three tiers, keeping the tile num assertion
- Existing #06-09-3 it.skip unchanged
2026-09-15 11:24:08 +08:00
6d7e57ab34 test(06-13): tier hero save/load classes across all compressions (G-06-09-B)
- EquipmentState percentage round trip per tier (NoCompression green; Low/High correct-expectation it.skip anchored #06-09-1)
- HeroItems constant/consumable tables and HeroState attributes/location loop over the three compression tiers
- HeroState container covers HeroLocation/HeroRendering across tiers; HeroEquipment container expectation it.skip anchored #06-09-2
- Existing #06-09-1/#06-09-2 skips unchanged
2026-09-15 11:22:52 +08:00
e2c163899d test(06-12): register blocked four-facing prefab reuse expectation (G-06-03-A)
- add correct-expectation it.skip for four facing codes reusing one prefab
- append 06-12 coverage-gap section to 06-COVERAGE-MAP.md
2026-09-15 10:43:03 +08:00
309f1b1850 test(06-11): cover static-dynamic-move-static full chain (G-06-06-A)
- mapLayer.test.ts: both keepEvent branches verified after a real-timer move,
  with exact event maps, dirty flags, block write-back and dynamic index updates
- 06-COVERAGE-MAP.md: append the 06-11 gap-fill section (create-or-append)
2026-09-15 10:27:59 +08:00
41da613f0b test(06-11): cover coexisting map layers of different z-index (G-06-06-C)
- gameMap.test.ts: three layers at z-index 1/5/9 keep independent block data and
  are judged separately by z-index during compareWith (missing ref marks dirty)
2026-09-15 10:25:17 +08:00
436386ea67 test(06-11): cover multi-slot equipment merge and createMap content generation
- equipment.test.ts: G-06-05-A asserts combined atk/def for weapon+armor and keeps the other slot's modifier after unequip
- mapState.test.ts: G-06-06-B writes/reads block, point event, event layer binding and dirty flag on a createMap floor
2026-09-15 10:23:16 +08:00
c08f3f8484 fix(replay): enable recording guard; update tests for replay refactor 2026-09-14 20:14:01 +08:00
17d7c8f46a refactor: refactor replay system record. 2026-09-14 19:55:20 +08:00
2ff422a682 test(06): restore suite green after replaySystem wiring change 2026-09-14 19:16:32 +08:00
c707c87add test(06-09): cover map, replay and flag save/load round trips
- add map/saveLoad.test.ts: StaticTile/DynamicTile/MapLayer/GameMap/MapState round trips, codes 55/122/124
- add replay/saveLoad.test.ts: ReplayArray and ReplaySystem same-instance round trips
- add flag/saveLoad.test.ts: FlagSystem round trip and separated snapshot
2026-09-14 18:57:51 +08:00
3e29548bfa test(06-09): cover enemy and hero save/load round trips
- add enemy/saveLoad.test.ts: Enemy/special/EnemyManager same-instance round trips across 3 compressions, codes 119/120
- add hero/saveLoad.test.ts: modifier/location/rendering/equipment/equipStore/items/follower/state round trips, codes 58/59
- add 06-SAVE-EXCLUSIONS.md: per-class excluded fields and rationale (D-42)
2026-09-14 18:57:42 +08:00
cee843981f feat: 录像记录 & CoreState 存储接口 2026-09-14 18:09:45 +08:00
2cb9bba3ce test(06-08): cover FlagSystem, FaceManager handlers and RoleFaceBinder (stage 2)
- add system.test.ts covering the full FlagSystem public surface and warn code 111
- add faceManager.test.ts covering FaceManager registry plus Dir4/Dir8 handlers
- add face.test.ts covering RoleFaceBinder malloc/bind/query and error codes 43/44
2026-09-14 16:56:17 +08:00
235eb1a5c9 test(06-06): cover DynamicTileMover async lifecycle (stage 3)
- mover.test.ts: successful step and layer reindex, cumulative/diagonal movement, warn 126 on an unexpected move code, lifecycle hook order, concurrent start rejection, initial face direction
2026-09-14 16:28:30 +08:00
b971e145e9 test(06-06): cover map registration, layers and dynamic conversion (stage 2)
- mapState.test.ts: createMap/getMap, raw validation codes 60/61/62/63/64, activation, areas, compareWith
- gameMap.test.ts: layer lifecycle, aliases 84, background, event layer 131, dirty, resizeLayer, compareWith
- mapLayer.test.ts: matrix, getMapData 80/81, putMapData 8/9, setMapRef 123, dynamic conversion 127/128/129/130, point events, dirty/compareWith, async doors 46
- eventView extension plus stage 1 files already committed
2026-09-14 16:26:10 +08:00
4cffe90794 test(06-06): cover map tile units and event view (stage 1)
- tile.test.ts: MapTileBase num/raw/set, default-event restore, per-tile event view, pointEvent linkage, setFaceDirection binder mapping
- staticTile.test.ts: num/raw/set/raw-miss/shouldSave/toDynamic
- dynamicTile.test.ts: create warn 143, num/raw/set, setPos, face direction, toStatic/toStaticIfSafe, step, delete
- eventView.test.ts: extend per-priority dirty tracking and duplicate priority warn 136
2026-09-14 16:19:09 +08:00
351111487a test(06-05): cover HeroMover async movement and HeroRendering (stage 3)
- add mover.test.ts: config round-trip, Step/CannotMove/Hit, out-of-bound, terrain bypass, enter/leave order, code 144
- add rendering.test.ts: default alpha, setAlpha hook, hook unload
2026-09-14 15:55:08 +08:00
6d5081abcb test(06-05): cover hero assembly and item/equipment pipeline (stage 2)
- add location/state tests: locator, floor/pos hooks, subsystem assembly, code 116, changeFloor hook order
- add equipment/equipStore/items tests: equip/unequip/replace, compareEquip, instance sorting, item routing, code 146
- add follower tests: add/remove hooks, neighbour links, sync/async gather, code 142
- record suspected bugs #06-05-2/#06-05-3 (named-slot empty check, unreachable code 147) as it.skip
2026-09-14 15:52:32 +08:00
c1781b8102 test(06-05): cover HeroAttribute and hero modifier formulas (stage 1)
- add attribute.test.ts: base/final, priority sort, delete, save flag, clone, codes 108/109
- add modifier.test.ts: value/percentage formulas, default priorities, setValue recompute
- record suspected bug #06-05-1 (no-modifier final value stale) as it.skip
2026-09-14 15:43:59 +08:00
7012aa49fc test(06-03): cover EnemyManager registry, prefab, reuse and dirty (stage 3)
- registry/attribute defaults incl. error 53 for non-serializable values
- prefab add/get/create/delete/change and reuse mapping reads
- modifyPrefabAttribute callback and index rebuild
- comparer lifecycle: warn 117 on repeat compareWith, warn 118 without comparer
- skip #06-03-1 (createEnemy does not resolve reuse mapping) per D-05
2026-09-14 14:39:41 +08:00
ff752713b9 test(06-03): cover Enemy special CRUD and clone/copyFrom (stage 2)
- enemy.test.ts: addSpecial/get/has/iterate, duplicate warn 96, delete by object/code, clone/copyFrom independence
- special.test.ts: clone value independence and deepEqualsTo code/value rules, NonePropertySpecial clone
2026-09-14 14:35:24 +08:00
965868c219 test(06-03): add Enemy attribute and special unit tests (stage 1)
- enemy.test.ts: attribute get/set/add independence and cloneAttributes deep copy
- special.test.ts: CommonSerializableSpecial value/name/description and NonePropertySpecial units
- fixtures inline, legacy and save/load excluded per D-30/D-32
2026-09-14 14:32:40 +08:00
a66be585d1 feat(event): rework built-ins and centralize trigger collection
- rename deleteBlock -> removeBlock (dynamic tiles need dynamic:true),
  moveHeroStep -> stepHero; touchFront steps forward and lets the mover bump
- GameEventSystem.collectEvent owns point/tile source collection; moverImpl
  enter/leave/hit reuse it with OnEnter/OnLeave/OnTouch
- IBlockEventEnv gains required system field and nullable heroFloor
- MapLayer.removeBlock added and setBlock guarded by inMap; GameMap owns floorId
- IObjectMover.push accepts readonly steps
- update event/eventDispatch tests to the current implementation (fixtures
  supply system, hero location snapshots, renamed registrations)

Verified: data type gate 0 in-scope; vitest 19 files / 112 tests pass; prettier
and eslint clean on touched files.
2026-09-13 20:37:32 +08:00
2794dfc32d style(03-05): normalize scoped data gate formatting 2026-09-10 17:53:33 +08:00
64b97bc515 fix(03-05): close data package type and cycle boundaries 2026-09-10 17:40:29 +08:00
4eec08638e feat(03-01): add awaited replay movement tracer
- exercise source-aware event mutation on a fixed map
- verify Node replay reaches its normal end state
2026-09-10 15:43:26 +08:00
a707be4856 feat(03-01): add Node-safe core state construction
- isolate legacy loading behind internal dependencies
- provide memory saves and remove singleton back-edges
2026-09-10 15:35:01 +08:00
7f19773477 chore(03): checkpoint data layer structure 2026-09-10 13:30:53 +08:00
26f7ad6b2e refactor(02-06): align pathfinding structure with user scope 2026-09-10 11:21:53 +08:00
2759df531e feat(02-03): wire hero pathfinding movement
- Bind the hero predicate and event layer into the L2 finder
- Execute translated paths through the hero mover and export the L3 entry
2026-09-09 21:13:30 +08:00
68a150882c refactor(02-03): extract hero pass predicate
- Move passability and hit checks behind IPassPredicate
- Keep hero mover event dispatch and move codes unchanged
2026-09-09 21:06:07 +08:00
7dd4f39e7e fix: getLocationData logic 2026-09-09 19:42:37 +08:00
7a011b29c2 feat: 完成寻路系统接口设计 2026-09-09 16:40:56 +08:00
1d9b180d5f docs(test): describe individual test cases 2026-09-09 13:33:42 +08:00
4349e67669 docs(test): require test scope comments 2026-09-09 13:12:10 +08:00
33966fb4dd test(event): polyfill map insertion in fixtures 2026-09-09 13:06:27 +08:00
63d4d37ff3 fix(event): finalize event reference changes 2026-09-09 13:03:42 +08:00
64efcf2555 refactor(event): centralize point event references 2026-09-09 12:53:37 +08:00
a297311ea6 feat(event): complete phase one event system 2026-09-09 12:01:21 +08:00
15d9f25b44 fix(01-12): repair event phase type fixtures
- Import the existing block event environment contract. - Type focused invocation, raw-event, and map lifecycle fixtures without changing behavior.
2026-09-09 11:33:34 +08:00
8b2e58e9a2 test(01-09): cover high-compression point-event aggregation
- Reuses the point-event-only map fixture for LowCompression and HighCompression
- Asserts both paths preserve z-index and index-priority-eventId nesting
2026-09-09 10:26:22 +08:00
3df0b2afc5 fix(01-09): retain point-event-only map layers
- Treat non-empty pointEvents as valid layer save content
- Preserve layer z-index aggregation for compressed map saves
2026-09-09 10:25:11 +08:00
98d5958880 test(01-09): add point-event-only map aggregation regression
- Covers a dirty point event without matrix, static, or dynamic changes
- Asserts the low-compression layer keeps its z-index and nested event ids
2026-09-09 10:22:23 +08:00
22056140bd fix(01-07): dispatch events with source-aware trigger matching
- Carry each event id with its real point or tile environment.
- Filter mismatched triggers before execution and include every dynamic tile in priority order.
2026-09-09 00:18:00 +08:00
d3eeb1eb19 feat(01-10): persist point event lifecycle state
- Add the approved coordinate-indexed pointEvents save field.
- Document preserve/crop resize and clear resize2 semantics.
2026-09-09 00:08:58 +08:00
bcfa1f9467 fix(01-10): restore tile defaults and stable event snapshots
- Rebuild raw tile event baselines on construction, set, load, and conversion.
- Preserve coordinate-owned point events through dynamic movement and copy save Maps.
2026-09-09 00:08:38 +08:00
974669b00a fix(01-06): remove unsupported map upsert runtime calls
- Use explicit Map lookup and insertion in point and dynamic indexes.
- Keep raw event tests runnable in the Node Vitest environment.
2026-09-08 23:54:09 +08:00
a730f33195 fix(01-06): reject malformed raw event structures
- Validate map, layer, position, priority, and event id shapes before registration.
- Add dedicated logger codes and no-partial-registration coverage.
2026-09-08 23:53:39 +08:00
564ef25360 fix(01-06): wire raw point event ingestion
- Bind serialized point events to the coordinate event view.
- Select the event layer by its event alias and verify the static view stays clean.
2026-09-08 23:52:13 +08:00