# MILKING THE MILKY WAY #by me(ada) import os , time , random # current (saved) state currentRoom = "venus" start = True colony = False kill = 0 items = { "venus": ["native statues","crystals", "space spices"], "earth": ["human labour", "corn", "oil"], "mars": ["native art","mars corn","alien labour"] } inventory = [] # colors class bcolors: BLUE = '\033[94m' CYAN = '\033[96m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' MAGENTA = '\x1b[35m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' # separating the text and printing in delay def printer (text = "hello i am the default text", slow=True): for t in text: print(t, end = "", flush= True) if slow == True: time.sleep(random.choice([0.01, 0.05, 0.1, 0.03, 0.02])) else: time.sleep(random.choice([0.001, 0.005, 0.01, 0.003, 0.002])) print() # Defining the "taker" function and setting it up in each of the three spaces below def taker(planet): if any(x in spliti for x in ["get", "grab", "take", "carry", "steal"]): for item in items[planet]: if item in spliti: printer("You stole " + item) inventory.append(item) items[planet].remove(item) # Creating the while-loop while True: if (start == True): printer(bcolors.CYAN +""" . . β€’ πŸ›Έγ€€.β€’. * Β°γ€€.β€’γ€€πŸŒ“γ€€β€’Β°β€’*ΰ©ˆγ€€β€’γ€€ ✯ .β€’γ€€β˜…γ€€* βœ©β€§β‚ŠΛš β€’Β°β€’*ΰ©ˆγ€€β€’γ€€ ✯ π•žπ•šπ•π•œπ•šπ•Ÿπ•˜ π•₯𝕙𝕖 π•žπ•šπ•π•œπ•ͺ 𝕨𝕒π•ͺ βœ©β€§β‚ŠΛšγ€€Β°.πŸ›°Β°β€’ β€’. *ੈ Β·γ€€ .β€’ β˜…πŸš€ *ੈ β€’.๏ .β€’ β€’. πŸͺ β€’ .β€’γ€€*ੈ° β˜…γ€€β€’Β  β˜„. ✩ ๏ ✩ . β€’. *ੈ . β€’. ▁▂▃▄▅▆▇▇▆▅▄▃▂▃▄▆▇▇▆▅▄▇▆▅▄▃▁▂ """, slow=False) printer(bcolors.RED +""" are you ready to steal and kill your way into a colonial empire? """) start = False if (colony == True): printer(bcolors.RED + """ β˜½β‚β™› you won!now you are a wealthy colonialist β™›β‚β˜Ύ """) exit() # clearing the screen: "clear" for macOS i = input() #os.system("clear") spliti = i.split(" ") # creating an inventory if "inventory" in i: printer("in your spaceship you have " + ", ".join(inventory)) # choices on venus if currentRoom == "venus": if i in ["here","see","view","explore", "where"]: printer("you are currently on venus. ") elif i in ["look", "explore", "dig"]: printer("on venus you can see " + ", ".join(items["venus"])) elif i in ["exit","fly","run","spaceship","leave"]: printer("you fly away from venus in your spaceship.") currentRoom = "earth" else: taker("venus") # the point system. killing adds 30 kills to the player's score. The goal is to reach 120 kills. if i in ["kill","murder","pillage", "colonise", "colonize"]: printer("you are killing many natives. your colony expands.") kill = kill + 30 printer("your kill count is " + str(kill)) # Choices in the neutral zone elif currentRoom == "earth": if i in ["here","see","view","explore", "where"]: printer("you are on earth. look at all the tiny humans, so silly.") elif i in["look", "explore", "dig"]: printer("on earth you can see" + ", ".join(items["earth"])) elif i in ["exit","fly","run","spaceship","leave"]: printer("you fly away from earth in your spaceship. ") i = input("which direction? (north or south)") if i == "north": printer("you are flying to mars") currentRoom = "mars" elif i == "south": printer("you are flying to your home planet, uranus") currentRoom = "uranus" else: taker("earth") # Choices on uranus elif currentRoom== "uranus": if i in ["look","see","view","explore"]: printer("""you arrived on uranus, your home. your emperor marc waves at you.""") elif i in ["look", "explore", "dig"] : printer("on uranus you can see " + ", ".join(items["uranus"])) elif i in ["exit","fly","run","spaceship","leave"]: printer("""you are flying away. bye emperor marc!!""") currentRoom = "venus" # The colony condition, if kills >= 119-> win! If <119-> go kill more. elif i in ["talk","discuss","debate","ask","say"]: printer("hi emperor marc!!") printer("""emperor marc: hi colonist! have you killed enough to lead your colony?""") i = input() if i in ["yes","colony","leader","finish", "end"]: if kill >= 119: printer("""great job colonist! you may go and lead your colony.""") colony = True else: printer("no way! you only killed " + str(kill) + " aliens. go kill and colonise more and then maybe you can lead your own colony one day!""") else: taker("uranus")