modules: combat, protection as a lifetime - #8522
Draft
keithharvey wants to merge 1 commit into
Draft
Conversation
Contributor
Integration Test Results20 tests ±0 8 ✅ ±0 16s ⏱️ ±0s 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
marked this pull request as draft
July 28, 2026 19:39
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.AllowWeaponTargetis 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.)