Compare commits

...

3 Commits

Author SHA1 Message Date
jonathan 6375383373 🐛Made attack selection only select alive enemies 2025-12-11 18:49:51 +01:00
Jonathan b810ea1d9f Merge pull request 'Kampf Tooltip wird ausgeblendet' (#43) from Kampf_Tooltip into develop
Reviewed-on: #43
Reviewed-by: Jonathan <cblech@ymail.com>
2025-12-11 17:29:54 +01:00
jlink fc00559483 Kampf Tooltip wird ausgeblendet 2025-12-10 15:53:55 +01:00
4 changed files with 6 additions and 1 deletions
@@ -168,6 +168,7 @@ theme_override_constants/margin_left = 200
theme_override_constants/margin_right = 200
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
@@ -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
@@ -13,7 +13,8 @@ public class AllyAttackAction : FighterAction
public TargetSelectActionDetail targetSelect = new()
{
selectEnemy = true,
selectAlly = false
selectAlly = false,
aliveOnly = true
};
public MinigameActionDetail minigameDetail = new();
@@ -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));
}