Minecraft PC IP: play.cubecraft.net

Smoothlyy

Forum Expert
Mar 28, 2019
407
3,020
264
USA
Hey! So today I am showing you guys what I made for my coding class! We were tasked with making a text-based game like Dungeons and Dragons. Mine is very basic and I think I can add a lot more. This is my final project. This is made in Python by the way. Sorry if this looks weird/the formatting is bad, I tried my best :)


Tags: @Riley @NotGingerGeek @Sulphate
 
Last edited:

ItzEnd3r

Forum Expert
Aug 18, 2019
1,353
3,931
384
19
Boulder
www.cubecraft.net
Hey! So today I am showing you guys what I made for my coding class! We were tasked with making a text-based game like Dungeons and Dragons. Mine is very basic and I think I can add a lot more. This is my final project. This is made in Python by the way. Sorry if this looks weird/the formatting is bad, I tried my best :)
Code:
#The Maze
beginning = print("Hello! Welcome to the Maze...")
goal = print("You will have to reach the end of the maze, you can do this by entering the many rooms of the maze")
powerups = print("Powerups are available to assist you in completing the maze..")
maze = print("One of the rooms will contain a key to unlock the door to freedom...")
attackordefend = print("If you are given a sword, you have two options, attack or defend")
room = eval(input("Press 1 to begin playing!"))
if room == 1:
    print("You have entered Room 1, you will have to fight the Spider Boss, you have picked up a sword")
attack = eval(input("You will now begin to fight the boss, press 1 to attack the boss, and press 2 to parry the bosses's attack"))
if attack == 1:
   attackordefend = eval(input("You have successfully dealt 100 damage to the Spider Boss, press 3 to parry, and press 4 if you would like to keep attacking"))
if attackordefend == 3:
    print("Your parry was unsuccessful and you have died!")
if attackordefend == 4:
    print("Your attack was successful, you may proceed to the next room!")
if attack == 2:
    print("Your parry was unsuccessful and you have died!")
else:
    print("Please try a different number choice!")
def player_health(health):
    print((health) + (50))
attackordefend_2 = print("If you are given a sword, you have two options, attack or defend")
room_2 = eval(input("You have now completed the first room, press 2 to continue playing.. You have to collect a key to the next room, but you have to kill the Zombie Boss in order to get it"))
if room_2 == 2:
   attackordefend_2 = eval(input("In order to proceed to the next room you must beat the Zombie Boss, there may be some powerups that assist you...press 1 to attack the Boss, press 2 to parry the Bosses' attack"))
if attackordefend_2 == 1:
    print("You have successfully defeated the Zombie Boss, pick up the key to next room and proceed")
if attackordefend_2 == 2:
    eval(input("The Boss has attacked you and done 100 damage to you, press 5 if you would like to use a healing powerup and attack the Boss again"))
    def player_health(health):
        print((health) + (50))
        return health
    print("You have now regenerated 50 health!")
    attackordefend_2 = eval(input("Press 7 to continue your attack, or press 8 to parry the Bosses' attack"))
if attackordefend_2 == 7:
    print("Your attack was successfull and you have beat the Zombie Boss, please pick up the key and proceed to the next room")
if attackordefend_2 == 8:
    print("Your parry failed and you died! Please try again!")
def player_strength(strength):
    print((strength) + (50))
attackordefend_3 = print("If you are given a sword, you have two options, attack or defend")
room_3 = eval(input("You have now completed three rooms.. Now awaits the final room... Press 3 to continue"))
if room_3 == 3:
    attackordefend_3 = eval(input("You will need to beat the Snake Boss in order to reach freedom, Be careful the Snake Boss is very strong and quick! Press 1 to attack"))
if attackordefend_3 == 1:
    eval(input("Before you attack, I recommend you use a strength powerup, press 5 to use the powerup"))
    def player_strength(strength):
        print((strength) + (50))
        return strength
    print("You will now give 50% more damage!")
    attackordefend_3 = eval(input("Press 6 to continue attacking!"))
if attackordefend_3 == 6:
    print("You have successfully beaten the Boss, please pick up the key and proceed.")
freedom = eval(input("You have now reached the End of the maze, press 1 if you would like to exit the maze"))
if freedom == 1:
    print("You may now exit the Maze! Thank you for participating!")

Tags: @Riley @NotGingerGeek @Sulphate
I made one of these in 7th grade it was so much fun. but this is cool, I hope you stick with it because you can get into a lot of awesome projects.
 

Andyyy

Forum Expert
Dec 7, 2016
1,038
2,065
308
21
Blockwars
You can use trinket.io to host python code. Just sign up and save your code. You can generate a sharable link to play it!
 
  • Like
Reactions: Smoothlyy

Fesa

Quality Assurance
Team CubeCraft
🧪 Quality Assurance
💌 Customer Support
Oct 17, 2016
1,512
4,096
349
Yoitsu
Pronouns
She/Her
Did you use any import commands at the beginning? I’d really like to try it out!
You can use trinket.io to host python code. Just sign up and save your code. You can generate a sharable link to play it!
This might be easier?
 

Fesa

Quality Assurance
Team CubeCraft
🧪 Quality Assurance
💌 Customer Support
Oct 17, 2016
1,512
4,096
349
Yoitsu
Pronouns
She/Her
The code they have written requires no imports. Just plain ol' Python 3 :)
Ah, amazing! I know what I’m doing in the morning!
 
D

Deleted member 469419

Guest
Didn't know that you was computing student! The code itself look amazing, I would like to studying it soon!
 
Members Online

Team online

Latest profile posts

NADER KANAAN wrote on jamesthesignificant's profile.
ty for the following !!!
jamesthesignificant wrote on NADER KANAAN's profile.
have a totally epic birthday!!! 🎈
IAmEclipsy wrote on CalvinxKlein's profile.
Happy birthday!
CrystalLegend01 wrote on NADER KANAAN's profile.
Happy Birthday!
coolzombiee wrote on NADER KANAAN's profile.
Happy birthday!
Top Bottom