• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Pick Weakest Unit

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Firstly by difining what weak means.

If you mean lowest approximate duribility then you use the simple minimum algerthim for on the sum of health and shield for all units to select from.

Basically if there is 1 or more valid units to effect, get the first one and then note it as the lowest. The compare the second (if one exists) to the lowest and if it is lower, make it the lowest. Repeat until all units are checked and you will have your lowest.
 
Status
Not open for further replies.
Top