#side The Horde #color 0F0 #seed 1 2 #author David and Midnight #code ;I basically combined Midnight's nanobots from Stand Alone Complex with my Massive Beast #type Warboss #color F07 #hardware processor 20 armor 700 engine 0.2 eater 5 energy 800 140 solar-cells 0.05 food-sensor 15 1 blaster 36 29 10 constructor 3 robot-sensor 29 1 repair-rate 0.5 #code #var repeat-time 20 do constructor-progress 0 = if 2 constructor-type! then energy 100 > robot-sensor-time repeat-time + time < and if fire-robot-sensor then robot-found if 5 repeat-time! energy 200 > robot-position position dist 15 < or if robot-position robot-velocity lead-blaster then else 20 repeat-time! then food-sensor-time 20 + time < if fire-food-sensor then food-found if food-position seek-location else time 2500 / floor 2 mod 100 * time 5000 / floor 2 mod 100 * seek-location then energy 400 > if constructor-max-rate constructor-rate! else 0 constructor-rate! then energy 300 > armor max-armor < and if max-repair-rate repair-rate! else 0 repair-rate! then sync forever #type Peon #color 000 #hardware processor 10 armor 10 constructor 0.8 energy 50 5 engine 0.01 food-sensor 5 1 eater 0.9 solar-cells 0.02 #code #vector target #vector ignorefood 0 0 construct: constructor-type nif 0.7 random-bool if 2 constructor-type! else 3 constructor-type! then then energy max-energy / pi/2 * sin constructor-max-rate * constructor-rate! return seek-target: target position 2 in-range if 0 world-width random 0 world-height random target! then target seek-location return #start 0 world-width random 0 world-height random target! max-shield shield! do construct^ eaten if position seek-location else 50 periodic-food-sensor drop friendly-collision if food-found if food-position ignorefood! then seek-target^ else food-found ignorefood food-position v- or and if food-position seek-location else seek-target^ then then then forever #type Grunt #color D11 #hardware processor 10 armor 100 energy 100 50 engine 0.02 solar-cells 0.04 robot-sensor 6 1 grenades 10 3 10 #code #vector target #vector center new-random-target: 0.8 random-bool if -20 20 random -20 20 random center v+ target! else 0.8 random-bool if -30 30 random -30 30 random center v+ target! else 0.8 random-bool if -40 40 random -40 40 random center v+ target! else -50 50 random -50 50 random center v+ target! then then then return seek-target: 911 read 100 + time >= if 912 vread target! then target position 2 in-range if new-random-target^ then target seek-location return attack: do try-calling-reinforcements^ robot-position robot-velocity lead-grenade robot-position position 1 in-range if seek-target^ else robot-position robot-velocity seek-moving-location then grenades-reload-time periodic-robot-sensor drop robot-found while-loop new-random-target^ return try-calling-reinforcements: 911 read 100 + time >= nif time 911 write robot-position 912 vwrite then return #start world-size 2 vs/ center! 20 negate 20 random 20 negate 20 random center v+ target! do seek-target^ 30 periodic-robot-sensor drop robot-found if try-calling-reinforcements^ attack^ then forever #end