Introducing TI, a Basic rogue-like.

The game is text based, and your fate is up to RNG.

Here is the Github.

Here is the source code

TIROGUE

Code:
startTmr->T
int(.01randAns->S
Ans->rand
10->B
round(seq(1.6X,X,1,B),0->|LFLT
round(.1AnsrandInt(7,10,B),0->|LATK
min(2,|LATK(1->|LATK(1
round(.1|LFLTrandInt(7,10,B),0->|LDEF
round(seq(5*1.8^(X),X,1,B),0->|LCOS
round(.1AnsrandInt(8,12,B),0->|LACO
round(.1|LCOSrandInt(8,12,B),0->|LDCO
round(.1|LFLTrandInt(8,12,B),0->|LWAT
round(.1|LFLTrandInt(8,12,B),0->|LWDE
2|LFLT->|LCOI
round(6-3rand,0->H
round(1.25Ans,0->I
round(32-4rand,0->Q
min(6,max(4,round((Ans)/4rand,0->P
{1,0,10,10,15->|LSTT

DelVar F

Repeat F=B or not(|LSTT(3)
   F+1->F
   ClrHome
   Output(1,1,"FLOOR "+eval(F
   Output(1,10,"/SHOP/"
   5->C
   Repeat K=105 and C=9
      Output(1,17,eval(|LSTT(5))+" COINS  "
      Output(2,2,"SWORD ("+eval(|LSTT(1))+")"
      Output(2,14,"SHIELD ("+eval(|LSTT(2))+")"
      Output(3,2,"HEALTH: "+eval(|LSTT(3))+"/"+eval(|LSTT(4))
      Output(5,3,eval(|LATK(F))+" ATK SWORD - "+eval(|LACO(F))+" COINS   "
      Output(6,3,eval(|LDEF(F))+" DEF SHIELD - "+eval(|LDCO(F))+" COINS"
      Output(7,3,"HEAL "+eval(I)+" - "+eval(H)+" COINS"
      Output(8,3,"+"+eval(P)+" MAX HEALTH - "+eval(Q)+" COINS"
      Output(9,3,"EXIT SHOP"
      
      Output(C,1,">
      DelVar K
   Repeat Ans:getKey:End
      Ans->K
      Output(C,1,"
      C+(K=34)(C<9)-(K=25)(C>5->C
      If K=105:Then
         If C=5 and |LSTT(1)!=|LATK(F) and |LSTT(5)>=|LACO(F:Then
            |LSTT(5)-|LACO(F->|LSTT(5
            |LATK(F->|LSTT(1
         End
         If C=6 and |LSTT(2)!=|LDEF(F) and |LSTT(5)>=|LDCO(F:Then
            |LSTT(5)-|LDCO(F->|LSTT(5
            |LDEF(F->|LSTT(2
         End
         If C=7 and |LSTT(3)!=|LSTT(4) and |LSTT(5)>=I:Then
            |LSTT(5)-I->|LSTT(5
            min(|LSTT(4),|LSTT(3)+H->|LSTT(3)
         End
         If C=8 and |LSTT(5)>=Q
         |LSTT+{0,0,P,P,~Q->|LSTT
      End
   End
   DelVar W
   Repeat not(|LSTT(3)) or W=3
      W+1->W
      ClrHome
      Output(1,1,"FLOOR "+eval(F
      Output(1,19,"WAVE "+eval(W)+"/3
      Output(2,2,"SWORD  ("+eval(|LSTT(1))+")"
      Output(3,2,"SHIELD ("+eval(|LSTT(2))+")"
      
      If W<=2
      round({.3|LWAT(F),.2|LWDE(F),.7|LWDE(F),.7|LWDE(F)},0->|LWAV
      If W=3
      round({.4|LWAT(F),.3|LWDE(F),.75|LWDE(F),.75|LWDE(F)},0->|LWAV
      
      If |LWAV(1)<=|LSTT(2) and |LWAV(2)>=|LSTT(1)
      max(0,|LWAV+{1,~1,0,0->|LWAV
      
      Output(2,16,eval(|LSTT(5))+" COINS  "
      Output(7,3,"ENEMY STATS: "
      Output(10,4,eval(|LWAV(1))+" ATK"
      Output(10,15,eval(|LWAV(2))+" DEF"
      
      Repeat not(|LSTT(3)) or not(|LWAV(3
         Output(3,16,"HP: "+eval(|LSTT(3))+"/"+eval(|LSTT(4))+"  "
         Output(9,6,"HEALTH: "+eval(|LWAV(3))+"/"+eval(|LWAV(4))+"  "
         Output(5,10,"-ATTACK-"
         Pause
         max(0,|LWAV(3)-max(0,(|LSTT(1)-|LWAV(2->|LWAV(3
         If |LWAV(3
         max(0,|LSTT(3)-max(0,(|LWAV(1)-|LSTT(2->|LSTT(3
      End
      round(|LSTT(5)+|LCOI(F)max(.8,min(1.2,.3+rand)),0->|LSTT(5
   End
End
Nice work, but are you planning on developing this further? Would be nice to see more features.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement