#!/usr/bin/env python ##By Eugene Meidinger ##3-hour game made for the 48 comp LD 11 ##Licensed under GPL v3 def main(): hot=False veryhot=False base=False plants=False working=True added=[] itemlist=["tears","fire","pebble","log"] start={"tears":("You wish to start a world of sadness.\n The form of remorse \nhas naught to hold it and so it \n spreads outward into nothingness.\n You have failed.",1 ), "fire":("Your world begins\n in fire and destruction;\n however, long life can come from a painful birth.",0), "pebble":(" A tiny pebble,\nnow of great importance,\n forms the start of your bold world.",0), "log":("An old mighty log,\n once a thing of life,\nis now to be the start of new life.",0)} cooltext="The drops of sadness cool the world." coolfail="Your world burns too hotly,\n too painfully to be calmed by healed pain." gentears="Salty tears fill the world and make the seas.\n New oceans churn in the form of living regret." basefail="The sadness has naught to hold it in and so it spreads outward into nothingness. You have failed." pebbase="A meager\n pebble\n\nfalls\n\n to\n the center and forms a core for your world.\n It now stands proudly." genpeb="A humble pebble is tossed, bouncing onto your world." heatfail="Your world is ablaze with fury. Nothing can live here. You have failed." hotfire="Your world is consumed in flames and becomes hot like anger." genfire=" Fire strikes your world.\nIt is hot but your world is safe." coreburn="Oh no! Your core is flamable and has no guardian.\n It burns through!" superhot="Oh no! You have fed the flames.\nYour world burns harder!" planttext=" My goodness!\n There was some life in that rotting log!\nPlants spread across the lands." genlog="An old rotting log tumbles to the ground\n stiffly, too proud to bend." plantwin="You have done the best that you could.\nYour world is filled\n with life.\nIt is a suitable home for a new race." basefail2="Your world lacks a center to unite it.\n You have failed." genwin="Your world is good enough. It could be better but be proud." genfail="Something has gone wrong. You have failed." introtext= """ You are a God. A Lesser God. A very Lesser God. You wish to make a world but all you have are scraps. Type help for guidance or quit to give up.""" helptext="""Add items in the right order. you have once chance to make something great. You have tears of a great falcon and fire of ancient hate. You have a humble pebble and a rotting log. These are your tools. Use them wisely.""" print introtext while working: #get input input=str(raw_input("What do you add? >")).lower() #he quits if input=="quit": working=False #get help elif input=="help": print helptext elif not input in itemlist: print input + " is not something you have. Are you pronouncing it right?" else: added.append(input) itemlist.remove(input) #first item if len(added)==1: wt,fail=start[input] print wt working= not fail if input in ["pebble","log"]: base=True #added water elif added[-1]=="tears": if hot: if veryhot: print coolfail else: print cooltext hot=False elif "log" in added: print planttext plants=True #nothing interesting else: print gentears #Nothing to hold the water if not base: print basefail working=False #adding fire elif added[-1]=="fire": if not "tears" in added: hot=True if added[0]=="log": print coreburn base=False else: print hotfire else: print genfire #adding pebble elif added[-1]=="pebble": if not base: base=True print pebbase else: print genpeb elif added[-1]=="log": if hot: veryhot=True print superhot else: print genlog #last item if len(itemlist)==0: if working: if veryhot or hot: print heatfail elif not base: print basefail2 elif plants: print plantwin else: print genwin else: print genfail working=False raw_input("Enter anything to end.") if __name__=="__main__": main()