Example #1
0
def testInput(ans):
	global entry_string
	set_cursor(0,20)
	while (True):													#msvcrt.getch() grabs keypress events for us.
		keycode = int.from_bytes(msvcrt.getch(), byteorder='big')	#Convert it to an int so we can more easily compare.
		if (keycode >= 97 and keycode <= 122):						#97 = a, 122 = z. Just make sure it's a letter.
			if (len(entry_string) < 15):							#Make sure someone isn't filling up the screen for some reason.
				write(chr(keycode))
				entry_string += chr(keycode)						#Convert from int:keycode to a letter, add to entry_string
				screen_refresh()
		elif (keycode == 8):	#Backspace keycode.
			do_backspace()
		elif (keycode == 13):	#Enter keycode.
			r = submit_entry()
			if (entry_string == ans and r == True):					#If it passed submit_entry, and the answer is the answer we're looking for, return true
				entry_string = ""
				return True
			if (entry_string == "map"):								#If we typed in "map" go back to map.
				entry_string = ""
				return False
			entry_string = ""
			screen_refresh()
		elif (keycode == 27):										#Esc, handle as if "map".
			entry_string = ""
			return False
Example #2
0
def start_tutorial():	#Create fake world, explain how the world works.
	create_tut_world()
	show_tut_world()
	set_cursor(0,0)
	write("Welcome to Insignificance.\nWhat you're looking at right now is the world map.\n")
	puzzles.functions.wait()
	write("\nThe H in the center represents your starting camp. The map is currently bare\nbecause you have yet to explore the world.\n")
	puzzles.functions.wait()
	os.system('cls')
	_g['tworld'][coord(39,12)] = '.'
	_g['tworld'][coord(38,12)] = ':'
	_g['tworld'][coord(38,11)] = '.'
	
	_g['tworld'][coord(41,12)] = '?'
	_g['tworld'][coord(40,11)] = '?'
	_g['tworld'][coord(40,13)] = '?'
	_g['tworld'][coord(39,11)] = '?'
	_g['tworld'][coord(39,13)] = '?'
	_g['tworld'][coord(38,13)] = '?'
	_g['tworld'][coord(38,10)] = '?'
	_g['tworld'][coord(37,11)] = '?'
	_g['tworld'][coord(37,12)] = '?'
	show_tut_world()
	set_cursor(0,0)
	write("Upon completing puzzles, new locations will become available for you to\nexplore. These will be marked with magenta [?]s.\n")
	puzzles.functions.wait()
	write("\nThe game is not a straight path though. Be sure to revisit locations that have\nnot been completed, green [:]'s, after finding new items.")
	puzzles.functions.wait()
	write("\n\nIf you get stuck on a puzzle, just type [map] or press the Escape\nbutton to go back to the world.")
	puzzles.functions.wait()
	puzzles.functions.start(2,2)
Example #3
0
def show_answer_text(it):								#Respond to an answer with flavor text.
	set_cursor(1,15)
	write(" "*79)
	if (world._g['puzzle']+1 < len(it)):				#Make sure that there's an index for the response.
		if (it[world._g['puzzle']+1] != ""):			#If so, say it.
			set_cursor(1,15)
			print(it[world._g['puzzle']+1])
			return
	set_cursor(1,15)									#If not, display "What."
	print("What.")
Example #4
0
def show_tut_world():
	old = colorize.current
	for plot in _g['tworld']:
		if plot == '.' or plot == 'H':	#Go through the world list, draw each index with correct color.
			set_color(Colors['Gray'])
		elif plot == ':':
			set_color(Colors['Green'])
		else:
			set_color(Colors['Magenta'])
		write(plot)
	set_color(old[0],old[1])
Example #5
0
def show_suggestions():		#Make a auto-complete suggestion box for inputted text.
	sug = []
	if (len(entry_string) > 0):
		for item in sorted(world._g['inv']):		#Sort the list alphabetically, loop.
			esL = len(entry_string)
			if (len(sug) > 3):
				break
			if (entry_string == item[:esL].lower()):	#If the entry_string matches the substring of an item name
				sug.append(item)						#Add that item name to the suggestions
	while (len(sug) < 4):
		sug.append("")
	for ind, item in enumerate(sug):						#Write out suggestions 'bottom up'.
		set_cursor(5,19-ind)
		write('\t'+item+(" "*(20-len(item))))
Example #6
0
def refreshScreen():
	os.system('cls')							#Tell CMD to clear the screen.
	showWrong()
	print("\n\nYour Phrase:")
	print("\t"+_g["revealed"])					#Feed the user what letters he has discovered.
	conv = "abcdefghijklmnopqrstuvwxyz"
	colorize.set_cursor(0,15)					#Set the cursor to COORD 0,15
	for ind, let in enumerate(conv):			#Enumerate the list again, as before.
		if (_g["guessed"][ind] == 0):			#If you haven't guessed, set color to gray.
			colorize.set_color(8)
		elif (_g["guessed"][ind] == 1):			#If the letter is in the phrase, set color to green.
			colorize.set_color(2)
		elif (_g["guessed"][ind] == 2):			#If the letter is not in the phrase, set color to red.
			colorize.set_color(4)
		colorize.write(let)						#Write the letter
		colorize.set_color(7)					#Set color to default.
Example #7
0
def begin():
	global completed
	if (completed != 0):	#If it has been completed, show some text, don't bring to puzzle.
		write("The day has just begun. I don't think I need to come back here for a while.")
		puzzles.functions.wait()
		return
	os.system('cls')	#If not, clear screen, spew out puzzle text.
	write("Today is a new day. Time to get up. Bandits occasionally come around at night\nso I keep my things locked up. I should probably get them out of the lock-box.")
	write("\n\nAlright. Brain teaser for the morning. How to open this lock...")
	write("\n\n[Tutorial]: Typing will bring up things you have in your inventory.\n Try typing the word 'key'.")
	r = puzzles.functions.testInput("key")	#Call function, ask to match the correct answer as 'key'
	if (r):	#If successful
		puzzles.functions.wait()
		os.system('cls')
		write("Alright, got my [bow], [axe], and a [knife].\nWish I had something to put these in though. Off we go!\n\nNew useable items will be labeled as [item_name] in the text.")	#Say what we got.
		puzzles.functions.wait()
		world._g['inv'].append("bow")	#Add what we got.
		world._g['inv'].append("axe")
		world._g['inv'].append("knife")
		completed = 1					#Mark as completed.
		return True
Example #8
0
def begin():
    global completed
    if completed != 0:
        write("I've enough fish for today.")
        puzzles.functions.wait()
        return
    os.system("cls")
    write(
        "A decent sized pond sits in front of me. Next to the sitting pond\nis a normal pond, not sitting, but in the ground as it should be."
    )
    write("\n\nThat thing would be helpful here.")
    r = puzzles.functions.testInput("fishingpole")
    if r:
        puzzles.functions.wait()
        os.system("cls")
        write("I've got a big one! Let's take a look. As I'm looking at the fish...")
        puzzles.functions.wait()
        write("\n'A HERRRRRINNGGGG!'\nWho said that? Well... Got a [herring]?")
        puzzles.functions.wait()
        world._g["inv"].append("herring")
        completed = 1
        return True
Example #9
0
def show_intro():
	set_color(Colors['BWhite'], Colors['White'])
	flakes = []										#Make a list of flakes to be.
	flake_pattern = ('\\','|','/','-')				#What the possible flakes could look like.
	dorfx = -10										#Set cutscene guy position.
	dorfy = 12
	color_stages = (Colors['BWhite'], Colors['White'], Colors['Gray'], Colors['Black'])	#Make a list of stages the colors will go through.
	color_stage = 0.0	#Index of color stage.
	
	while (_g['state'] == 0):	#While in cutscene.
		flakes.append([80,(int.from_bytes(os.urandom(1), byteorder='big') // 10),random.randint(0,3)])		#Try a different random method. Add a flake on a random Y
		if ((int.from_bytes(os.urandom(1), byteorder='big') // 64) == 0): 					# 1/4 Chance
			flakes.append([80,(int.from_bytes(os.urandom(1), byteorder='big') // 10),0])	#Add more than one flake randomly.
		scr = list("."*24*80)																#Make the screen as a series of .'s
		for flake in flakes:																#Go through all created flakes.
			flake[0]-=2																		#Move them left.
			if (flake[0]>=0 and flake[0]<=79 and flake[1]>=0 and flake[1]<=23):				#If on the screen.
				flake[2]+=1																	#Change flake pattern
				if (flake[2] > len(flake_pattern)-1):										#If it's out of range, make it 0 to be in range.
					flake[2] = 0
				scr[flake[0]+(flake[1]*80)] = flake_pattern[flake[2]]						#Set the position on the screen equal to the flake's pattern.
		if (dorfx >= 0):
			scr[int(dorfx)+(dorfy*80)]="\x02"	#If he's in screen, draw him.
		if (dorfx < 50):						#If he's less than 50 X, move him. If he's more than 43, move him slower.
			dorfx+=(.4-((dorfx>43)*.3))
			if ((int.from_bytes(os.urandom(1), byteorder='big') // 32) == 0):		#Chance to move vertically. Chance of a Chance to move in a direction.
				if ((int.from_bytes(os.urandom(1), byteorder='big') // 128) == 1):
					dorfy = min(dorfy+1,20)
				else:
					dorfy = max(dorfy-1,5)
		else:
			set_color(color_stages[min(3,int(color_stage))], color_stages[min(3,int(color_stage+1))])	#Screen begins to fade, set colors.
			color_stage += .05																			#Increment screen fading.
			if (color_stage >= 5):
				_g['state'] = 1		#Fading ended, so does cutscene.
		os.system('cls')
		write([''.join(scr)])		#Draw the screen list onto the screen.
		time.sleep(.1)
Example #10
0
def begin():
	global completed
	if (completed != 0):
		write("How'd you manage this.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("Creepy looking cave they brought me to. It's so dark though,\nI can't see anything.\nThey gesture to me something, but I don't understand. Guess I'm on my own.")
	write("\n\nCome on brain, help me out.")
	r = puzzles.functions.testInput("strangeorb")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("They're telling me to raise it up. I can see something in it.\nIt looks like... me?\nI've got a really bad feeling about this...")
		puzzles.functions.wait()
		completed = 1
		return "End"
Example #11
0
def begin():
	global completed
	if (completed != 0):
		write("I'd rather not speak with those creepy men again.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("Seems like a gathering of some kind. Eh, they're all in hooded robes.\nI think I know what this is.. And so close to home.\nHopefully they aren't summoning some giant peacock to\nwreck my house or something.")
	write("\n\nThey won't even acknowledge my existance. Lucky me, no sarcasm.")
	r = puzzles.functions.testInput("ritualbook")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("They look very pleased. What did I just do..\nThey usher me further up the mountain.")
		puzzles.functions.wait()
		completed = 1
		return True
Example #12
0
def begin():
	global completed
	if (completed != 0):
		write("One path is enough.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("Here the forest-jungle-mountain-ravine terrain gets super thick.\nI'm going to need some way to get rid of these to get through\notherwise I'm going to get really scratched up and tattered.")
	write("\n\nAnything in my handy dandy backpack?")
	r = puzzles.functions.testInput("machete")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("Easy as... pie? That doesn't even make sense..")
		puzzles.functions.wait()
		completed = 1
		return True
Example #13
0
def begin():
	global completed
	if (completed != 0):
		write("I shouldn't need to inspect this thing, I did just repair it.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("What a ricketty looking bridge. I hate these things. Oh jeeze.\nOn top of it all, most of the planks seem rotted out. I could\n never make it across.")
	write("\n\nDo I have anything in here that'll help..")
	r = puzzles.functions.testInput("plank")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("That should do it. Lucky I had these.")
		puzzles.functions.wait()
		completed = 1
		return True
Example #14
0
def begin():
	global completed
	if (completed != 0):
		write("I can't imagine finding two unicorns in one lifetime.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("What is that? A horse? It's massive and white. Oh my lord, it has a horn! Am I\ndreaming? They say a unicorn's horn is used in some weird medicine. But do I even need it?")
	write("\n\nWait, seriously? I want to kill a unicorn?")
	r = puzzles.functions.testInput("bow")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("I'm so sorry friend.\n You obtained a [unicornhorn]!")
		puzzles.functions.wait()
		world._g['inv'].append("unicornhorn")
		completed = 1
		return True
Example #15
0
def begin():
	global completed
	if (completed != 0):
		write("I can't imagine finding much else in that blizzard without freezing.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("It's so cold, I better turn back unless I've got something to warm me up.")
	write("\n\nReally should hurry this up brain.")
	r = puzzles.functions.testInput("jacket")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("I hope that's not what I think it is.\nOh, no no. Poor guy. He's dead alright. He's half buried in snow and\nfrozen stiff.\nI wonder if he's got anything I could use inside his backpack.\nRotted wood? Shattered tools. Broken bow string.. and what's this..\n Got a... [strangeorb]?\n\nI'll come back for him when it's not as bad.")
		puzzles.functions.wait()
		world._g['inv'].append("strangeorb")
		completed = 1
		return True
Example #16
0
def begin():
	global completed
	if (completed != 0):
		write("Already made some unsafe bridges.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("There's a huge ravine in front of me. Doesn't look like there's anything to\nclimb over to get to the other side. It's not very wide, however. Still not\nnarrow enough for me to jump across.")
	write("\n\nHave I got anything that could be of use?")
	r = puzzles.functions.testInput("log")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("Good thing I was carrying a log in my pocket.\nAnd now that I'm here, I see a machete. Doesn't look like anyone is using it.\nGot a [machete]!")
		puzzles.functions.wait()
		world._g['inv'].append("machete")
		completed = 1
		return True
Example #17
0
def begin():
	global completed
	if (completed != 0):
		write("Too many bugs, don't want to go back.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("So humid, gross. Bugs, everywhere. It's like a rainforest in here.\nNeat plants over this way though. And I mean ones that aren't going to eat me.\nDo do dooo. Ah here. Some Rope Plant, my personal\nunimaginative nickname for this.")
	write("\n\nShould be useful, do I have something to cut this down with?")
	r = puzzles.functions.testInput("knife")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("These are nice and strong. And you can detangle them into\nsingle strands as well.\nGot some [ropeplant]!")
		puzzles.functions.wait()
		world._g['inv'].append("ropeplant")
		completed = 1
		return True
Example #18
0
def begin():
	global completed
	if (completed != 0):
		write("Not much left here to do. Unless I want to eat some grass... next to a bear den.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("Well lets go for a walk shall we. And looky here, we've got a bear.\nSeems to be guarding its den. Maybe there's some goodies in\nthere, who knows. Regardless, I'm hungry.")
	write("\n\nLet's see. How to dispatch this beast today.")
	r = puzzles.functions.testInput("bow")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("I sure hope it's dead.\n Got some [rawmeat]!\n\nAnything in the den? Let's have a looksie.")
		puzzles.functions.wait()
		world._g['inv'].append("rawmeat")
		completed = 1
		return True
Example #19
0
def begin():
	global completed
	if (completed != 0):
		write("I've got plenty of wood. Deforestation, bad.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("Wow, what a forest. It's so vibrant. Woah! No way, Featherwhite trees!\nThese things don't weigh anything, I should grab a few of these.")
	write("\n\nI know I've got it in here somewhere..")
	r = puzzles.functions.testInput("axe")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("Timbbeeeerrrrrrrr.\n Got some [log]s!")
		puzzles.functions.wait()
		world._g['inv'].append("log")
		completed = 1
		return True
Example #20
0
def begin():
    global completed
    if completed != 0:
        write("That man was kind, I shouldn't bother him anymore.")
        puzzles.functions.wait()
        return
    os.system("cls")
    write(
        "A sawmill in the forest, neat. Let's see if anyone is home. 'Helloooo~!'\nA short man came out from the cabin. He says he's taking the day off today,\nso I'm free to use the sawmill for personal use. So kind."
    )
    write("\n\nNow, do I actually have anything to use?")
    r = puzzles.functions.testInput("log")
    if r:
        puzzles.functions.wait()
        os.system("cls")
        write("Toss these on through.\n Got some [plank]s!\n\nNow lighter than before.")
        puzzles.functions.wait()
        world._g["inv"].append("plank")
        completed = 1
        return True
Example #21
0
def print_main_menu():
	set_cursor_attr(100,False)	#Turn cursor off.
	os.system('cls')
	w = 80						#Constant for width of console.
	write([
		"/"*w,
		"//"," "*((w-20)//2)," Insignificance "," "*((w-20)//2),"//",	#Add Blanks to pad the text to the center.
		"/"*w
		])
	set_color(Colors['Gray'], Colors['Black'])		#Write my name in gray.
	write([" "*(w-15),"// Jamie Phy //"])
	set_color(Colors['White'], Colors['Black'])
	write(["     Main Menu \x18\x19"])
	set_color(Colors['Gray'], Colors['Black'])
	write([" "*(w-32),"///////////////\n"])
	set_color(Colors['White'], Colors['Black'])
	if (_g['mm_ind'] == 0):
		print("\t\x10 Start\n\t  Exit")				#If the cursor is over start, show it.
	else:
		print("\t  Start\n\t\x10 Exit")				#Otherwise put the cursor on Exit.
Example #22
0
def begin():
    global completed
    if completed != 0:
        write("That place was scary, no thanks.")
        puzzles.functions.wait()
        return
    os.system("cls")
    write(
        "It's really thick here. There's a clearing up ahead though.\nTwo animals are fighting, a yak and a snow leopard. Poor yak, doesn't look like\nhe's coming out on top. Something just spooked that lepoard though,\nhe's running away."
    )
    write("\n\nIt's dead alright. It's got a really nice hide, maybe it'll be useful.")
    r = puzzles.functions.testInput("knife")
    if r:
        puzzles.functions.wait()
        os.system("cls")
        write("Skin this real quick. That'll do it.\nGot a [hide]!")
        puzzles.functions.wait()
        world._g["inv"].append("hide")
        completed = 1
        return True
Example #23
0
def begin():
	global completed
	if (completed != 0):
		write("He's no where to be seen.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("A knight wearing all black stands in my way. He's eyeing me up and down.\nHe's coming up real close to me.")
	puzzles.functions.wait()
	write("\n\nBring me....")
	puzzles.functions.wait()
	time.sleep(2)
	write("\nA HERRRING!!!!!!!!!")
	write("\n\nHow to dispatch THIS beast.")
	r = puzzles.functions.testInput("herring")
	if (r):
		puzzles.functions.wait()
		os.system('cls')
		write("'Now take this, and cut dow-' he turns to point to something in the distance\nbut misses his step and falls down the hill.\nPath is clear.")
		puzzles.functions.wait()
		completed = 1
		return True
Example #24
0
def begin():
	global completed
	if (completed == 2):
		write("Looks like they're packing up for the day.")
		puzzles.functions.wait()
		return
	if (completed == 1):
		os.system('cls')
		write("Still the odd group of merchants 5 feet from home are here.")
		write("\n\nThis particular merchant says he's looking a mystical beast horn.\nPerhaps he's gone looney.")
		r = puzzles.functions.testInput("unicornhorn")
		if (r):
			puzzles.functions.wait()
			os.system('cls')
			write("He hands me a black [ritualbook]. Looks creepy.\nWoah, where'd he go.. Guess I'm not getting any hints to what this is.")
			puzzles.functions.wait()
			world._g['inv'].append("ritualbook")
			completed = 2
			return True
	if (completed == 0):
		os.system('cls')
		write("It looks like there's a group of merchants here. Odd. I never looked 5 feet to\nthe north to see them before. No sense worrying now!\nLet's see if they want anything.")
		write("\n\nThis particular merchant says he's looking for some food stock.")
		r = puzzles.functions.testInput("rawmeat")
		if (r):
			puzzles.functions.wait()
			os.system('cls')
			write("Oh nice, he says he'll barter with a [backpack]. Of course.\nNow I don't have to hold this raw meat in my hands.")
			puzzles.functions.wait()
			world._g['inv'].append("backpack")
			completed = 1
			return True
Example #25
0
def begin():
	global completed
	if (completed != 0):
		write("I can't deal with the creepers anymore.")
		puzzles.functions.wait()
		return
	os.system('cls')
	write("Oh jeeze what now. Who is this clown? Dressed in a clown suit in the middle\nof a forest.")
	puzzles.functions.wait()
	write("\n\nHe gestures me over. Whatever. Let's get this over with.\nHe begins talking.. But I have other plans")
	puzzles.functions.wait()
	time.sleep(1)
	os.system('cls')
	write("Press the corresponding keys on the keyboard as they appear on the screen.\nPressing them quickly will net you a better score.")
	puzzles.functions.wait()
	time.sleep(1)
	os.system('cls')
	time.sleep(1)
	set_color(4)
	write("\tWELCOME")
	time.sleep(1)
	write("\n\t\tTO")
	time.sleep(1)
	write("\n\t\t\tPUNCH PUNCH")
	time.sleep(1)
	write("\n\t\t\t\t\t~REVOLUTION~")
	time.sleep(2)
	os.system('cls')
	
	score = 0
	letter = -1
	timer = 0
	
	start = time.clock()
	
	set_cursor_attr(100,False)
	
	while score < 30:
		set_color(6)
		set_cursor(0,0)
		write(["SCORE: ",score," "*20])
		if (letter == -1):
			timer = time.clock()
			letter = random.randint(0,25)
		else:
			set_color(8)
			set_cursor(40,5)
			write(chr(letter+97))
		if msvcrt.kbhit():
			keycode = int.from_bytes(msvcrt.getch(), byteorder='big')
			if (keycode >= 97 and keycode <= 122):
				if (keycode-97 == letter):
					score += int(((timer+4)-time.clock()))
					letter = -1
	os.system('cls')
	write(["Congratulations, you punched out the creeper in ",str(int((time.clock()-start)*10)/10)," seconds!"])
	time.sleep(1)
	puzzles.functions.wait()
	return True
	
Example #26
0
def begin():
	global completed
	if (completed == 2):
		write("Don't need to bother them anymore.")
		puzzles.functions.wait()
		return
	if (completed == 1):
		os.system('cls')
		write("Looks like they're making other stuff in the mean time.")
		write("\n\nTougher string. Hmmm.")
		r = puzzles.functions.testInput("ropeplant")
		if (r):
			puzzles.functions.wait()
			os.system('cls')
			write("Wait around for a bit and they'll make quick work of it.\nGot a [jacket]!\n\nSo warm. This should be handy.")
			puzzles.functions.wait()
			world._g['inv'].append("jacket")
			completed = 2
			return True
	if (completed == 0):
		os.system('cls')
		write("Looks like a little cabin up ahead. Wonder if anyone is home.\nSure enough, a small family is outside. They say they're looking for some\nheavier materials, this winter is going to be rough. They'd be happy to make\nme something if I came across anything.")
		write("\n\nDo I have anything that fits the bill.")
		r = puzzles.functions.testInput("hide")
		if (r):
			puzzles.functions.wait()
			os.system('cls')
			write("That'll work they say. But I'll need to get them some tougher thread to sew it.")
			puzzles.functions.wait()
			completed = 1
			return True
Example #27
0
def show_ending():		#Show the end dialog. It's on a time sequence for failed suspense.
	os.system('cls')
	write("Jeeze, it's snowing pretty hard. Even my hide jacket isn't protecting me.")
	time.sleep(4)
	write("\nWait, I was just in a cave on a mountain.. Where am I!")
	time.sleep(4)
	write("\nWhat! Am I going crazy? There's nothing behind me, I swear..")
	time.sleep(4)
	write("\nThis is inanse.. Is that someone up ahead?")
	time.sleep(3)
	write("\n'Hey!'  ")
	time.sleep(1)
	write("'HEY")
	time.sleep(1)
	write("Y")
	time.sleep(1)
	write("Y")
	time.sleep(1)
	write("Y!'")
	time.sleep(5)
	write("\nNo reply. I'll try and catch up...")
	time.sleep(4)
	write("so cold..")
	time.sleep(4)
	write("I can't..")
	time.sleep(7)
	write("-poof-")
	time.sleep(7)
	os.system('cls')
	set_cursor(39,5)
	set_color(0,4)
	write("End")
	wait()
	os._exit(1)	#Kill system because python does weird things and won't exit properly on its own.
Example #28
0
def draw_map():
	set_cursor(37,7)			#Set cursor to somewhere in the middle.
	for ind, visi in enumerate(world._g['dworld']):
		if (ind % 5 == 0):		#If it's the first index of a row, set the cursor's position.
			set_cursor(37,7+(ind//5))
		if (ind == 12):			#Special case for your Home.
			set_color(8)
			write("H")
			continue
		if (ind == 7 and visi == 1):	#Special case for merchants.
			set_color(2)
			write(":")
			continue
		if (ind == 23 and visi == 1):	#Special case for leatherworkers.
			set_color(2)
			write(":")
			continue
		if (visi == -1 or (world._g['world'][ind]==-1)):	#Make sure that we're not revealing maps we don't have discovered, or ones that don't have a puzzle.
			write(" ")
		elif (visi == 0):	#If visible but not completed
			set_color(5)
			write("?")
		elif (visi > 0):	#If completed
			set_color(8)
			write(".")
	set_color(7)
	set_cursor(world._g['x']+37,world._g['y']+7)	#Move cursor to current position. Draw face.
	write("\x02")
	set_cursor(0,0)
Example #29
0
def screen_refresh():		#Reprint the screen from scratch.
	show_suggestions()
	set_cursor(0,20)
	write([entry_string,(" "*15)])
	set_cursor(len(entry_string),20)
Example #30
0
def showWrong():
	colorize.set_cursor(0,1)
	colorize.write(noose)	#Draw my noose at (0,1)
	if (_g["wrong"] >= 1):	#Draw pieces of Sir Wiggles for each one wrong, up to 10.
		colorize.set_cursor(15,3)
		colorize.write("O")
	if (_g["wrong"] >= 2):
		colorize.set_cursor(15,4)
		colorize.write("|")
	if (_g["wrong"] >= 3):
		colorize.set_cursor(15,5)
		colorize.write("|")
	if (_g["wrong"] >= 4):
		colorize.set_cursor(16,6)
		colorize.write("\\")
	if (_g["wrong"] >= 5):
		colorize.set_cursor(17,6)
		colorize.write("_")
	if (_g["wrong"] >= 6):
		colorize.set_cursor(18,6)
		colorize.write("/")
	if (_g["wrong"] >= 7):
		colorize.set_cursor(19,5)
		colorize.write("|")
	if (_g["wrong"] >= 8):
		colorize.set_cursor(20,4)
		colorize.write("_")
	if (_g["wrong"] >= 9):
		colorize.set_cursor(21,4)
		colorize.write("_")
	if (_g["wrong"] >= 10):
		colorize.set_cursor(22,5)
		colorize.write("\\")
	colorize.set_cursor(0,10)	#Set the cursor back to where it should be.