Thanks to Trent. Here is the improved patch for robotd. > > This is the correct fix: > > > > - if(!(pl->pl_flags & PLAGRI) || me->p_armies >> > 5){ > > + if(!tpl || !(tpl->pl_flags & PLAGRI) || > > me->p_armies < 5){ Hi. Although logically that is correct. It is real tough to figure out what that if statement means! I split it apart and re-wrote it in the attached patch. Hopefully you like it. > There are no acceptable enemy planets -> look for > ind ones (*) > The closest enemy planet is agri and I have five > or more armies -> skip > looking for neut planets, the agri take is better > All other cases, look for nuet planets and take > them before enemy planets Only a person who has played netrek heavily for many years would know that logic is correct. If it were me, I'd go for neut planets first over agris. And this is why I couldn't figure out what Hadley was getting at. Didn't get a chance to play test it. But it compiles fine. I'll send an e-mail out tommorrow if I find something wrong with the play testing. Jimmy -------------- next part -------------- A non-text attachment was scrubbed... Name: robotd-fixes.dpatch Type: application/octet-stream Size: 8120 bytes Desc: 2572339651-robotd-fixes.dpatch Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20060518/36f60054/attachment.obj