15 lines
747 B
Markdown
15 lines
747 B
Markdown
|
|
# js/physics/damage/ — agents.md
|
||
|
|
RC-375D84 S-2. Module map: `MODULES.md`; runtime model: `architecture.md`.
|
||
|
|
|
||
|
|
Installs into `P`: damageBlock, damageEnemy.
|
||
|
|
|
||
|
|
- Central damage accounting: material break points (with the wood/ice/stone hp
|
||
|
|
ladder from constants.MATERIALS) and enemy hp floors. Score and stats counters
|
||
|
|
(`stats.destroyedBlocks`, `stats.destroyedEnemies`, scorePopups) are minted
|
||
|
|
here.
|
||
|
|
- The balance spec (`test/balance.test.mjs`) asserts per-material break budgets
|
||
|
|
and enemy kill budgets under full-power direct hits — that spec is the
|
||
|
|
contract for everything that deals damage. S-4 (RC-375D84, falling-object
|
||
|
|
impact damage) routes through these two functions so it inherits the spec.
|
||
|
|
- Consumes: MATERIALS, ENEMY_TYPES.
|