Skip to content

modules: combat, protection as a lifetime - #8522

Draft
keithharvey wants to merge 1 commit into
transferfrom
combat
Draft

modules: combat, protection as a lifetime#8522
keithharvey wants to merge 1 commit into
transferfrom
combat

Conversation

@keithharvey

Copy link
Copy Markdown
Collaborator

Protect(unit) sets a damage floor and makes the unit neutral, so attackers advance on the objective instead of parking on something invulnerable. Until(condition) arms its release when the protection is applied, not at load — a bound that already passed can no longer strand a unit protected forever.

AllowWeaponTarget is deliberately not used: it only fired for the three gadgets it would have clobbered, and never for ordinary weapons.

(reopened from #8493: construction now sits below transfer, and GitHub cannot retarget a base inside a stack.)

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Integration Test Results

20 tests  ±0   8 ✅ ±0   16s ⏱️ ±0s
 1 suites ±0   8 💤 ±0 
 1 files   ±0   4 ❌ ±0 

For more details on these failures, see this check.

Results for commit 82eaef6. ± Comparison against base commit ac06956.

♻️ This comment has been updated with latest results.

@keithharvey
keithharvey marked this pull request as draft July 28, 2026 19:39
@keithharvey keithharvey changed the title modules: protection as a lifetime modules: combat, protection as a lifetime Jul 28, 2026
@keithharvey keithharvey mentioned this pull request Jul 29, 2026
A mission can make a unit survivable: Protect(unit) sets a damage floor
and makes it neutral, so attackers stop acquiring it and advance on the
objective instead of parking on something invulnerable. Until(condition)
bounds that protection, and the release arms when the protection is
applied rather than at load — a bound that already passed can no longer
retire the release before it exists and strand a unit protected for the
rest of the mission. Protection refcounts, because overlapping lifetimes
are expressible once Until is a lifetime.

AllowWeaponTarget is deliberately not used. It fires only for weapons
some gadget registered with SetWatchAllowTarget, which combat never did,
so it never ran for ordinary weapons — and the handler is last-writer-
wins with no nil filter, so joining at layer 100 would have discarded
every other gadget's target priority whenever anything was protected.
Neutrality does the job per-unit without touching a shared toggle.

The roster arrives with it: a mission declares its units once, and the
loader spawns them and binds the names triggers refer to. Missions grows
a modules list because a module's vocabulary comes from its manifest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant