Hello, this is my first 20 liner. Creative Feedback is high requested, thanks.
This is a game where you take part in three different battles: Goblin (easy), Thief (medium) and Mage (hard). There is also a xp system that is broken in this version. I'm going to put this up as my offical 20 liner but will later post my full game.
Yourhp=5 : set text font "verdana" : set text size 12 :
_Game:
Randomize timer() : cls : Print "You have " + str$(xp) + "xp!" : Print "Press any key to start a random battle!" : wait key : Battle=rnd(2) : if Battle = 0: gosub _GoblinBattle: : endif : if Battle = 1: gosub _ThiefBattle: : endif : if Battle = 2: gosub _MageBattle: : endif
_GoblinBattle:
wait key : Print "Goblin Battle!" : wait key : Goblin1 = 2+rnd(3) : Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=1+rnd(3): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Goblin has " + str$(goblin1) + " health left!" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(1): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Goblin has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=1+rnd(2) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=rnd(4) : dec Yourhp,aabb : Print "Goblin Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : Yourhp = 5 : gosub _Game: : endif : endif
Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=1+rnd(4): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Goblin has " + str$(goblin1) + " health left" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(2): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Goblin has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=1+rnd(2) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=rnd(4) : dec Yourhp,aabb : Print "Goblin Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : Yourhp = 5 : gosub _Game: : endif : endif
Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=2+rnd(4): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Goblin has " + str$(goblin1) + " health left" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(3): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Goblin has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=1+rnd(2) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=2+rnd(4) : dec Yourhp,aabb : Print "Goblin Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : Yourhp = 5 : gosub _Game: : endif : endif
_ThiefBattle:
wait key : Print "Thief Battle!" : wait key : Goblin1 = 3+rnd(4) : Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=1+rnd(3): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Thief has " + str$(goblin1) + " health left!" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(1): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Thief has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=2+rnd(3) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=rnd(4) : dec Yourhp,aabb : Print "Thief Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : gosub _Game: : endif : endif
Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=1+rnd(4): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Thief has " + str$(goblin1) + " health left" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(2): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Thief has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=1+rnd(2) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=rnd(4) : dec Yourhp,aabb : Print "Thief Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : gosub _Game: : endif : endif
Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=2+rnd(4): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Thief has " + str$(goblin1) + " health left" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(3): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Thief has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=1+rnd(2) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=2+rnd(4) : dec Yourhp,aabb : Print "Thief Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : gosub _Game: : endif : endif
_MageBattle:
wait key : Print "Mage Battle!" : wait key : Goblin1 = 4+rnd(5) : Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=1+rnd(3): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Mage has " + str$(goblin1) + " health left!" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(1): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Mage has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=3+rnd(4) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=rnd(4) : dec Yourhp,aabb : Print "Mage Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : gosub _Game: : endif : endif
Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=1+rnd(4): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Mage has " + str$(goblin1) + " health left" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(2): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Mage has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=1+rnd(2) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=rnd(4) : dec Yourhp,aabb : Print "Mage Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : gosub _Game: : endif : endif
Print "Attack or Defend?" : input battling$ : if battling$="Attack" : aaba=2+rnd(4): dec goblin1,aaba : Print "You Attack dealing " +str$(aaba) + " damage! Mage has " + str$(goblin1) + " health left" : endif : if battling$="Defend" : aaba=rnd(3): dec goblin1,aaba : abaa=rnd(3): inc Yourhp,abaa : Print "You Attack dealing " +str$(aaba) + " damage! Mage has " + str$(goblin1) + " health left! You also healed " + str$(abaa) + " health!" : endif : wait key : if goblin1<1 : Print "It is Dead!" : wait key : Print "You were healed!" : xpgain=1+rnd(2) : inc xp,xpgain : Print "You gained " + str$(xpgain) + "xp!" : Yourhp = 5 : wait key : gosub _Game: : endif : aabb=2+rnd(4) : dec Yourhp,aabb : Print "Mage Attacks dealing " + str$(aabb) + " damage! You still have " +str$(Yourhp) + " health left!" : wait key : if Yourhp<1 : Print "You have died! Want to retry? (y/n)" : input retry$ : if retry$ = "y" : gosub _Game: : endif : endif
P.S. This game was built with DBP but I don't know about it working in DBC