Commit Graph
5 Commits
Author SHA1 Message Date
西风逍遥游 7f4818075b fix(script): preserve ECS bindings across full composition 2026-09-02 08:35:51 +08:00
西风逍遥游 63246b8c68 fix: complete architecture consolidation contracts 2026-08-28 00:01:55 +08:00
西风逍遥游 a8b8e83128 refactor: consolidate engine architecture contracts 2026-08-27 12:54:48 +08:00
西风逍遥游 fa18e77b75 weapon: multi-form weapon system (kind/resource/stage) + P0 combat features
Generalize the weapon module from gun-only into a data-driven, cuttable
multi-form system supporting hot / melee / magic / missile weapons for
RPG / RTS / ARPG.

Core (WeaponTypes.h / WeaponSystem.cpp):
- WeaponKind (melee/ranged/magic/missile/custom) selects the attack form.
- AttackResource gates triggers by ammo/mana/charges/stamina/none.
- AttackStage machine (Idle->Windup->Active->Recover) replaces the hard-coded
  reload/burst path for non-ranged forms; hot weapons keep the mature pipeline
  so ranged behavior is byte-identical (regression baseline).
- IWeaponLogic gains begin/channel/end hooks (default no-op, backward compat).
- AttackRequest generalizes FireRequest (target handle, arc, aoe).
- WeaponRigEntity for hand-held weapons; WeaponMountEntity (turret) unchanged.

P0 combat features (data fields + event payloads, no arch change):
- Multi-pellet (shotgun), spread bloom, recoil model, runtime fire selector
  (safe/semi/auto), shared ammo pool (AmmoPoolEntity), damage type/element,
  ADS/zoom with aim_in/aim_out events.

Docs: 通用武器系统设计.md, 武器系统-对比Unity插件-差距分析.md.
Tests: test/weapon.cpp grows to 25 cases / 210 assertions, all passing.
2026-08-25 22:15:01 +08:00
西风逍遥游 cf10c46bb5 feat(weapon): add generic weapon module (defs, entities, mounts, fire logic) 2026-08-23 18:30:52 +08:00