Re: Contest 2 Update:
- Posted by Patrick Barnes <mrtrick at gmail.com> Nov 30, 2004
- 592 views
On Tue, 30 Nov 2004 08:11:05 -0800, Andy Serpa <guest at rapideuphoria.com> wrote: > > > Also if it was set up without the attack going first I could very easily > > > program a bot to simply move to any safe surrounding area if I could be > > > attacked by more than one unit this turn. Which would mean in > > > order to kill any one of my units you would have to corner him first > > > with no possible move to a safe area. > Yeah, I sort of liked that idea. More room for strategy. Only long & boring > matches with dumb & boring bots. It could lead to bots playing sacrifices by > baiting the opponent and all sorts of interesting stuff. Plus anticiptory > attacks take care of part of the escape issue becuase you could attack the escape > square before as he was about to go there. Oh well... My 'slightly-smart' drones *are* incompetent, but it takes a long long time for matches to finish already. If players are exploiting the escape ability, it'd take even longer... > Hey, can we have the directional contants DIR_E, DIR_NW actually *be* the > directions, i.e {1,0},{-1,-1} instead of just the numbers 1-8. Now everyone will > have to right a routine just to convert one to another to send orders... There is a new constant in constants.ew called offset, who's elements correspond to the directions. So it's easy:
for d = 1 to length(offset) do temp = units[h][POS] + offset[d] temp = arena[temp[1]][temp[2]] if temp > 0 and units[temp][ID] != metrics[IDENTITY] then orders = append(orders, {h, ATTACK, d} ) --note, still uses the number end if end for
-- MrTrick