diff options
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] |