#side Missile-Lunatic #color f99 #author Warren March 4 2002 (Devon 20020508) old rule-change updates (Devon 20020617) Removed focus arguments in missile Don't give a drunken sailor the materials he needs to make a Molotov cocktail! #type Missile #color f44 #hardware processor 5 ;c 20 energy 50 50 ;c 55 engine .1 ;c 100 solar-cells 0.015 ;c 27 robot-sensor 15 ;c 90 armor 80 ;c 80 shield 0.1 ;c 50 bomb 2000 ;c 200 #code engine-max-power engine-power! do fire-robot-sensor sync robot-found if robot-position position v- engine-velocity! engine-max-power engine-power! energy 30 > if max-shield shield! else 0 shield! then else 0 shield! energy 30 speed 100 * - < if ;unstable: move or sit still 0 engine-power! sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync else engine-max-power engine-power! energy 0.003 * 0.1 min speed 0.01 > if velocity angle else random-angle then polar-to-rect engine-velocity! then sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync sync ;no enemies. Save energy. then robot-distance 1.5 < if die then sync sync sync sync forever #type Lunatic Copied from Devon's lunatic. #color ff0 (Devon 20021028) Don't circle unless damaged, to save energy. Other hardware changes. #hardware processor 10 engine .15 ;big engine armor 200 repair-rate .1 solar-cells .4 constructor .4 energy 60 10 #code #var dir #var increment random-angle dir! 0.15 0.3 random 0 1 random-int -1 1 ifev * increment! max-repair-rate repair-rate! do armor max-armor < if dir increment + dir! 1 dir polar-to-rect engine-velocity! engine-max-power engine-power! else 0 engine-power! then constructor-type nif 1 2 random-int constructor-type! then energy 50 > constructor-max-rate 0 ifev constructor-rate! forever #end