Skip to content

Engine-wide hostility semantics: kind='npc' opponents are invisible to every live-hostile predicate (end_combat guard, combat_left_hanging, #1645 nudge) #1655

Description

@100yenadmin

Tracked known-hole from #1654's codex round (per the §9.2 known-hole SLA). The engine's canonical 'living hostile' predicate is MONSTER-ONLY (kind=='monster', hp>0, not dead) — in end_combat's warning guard, the combat_left_hanging obligation cue, and now the #1645 closure nudge (all consolidated on _living_hostiles). A combat whose opponents are kind='npc' (hostile guards, canon NPCs in initiative) reads 'zero living hostiles' the whole fight: end_combat warns spuriously, and the #1645 nudge fires DURING a live NPC fight (false 'close it' pressure). The inverse naive fix (count all NPCs) breaks worse — companions are kind='npc' IN the order. Correct fix needs a HOSTILITY marker on combatants (order-entry flag or Character field) — an engine-wide additive schema decision, out of #1654's scope. GUARDED MEANWHILE BY: the demo fixture's foes are all spawned monsters (Goblin Boss + goblins), so the demo path never hits this; the behavioral gate's combat checks key on monsters likewise. Escalate when an NPC-opponent encounter ships.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions