'1024 byte "roguelike" (c) 2008, Deveah.
#include "windows.bi"
setconsoletitle "iED (c) Deveah."
randomize timer:width 20,10:dim shared as integer h=9,e=3,a=1,t,z:dim as string i
sub p:cls:locate 1,1:color 15,1:? "It's Extremely Dark.";:end sub
sub w:if int(rnd*e)=1 then color 12,0:locate 10,1:? "AARGH!";:h-=1:endif:end sub
sub k:if e>0 and int(rnd*e)=0 then color 7,0:locate 10,1:? "Haha! Hit!";:e-=1:z+=1:endif:end sub
sub l:if a=4 then cls:color 15,1:? "Escaped!":color 7,0:? "You killed " & str(z) & " mobs!";:endif:end sub
p:color 7,0:? "You can barely see":? "that you're alive...":? "You MUST escape!":sleep:do:if h<1 then cls:color 12,1:? "You died...";:goto j:endif:p:color 4,0:? " H" & str(h) & " L" & str(a) & " E" & str(e):color 15,0:locate 5,10:? "@";:l:if int(rnd*2)=0 then w:else k:endif:if int(rnd*5)=0 and e<5 then e+=1
if inkey$="s" and int(rnd*20)=0 then a+=1:locate 10,1:? "Level " & str(a) & "!";:e=0:h+=4:endif:sleep
loop until multikey(1)
j:sleep