diff --git a/scripts/CSharp/Common/Fight/ActionDetails/TargetSelectActionDetail.cs b/scripts/CSharp/Common/Fight/ActionDetails/TargetSelectActionDetail.cs index 85097e9..747ec5e 100644 --- a/scripts/CSharp/Common/Fight/ActionDetails/TargetSelectActionDetail.cs +++ b/scripts/CSharp/Common/Fight/ActionDetails/TargetSelectActionDetail.cs @@ -12,6 +12,7 @@ public class TargetSelectActionDetail : FighterAction.FighterActionDetail // settings public required bool selectEnemy; public required bool selectAlly; + public required bool aliveOnly; public VisualRange visualRange = VisualRange.Single; // result diff --git a/scripts/CSharp/Common/Fight/Actions/AllyAttackAction.cs b/scripts/CSharp/Common/Fight/Actions/AllyAttackAction.cs index e67a7f2..2383f7e 100644 --- a/scripts/CSharp/Common/Fight/Actions/AllyAttackAction.cs +++ b/scripts/CSharp/Common/Fight/Actions/AllyAttackAction.cs @@ -13,7 +13,8 @@ public class AllyAttackAction : FighterAction public TargetSelectActionDetail targetSelect = new() { selectEnemy = true, - selectAlly = false + selectAlly = false, + aliveOnly = true }; public MinigameActionDetail minigameDetail = new(); diff --git a/scripts/CSharp/Common/Fight/AllFightersVisual.cs b/scripts/CSharp/Common/Fight/AllFightersVisual.cs index d015d2b..96f425e 100644 --- a/scripts/CSharp/Common/Fight/AllFightersVisual.cs +++ b/scripts/CSharp/Common/Fight/AllFightersVisual.cs @@ -117,11 +117,13 @@ public partial class AllFightersVisual : Node if (targetDetail.selectEnemy) _fighterVisuals .Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation)) + .Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive .ForEach(kv => kv.Value.SetTargetSelectionActive(true)); if (targetDetail.selectAlly) _fighterVisuals .Where(kv => kv.Key.IsInFormation(HappeningData.allyFighterFormation)) + .Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive .ForEach(kv => kv.Value.SetTargetSelectionActive(true)); }