select 5
make dist

:align
gleft
jeq ctdir,cgdir,:start
goto :align

:start
lock 1

:again
scope dist
jeq   ctdir,dist,:attack
face  dist
goto :again

:attack
fire
move
jeq  blockage,1,:stuck
goto :again

:stuck
auto 1
right
right

set dist,10
:wait
add dist,-1
jneq dist,0,:wait

auto 0
goto :again
