#side Missile Bacteria Bacteria with some small defensive missiles. Experimental. #author Devon #color AFA #seed 2 #type Cyanobacterium #color 0FF #hardware solar-cells .18 constructor .18 armor 10 processor 1 #code do constructor-type nif 1 2 random-int constructor-type! then constructor-max-rate constructor-rate! forever #type Escherichia #color 970 (20030418) Bigger eater and constructor. Flee away from shot as well as parallel to it. (20030428) Wander more locally. Scan for food more often. #hardware eater 1.5 constructor 1 energy 200 10 armor 90 processor 8 food-sensor 6 shot-sensor 5 engine .02 #code #vector dest #const wander-range 40 new-dest: position swap dup wander-range - 0 max swap wander-range + world-width min random swap dup wander-range - 0 max swap wander-range + world-height min random dest! return construct: constructor-type if energy 180 constructor-remaining 20 - min >= constructor-max-rate 0 ifev constructor-rate! else energy 180 > if 1 3 random-int constructor-type! constructor-max-rate constructor-rate! then then return #start main: new-dest do eaten nif time food-sensor-time 50 + >= and-if fire-food-sensor sync then food-found if food-position seek-location else position dest 5 in-range if new-dest then dest seek-location then energy 10 > if time shot-sensor-time 10 + >= and-if fire-shot-sensor sync shot-found run& ifg then construct forever run: shot-velocity unitize position shot-position v- unitize v+ 15 vs* position v+ 0 max world-width min swap 0 max world-height min swap dest! do dest seek-location construct position dest 4 in-range until-loop main& jump #type small defensive missile #color 90F #hardware bomb 1000 engine .1 energy 60 10 solar-cells .025 armor 50 processor 5 robot-sensor 6.5 shot-sensor 6 #code #vector target #start idle: 0 engine-power! do shot-sensor-time 11 + time <= if fire-shot-sensor sync shot-found if found-shot: shot-velocity unitize -16 vs* shot-position v+ target! do target seek-location robot-sensor-time 20 + time <= if fire-robot-sensor sync robot-found charge& ifg then position target 2 in-range until-loop 0 engine-power! then then robot-sensor-time 28 + time <= if fire-robot-sensor sync robot-found charge& ifg then forever charge: do robot-distance-overall 2 < if die sync then robot-position robot-velocity seek-moving-location robot-sensor-time 20 + time <= if fire-robot-sensor then sync robot-found energy 5 > and while-loop idle& jump #end