Task #12 follow-up: theft alert for a claimed loose animal

AlertManager.collect() only raised the THEFT alert for a claimed
Status.HOME item; a thief that claimed a loose (Status.LOOSE) animal
raised no alert at all. The acceptance criteria call for loose animals
to behave per the existing theft rules, and the alert is part of that
UX, so treat LOOSE like HOME there too. Added a check to test_targets.gd
's _loose_start confirming a claimed loose animal raises the same THEFT
alert as a penned one (same AlertManager pattern test_roster.gd's
_alerts uses).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-05 15:20:58 -04:00
parent 13efe6603f
commit ffeec30873
2 changed files with 8 additions and 4 deletions

View file

@ -85,7 +85,7 @@ func collect() -> Array[Dictionary]:
continue
var p := Vector2(enemies.pos_x[d], enemies.pos_z[d])
raw.append(_alert(Kind.ESCAPE, enemies.type[d], loot.category[id], p, _escalation(d, p)))
LootSystem.Status.HOME:
LootSystem.Status.HOME, LootSystem.Status.LOOSE:
var d := enemies.resolve_handle(loot.holder[id]) if loot.holder[id] >= 0 else -1
if d >= 0:
raw.append(_alert(Kind.THEFT, enemies.type[d], loot.category[id], loot.position_of(id), 0.0))