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:
@@ -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,
|
||||
|
||||
@@ -638,6 +638,7 @@ public sealed record CardInstanceDto(
|
||||
int? MaxAttackRange,
|
||||
bool CanMove,
|
||||
bool CanAttack,
|
||||
bool AttackRequiresLos,
|
||||
int ExtraAttacksRemaining,
|
||||
bool CanBeAttacked,
|
||||
string? AbilitiesJson,
|
||||
|
||||
Reference in New Issue
Block a user