游戏可以运行

This commit is contained in:
2026-05-24 10:48:58 +08:00
parent a8c5fb2356
commit 0670598bf4
7 changed files with 71 additions and 21 deletions

View File

@@ -267,11 +267,13 @@ class Game:
opponent = self.battlefield.get_opponent(player)
if unit.zone == "support":
if unit.can_attack and not unit.has_attacked and unit.is_ranged():
if unit.can_attack and not unit.has_attacked:
self.ui.selected_unit = unit
self.ui.target_mode = "attack"
targets = list(opponent.get_frontline_units())
targets.append(("capital", opponent))
targets.extend(opponent.get_support_units())
if unit.is_ranged():
targets.append(("capital", opponent))
self.ui.valid_targets = targets
return
if self.battlefield.can_move_to_frontline(player):
@@ -284,6 +286,7 @@ class Game:
self.ui.selected_unit = unit
self.ui.target_mode = "attack"
targets = list(opponent.get_frontline_units())
targets.extend(opponent.get_support_units())
targets.append(("capital", opponent))
self.ui.valid_targets = targets