feat(combat): expose threatened squares and movement cost fields for LLM policy
Rename _threatened_squares -> threatened_squares and _enemies_threatening -> enemies_threatening (public read-only API for a future LLM policy), and add reachable_ft(state, budget) and movement_cost_ft(state, target) accessors returning movement costs in feet. Pure exposure: no behavior change, resolution engine untouched, goldens bit-identical.
This commit is contained in:
@@ -256,7 +256,7 @@ class TestThreatenedSquaresLarge:
|
||||
giant = make_combatant("g", size="Large")
|
||||
state = make_state(giant, "p", (2, 2))
|
||||
engine = make_engine([state])
|
||||
threatened = engine._threatened_squares(state)
|
||||
threatened = engine.threatened_squares(state)
|
||||
# Must contain cells adjacent to any of the 4 occupied cells
|
||||
# e.g. (0,2) is at distance 2 from (2,2), should be in
|
||||
assert (0, 2) in threatened
|
||||
@@ -287,7 +287,7 @@ class TestThreatenedSquaresLarge:
|
||||
)
|
||||
state = make_state(combatant, "p", (2, 2))
|
||||
engine = make_engine([state])
|
||||
threatened = engine._threatened_squares(state)
|
||||
threatened = engine.threatened_squares(state)
|
||||
# Ring at distance 2 from each occupied cell is included
|
||||
# (2,2) ring(2) includes (0,2) etc.
|
||||
# (3,3) ring(2) includes (1,3), (5,3), (3,1), (3,5) etc.
|
||||
|
||||
Reference in New Issue
Block a user