Fix highlight accuracy: BFS movement, LOS attack filtering

Movement tiles (_valid_move_tiles):
- Walk: BFS blocked by all occupied tiles (can't walk through units)
- Flight: BFS blocked only by other Flight units (flies over Walk units)
- Jump: Manhattan range, unoccupied only (was already correct)
- Teleport: Manhattan range + LOS to destination

Attack highlights (_attack_range_tiles, _valid_attack_target_coords,
_valid_attack_target_ids):
- Added AttackRequiresLos field to CardInstanceDto / ToCardInstanceDto
- Client now checks _client_has_los() for LOS-required attackers
- Tiles/units blocked by occupants are no longer highlighted as targets

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-04-01 11:19:24 -04:00
co-authored by Claude Happy
parent 1d53f1046a
commit c756b9cffa
3 changed files with 98 additions and 37 deletions
+1
View File
@@ -1473,6 +1473,7 @@ public static class GameEngine
MaxAttackRange : c.MaxAttackRange,
CanMove : c.CanMove,
CanAttack : c.CanAttack,
AttackRequiresLos : c.RequiresLos,
ExtraAttacksRemaining : c.ExtraAttacksRemaining,
CanBeAttacked : c.CanBeAttacked,
AbilitiesJson : c.AbilitiesJson,
+1
View File
@@ -638,6 +638,7 @@ public sealed record CardInstanceDto(
int? MaxAttackRange,
bool CanMove,
bool CanAttack,
bool AttackRequiresLos,
int ExtraAttacksRemaining,
bool CanBeAttacked,
string? AbilitiesJson,