diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-11-06 21:00:56 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-11-06 21:00:56 +0100 |
commit | f20b3a48a14f34def41d823fabb476981ef7055e (patch) | |
tree | 35608bd22ff3ec8d9210747df39186d212aa6ab7 /Stages/Wintermaul/HUD.gd | |
parent | 6f17d6c1d458275e8744d57a7f433cc3eb5434d7 (diff) |
next commit
Diffstat (limited to 'Stages/Wintermaul/HUD.gd')
-rw-r--r-- | Stages/Wintermaul/HUD.gd | 13 |
1 files changed, 8 insertions, 5 deletions
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] |