Commit Graph

351 Commits

Author SHA1 Message Date
df210980b6 docs(06-03): complete enemy data model unit test plan 2026-09-14 14:44:42 +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
e03fd3cb69 docs(06): add D-44 lint/type quality gate 2026-09-14 14:14:37 +08:00
d9ac8a6007 fix(06): add D-44 lint+type quality gate to all plans 2026-09-14 14:13:58 +08:00
136a9845d6 test(06): fix lint and type errors in data-layer test files 2026-09-14 14:03:25 +08:00
693b337e24 docs(06-02): complete enemy top-level implementation unit test plan
- record the D-43 staged execution (component -> pipeline -> integration) of data-state/src/enemy
- add the 06-02 coverage-map section (warn code 137 -> enemy/calculator.ts)
- update STATE/ROADMAP to 2/9 phase-06 plans summarized
2026-09-14 13:38:25 +08:00
e72231d9fa test(06-02): close GuardAura converter and capability coverage gap
- add a normal case for GuardAuraConverter.convert (code 26 -> GuardAura)
- assert GuardAura priority/couldApplyBase/couldApplySpecial/range/applySpecial
- keeps D-30 per-public-method coverage symmetric with CommonAura
2026-09-14 13:35:51 +08:00
06bf4996ee docs(06-01): complete combat unit test plan 2026-09-14 13:02:13 +08:00
a9b6e7290c test(06-01): stage 3 integration coverage for combat, damage and map damage
- add D-26 attribute-to-damage linkage and getCalculator coverage in damage.test.ts
- cover markEnemyDirty refresh and unregistered delete in mapDamage.test.ts
- cover off-map handler and standalone computed enemy in combat.test.ts
- register suspected buildup compounding bug as #06-01-4 it.skip with a findings entry
- complete the 06-COVERAGE-MAP.md code rows for 106/107/102/103/104/138/139/140/141
2026-09-14 12:58:46 +08:00
f536901733 test(06-01): stage 2 pipeline coverage for EnemyContext
- cover full buildup aura conversion and one/two-layer nested auras
- assert four-stage order specials -> base -> query -> final with forward-only visibility
- cover local requestRefresh, needTotallyRefresh full fallback, and warn codes 97/98/99/100/101/110
- fill the 06-COVERAGE-MAP.md rows for the stage 2 warning codes
2026-09-14 12:52:29 +08:00
2e4e6d739d test(06-01): stage 1 component-level EnemyContext coverage
- cover every public EnemyContext method (registry, converters, effect registrations, attachments, dirty, lifecycle)
- apply single fake auras over Full/Rect/Manhattan ranges and assert out-of-range enemies stay unchanged
- add shared 06-COVERAGE-MAP.md skeleton with the code -> module -> case header protocol
2026-09-14 12:49:29 +08:00
ef5e4e9180 chore(06): mark superseded 06-01/06-02 summaries per D-29 2026-09-14 12:42:13 +08:00
85f7b1053b fix(06): restage all plans per D-43 (component -> combination -> integration), drop tracer-first 2026-09-14 12:34:49 +08:00
feb2f8181d docs(06): create phase plan 2026-09-14 11:16:56 +08:00
fe4e410cf4 fix(06): revise plans based on checker feedback 2026-09-14 11:04:33 +08:00
384e5673ad docs(06): capture phase context 2026-09-14 10:33:56 +08:00
8b1297ad95 docs(state): record phase 6 context session 2026-09-14 10:02:15 +08:00
b59f8783d5 docs(06): capture phase context 2026-09-14 10:01:55 +08:00
bcac8a97e4 docs(06-02): complete enemy top-level implementation unit test plan 2026-09-14 09:10:05 +08:00
7b956705d3 test(06-02): cover map damage views, converter and reducer
- Zone/Repulse/Laser/Between/Ambush views: range params, damage info, guards
- MainMapDamageConverter: per-special view order and laser face lookup
- MainMapDamageReducer: sum, max-damage type and catch/repulse union
2026-09-14 09:06:59 +08:00
b36a4ee8a9 test(06-02): cover aura converters and special registration
- CommonAura/CommonAuraConverter: range selection, buff math, capabilities
- GuardAura/GuardAuraConverter: 3x3 range, guard locator registration, own-locator and missing-source no-ops
- registerSpecials: code 0-27 registered once, guard default, name/description generation
2026-09-14 09:05:34 +08:00
5b76cf4dc9 test(06-02): cover damage calculator, final effect and comparer
- MainDamageCalculator: base, defeat, all special branches, guard recursion/warn 137, negative-damage flag, critical limit
- MainEnemyFinalEffect: solid/mimic/unchanged branches and priority
- MainEnemyComparer: base attributes, special count/code/value deep equality
2026-09-14 09:04:23 +08:00
50d868760a docs(06-01): record plan self-check 2026-09-14 08:55:21 +08:00
6cf828c9cc docs(06-01): complete combat layer-2 unit test plan
- record 06-01-SUMMARY.md with coverage block and three suspected-bug findings
- advance STATE.md to plan 2, log decisions and execution metric
- mark ROADMAP phase 6 at 1/9 In Progress and TEST-01 complete
- open WINDOWS.md entries for the three documented skipped tests
2026-09-14 08:54:37 +08:00
6c8f85a2be test(06-01): cover CombatFlow binding, script ordering and guards
- add combat.test.ts for same-state binding, foreign-state warn 138, script priority sort and duplicate warn 140, guard warns 139/141, awaited script/hook ordering with real timers, and battleComputed delegation
- extend the 06-TEST-FINDINGS.md sink with the #06-01-3 before-return semantics row
2026-09-14 08:51:13 +08:00
484da2db19 test(06-01): cover MapDamage and EnemyContext behavior
- add mapDamage.test.ts for sourceless add/delete, sourced conversion, reduction caching, warns 102/103/104 and the #06-01-2 deleteEnemy finding
- add context.test.ts for the enemy registry (register/lookup/unknown-null/delete/resize/scan) and effect-registry add/remove behavior
- extend the 06-TEST-FINDINGS.md sink with the #06-01-2 row
2026-09-14 08:50:05 +08:00
15f329b61d test(06-01): polyfill Map.getOrInsert in combat test harness
- keep the global Map stub uniform across combat test files so modules using
  getOrInsert/getOrInsertComputed load under Node
2026-09-14 08:49:55 +08:00
59b709e43e test(06-01): prove combat damage context/system via tracer
- add damage.test.ts covering DamageContext/DamageSystem results, handler identity, warns 106/107, cache invalidation, with(hero) and calculateCritical
- declare api-coverage in COVERAGE.md for the test-only phase
- open the shared 06-TEST-FINDINGS.md sink with schema and #06-01-1 finding
2026-09-14 08:45:34 +08:00
3bcf2fc407 chore(state): sync planning state after phase 6 plan 2026-09-14 08:31:01 +08:00
22726773ad docs(06): create phase plan 2026-09-14 08:30:40 +08:00
e1a16eae8b docs(state): record phase 6 context session 2026-09-14 07:36:06 +08:00
6a3179b76f docs(06): capture phase context 2026-09-14 07:35:46 +08:00
257974afac chore(deps): 添加 @types/madge 类型库 2026-09-13 23:38:57 +08:00
c80516deb7 fix(event): 采纳七个内建并修正 touched-jsdoc 门禁
- event.test.ts 与 03-EVENT-CONTRACT.md 同步为七个内建(移除 touchFront/EventTouchFront)

- check-touched-jsdoc 按 dev.md 豁免继承/implements 成员,补充防误删说明

- 刷新 Phase 01-03 验证指纹,三个阶段恢复 passed
2026-09-13 23:38:46 +08:00
a55c2e32a2 test(01): complete UAT - 28 passed, 0 issues 2026-09-13 21:40:01 +08:00
aa3c7296c7 chore: 将事件执行标记为 ignoreReplay 2026-09-13 20:52:42 +08:00
b623e8ac98 fix: 勇士事件移动时不应记录录像 2026-09-13 20:42:48 +08:00
0ba70e1a63 docs(event-contract): sync with current built-in names and collection design
- built-in names: setBlock/moveBlock/removeBlock/moveHero/stepHero/touchFront/
  insertEvents/insertEvent (class names Event*)
- removeBlock: static by default, dynamic:true also removes dynamic tiles
- touchFront: steps the hero forward; the mover produces the OnTouch on bump
- GameEventSystem.collectEvent owns source collection; mover enter/leave/hit reuse it
- IBlockEventEnv gains required system and nullable heroFloor; utils.ts keeps only
  getPossibleMap/getPossibleLayer
2026-09-13 20:40:15 +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
d7837fcc24 docs: sync event/replay contracts with current design
- 03-EVENT-CONTRACT.md: short built-in names, class-based BuiltInFunction,
  single createEventRegistrations(), event/utils.ts (not barrel-exported)
- 03-REPLAY-CONTRACT.md: BaseReplayCommand shape, Teleport code, numeric fixed
  params, move notExecuted batching, CoreState registerReplayCommands, 2001-2008
- scope quick 260913-qtq record to AI changes only
2026-09-13 19:24:54 +08:00
e5f6d492b2 docs(quick-260913-qtq): event built-ins refactor and anon-tokyo import rename 2026-09-13 19:20:24 +08:00
f0fd2f54a1 refactor(event): class-based built-ins, shared utils, single registration
- rewrite every built-in as EventXxx implements BuiltInFunction<P, E>
  (setBlock/moveBlock/deleteBlock/moveHero/moveHeroStep/touchFront/
  insertEvents/insertEvent), matching the EventSetBlock reference style
- move shared helpers to event/utils.ts (getPossibleMap, getPossibleLayer,
  getEventExecutor, enter/exitEventInsert); utils is not exported via index
- move per-class helpers into private methods (EventTouchFront and
  EventInsertEvents collectInvocations)
- use IObjectMover.push for move sequences instead of manual step calls
- registrations.ts: one createEventRegistrations() writing the eight entries
  in order, categories separated by single-line comments
- remove EventBuiltinName; classes own short string names
- update event tests; core.ts uses createEventRegistrations
2026-09-13 19:17:32 +08:00
a701aa6da9 refactor(anon-tokyo): import embedded workspace package everywhere
- rename all anon-tokyo imports to @motajs/anon-tokyo in data-common,
  data-system and data-state
- declare @motajs/anon-tokyo workspace dependency in data-common and
  data-system; refresh pnpm-lock.yaml
2026-09-13 19:17:21 +08:00
5a05eecad1 wip(event): scaffold EventSetBlock class, utils helpers, anon-tokyo workspace dep
- data-state: add @motajs/anon-tokyo workspace dependency
- map.ts: new EventSetBlock BuiltInFunction class (reference style)
- utils.ts: getPossibleMap/getPossibleLayer helpers (not yet wired)

Checkpoint of user-authored in-progress event refactor.
2026-09-13 19:04:25 +08:00
b86a060759 feat: 移动器新增 push 方法 2026-09-13 19:01:57 +08:00
ef58f79518 feat: 将 anon-tokyo 内嵌到项目中 2026-09-13 18:49:29 +08:00
46a38fa0c6 refactor: 录像系统指令 2026-09-13 16:38:19 +08:00
dd4e66a335 refactor(replay): rewrite remaining commands and register in CoreState
- ReplayUseItemCommand / ReplayEquipCommand / ReplayUnequipCommand now extend
  BaseReplayCommand with fixed numeric params and per-false-position logger
  error codes (2006-2010); string item/slot params removed, autoUnload is a
  required bool.
- remove isNumber/isItem/isBoolean/isSlot/resolveSlot helpers; all logic now
  lives in the command classes.
- drop createReplayCommandItems/registerReplayCommandItems; CoreState owns a
  private registerReplayCommand() registering the eight stable codes directly.
- prune unused replay boundary types from replay/types.ts.
- fix ReplaySandbox: a replay ending on a run of moves now finalizes the
  trailing run through notExecuted (previously the last move never started).
- rewrite commands.test.ts for the base-class design and direct registration.

Verified: data type gate 0 in-scope; vitest 19 files / 112 tests pass; prettier
and eslint clean on touched files.
2026-09-13 15:39:12 +08:00