But this is what I have:
mob/proc/Attack()
for(/mob/Units/M in oview(1)
if(M.player != usr.player)
var/damage = usr.Attack - M.Defence
M.Health -= damage
var/damage = M.Attack - usr.Defence
usr.Health -= damage
I get the error :
Fighting.dm:2:error: list started here
But that's not what I am posting about. I want to know how to make it automatically choose the one with the highest Defence, and if there is more than one, the highest Health, and if there is more than one with both these, make it random.
I know it's quite a lot, but I bet it is really simple for some of the experts we have on here! You guys are the best!
~GokuSS4Neo~
i know its not what you wanted, but you left out an extra ) in your for statement at the end.