Print("You start to walk down the path to the mountains until.")ĭrag_appear = random.choice() Print("You start to feel dizzy, so you slow down to a stop and open your eyes to see.") So you close your eyes and spin around and let fate decide.""") Whether to go left or right to the marshlands or the mountains, Print("""You suddenly come across a fork in the path, and cannot make a decision Print("You walk outside your home and head down a path.") If option = "1" or option = "balance" or option = "Balance" or option = "BALANCE":Įlif option = "2" or option = "shop" or option = "Shop" or option = "SHOP" or option = "store" or option = "Store" or option = "STORE":Įlif option = "3" or option = "adventure" or option = "Adventure" or option = "ADVENTURE" or option = "go" or option = "Go" or option = "GO": Option = input("What do you want to do?\n1] See your blance. Print("Health: %i/%i" % (PlayerIG.health, PlayerIG.maxhealth)) Print("Attack Damage: %d" % PlayerIG.attack) I'll ask again later if you want to see them.") If check_input = "y" or check_input = "Y" or check_input = "yes" or check_input = "Yes" or check_input = "1":Įlif check_input = "n" or check_input = "N" or check_input = "no" or check_input = "No" or check_input = "2": Print("Sorry, that does not compute with me! Please try again!")Ĭheck_input = input("Do you want to see your stats %s?\n1] Yes\n2] No\n-> " % PlayerIG.name) Keep in mind that you won't be able to change your name later!") Yes, that's better it has a nice ring to it." % PlayerIG.name)Įlif name_input = "n" or name_input = "N" or name_input = "no" or name_input = "No" or name_input = "2" or name_input = "NO": Option = input("Enter your new name:\n-> ") If name_input = "y" or name_input = "Y" or name_input = "yes" or name_input = "Yes" or name_input = "1" or name_input = "YES": Name_input = input("Do you want to change your name?\n1] Yes\n2] No\n-> ") Print("Personally I would have gone for something like \'SuperAwesomeBattleFighter\' but I guess that's your loss.") Print("Oh nice! That's a cool name %s!" % PlayerIG.name) Print("Hello! What do you want your name to be?") If option = "1" or option = "S" or option = "START":Įlif option = "2" or option = "L" or option = "LOAD":Įlif option = "3" or option = "P" or option = "PROFILE":Įlif option = "4" or option = "E" or option = "EXIT": Print("Welcome to The Ultimate Dragon fighter RPG!") Print("Name:",self.name,"\nHealth:",self.health,"/",self.maxhealth,"\nAttack Damage:",self.attack,"\nMoney:",self.money) STACK THE STATES GAMES HOW TOpy, I will explain later how to save them and load them from a separate directory. Keep in mind that it creates the save file in the same directory as the. STACK THE STATES GAMES CODEI will first post the code (feel free to play with it, but bear in mind that this is only the beginning of the game, and I have not yet started on the fighting and weapons etc.), and I will then post the saving and loading functions. This code works, and I know that there is a more efficient way of coding it, but this is sufficient. I am working on a text-based adventure game and I'm implementing new features, one of these features being saves and loads.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |