• 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.

Pick Weakest Unit

Status
Not open for further replies.

Dr Super Good

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