From f20b3a48a14f34def41d823fabb476981ef7055e Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 6 Nov 2024 21:00:56 +0100 Subject: next commit --- Stages/Wintermaul/HUD.gd | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Stages/Wintermaul/HUD.gd') diff --git a/Stages/Wintermaul/HUD.gd b/Stages/Wintermaul/HUD.gd index 5567f77..be2dacb 100644 --- a/Stages/Wintermaul/HUD.gd +++ b/Stages/Wintermaul/HUD.gd @@ -180,12 +180,15 @@ func get_ordered_group_keys() -> Array: var group_b = selection_groups[b] var node_a = group_a[0] var node_b = group_b[0] + var level_a = 0 + var level_b = 0 - return ( - (node_a.attack_range / 8) + node_a.attack_power + node_a.attack_speed - > - (node_b.attack_range / 8) + node_b.attack_power + node_b.attack_speed - ) + for component in node_a.components.values(): + level_a += component.level + for component in node_b.components.values(): + level_b += component.level + + return level_a > level_b ) keys.sort_custom(func(a, b): var group_a = selection_groups[a] -- cgit v1.2.3