• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Pick Weakest Unit

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,296
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