#global level#import time#import random#global exp#global stre#global agi#global long_sword#global long_sword_stre#global gold#global exp_c#global name#global fist#global fist_stre#global health#global fireball#global fireball_dmg#health = 10#stre = 1#fist = 1#fist_stre = 1 + stre#level = 1#exp = 0#agi = 1#long_sword = 1#long_sword_stre = 4 + stre#gold = 5#exp_c = 10#fireball = 0#fireball_dmg = 10#name = ""#def intro():# global name# print "Waywalker"# name = raw_input("Your name: ")# print "Welcome to Waywalker", name,"."# print "If you need any help during the game, type help."#def room_A_1():# global level# global exp# global stre# global agi# global long_sword# global long_sword_stre# global gold# global exp_c# global name# level_up()# print "You awaken in a large room to the sound of your name"# print "You have nothing to defend yourself but your fists"# print "Would you like to explore or fight", name,"?"# option = raw_input("Command:")# if option=="fight":# room_A_1_fight()# if option=="level": print "stats:", "level", level, "strength", stre, agi, exp, health, "this fing guy", long_sword_stre, fist_stre # if option=="explore":# print "You look around the room and find only a door."# choice = raw_input("Would you like to enter?: ")#stre if choice == "Y":# room_A_2()# else:# room_A_1()# else:# room_A_1()#def room_A_1_fight():# global level# global exp# global stre# global agi# global long_sword# global long_sword_stre# global gold# global exp_c# global name# global fist# global fist_stre# global health# gob_stre = 1# gob_level = 1# print "You're searching for something to kill."# time.sleep(1)# print "You've found something!"# gob_health = 5# while gob_health > 0:# choice = raw_input("Would you like to fight the goblin? Y/N:")# if choice == "Y":# choice = raw_input("Pick your weapon:")# if choice == "fist" and fist > 0:# print "You engage the goblin."# print "The goblin has", gob_health,"health."# time.sleep(1)# dynamic = random.random()# if dynamic > 0.1:# print "You hit the goblin!"# print "He lost" , fist_stre, "health!"# gob_health = gob_health - fist_stre## else:# print "You missed!"# if dynamic < 0.1:# random_hit = random.random()# if random_hit > 0.7:# print "You lost 2 health!"# health = health - gob_stre*2## else:# print "You lost 1 health!"# health = health - gob_stre# if choice == "long sword" and long_sword > 0:# print "You engage the goblin."# print "The goblin has", gob_health,"health."# time.sleep(1)# dynamic = random.random()# if dynamic > 0.3:# print "You slashed the goblin!"# print "He lost", long_sword_stre, "health!"# gob_health = gob_health - long_sword_stre## else:# print "You missed!"# if dynamic < 0.3:# random_hit = random.random()# if random_hit > 0.7:# print "You lost", gob_stre*2, "health!"# health = health - gob_stre*2## else:# print "You lost 1 health!"# health = health - gob_stre## else:# print "You ran away!"# room_A_1()# print "You felled the goblin!"# exp = exp + 1# print "You gained 1 experience point."# if long_sword == 0:# print "You acquired a Long Sword!"# long_sword = long_sword + 1# room_A_1()##def room_A_2():# global level# global exp# global stre# global agi# global long_sword# global long_sword_stre# global gold# global exp_c# global name# global health# level_up()# lock = 0# print "This room contains two levers (left and right) and a locked door"# option = raw_input("Command:")# if option=="pull left lever":# room_A_2_fight()# if option=="pull right lever":# print "You pull the right lever."# print "The bars raise and the door is unlocked."# lock = lock + 1# choice = raw_input("Would you like to enter?: ")# if choice == "Y" and lock == 1:# room_A_3()# else:# room_A_2() else:# room_A_2()#def room_A_2_fight():# global level# global exp# global stre# global agi# global long_sword# global long_sword_stre# global gold# global exp_c# global name# global health# global fireball# print "A zombie approaches you!"# time.sleep(1)# zom_health = 10# zom_stre = 3# while zom_health > 0:# choice = raw_input("Fight?: ")# if choice == "Y":# choice = raw_input("Pick your weapon:")# if choice == "long sword" and long_sword > 0:# print "You engage the zombie."# print "The zombie has", zom_health,"health."# time.sleep(1)# dynamic = random.random()# if dynamic > 0.3:# print "You slashed the zombie!"# print "He lost", long_sword_stre, "health!"# zom_health = zom_health - long_sword_stre## else:# print "You missed!"# if dynamic < 0.3:# random_hit = random.random()# if random_hit > 0.7:# print "You lost", zom_stre*2, "health!"# health = health - zom_stre*2## else:# print "You lost", zom_stre, "health!"# health = health - zom_stre# print "You felled the zombie!"# exp = exp + 2# print "You gained 2 experience points."# fireball = fireball + 1# print "You acquired Tome of Fireball!"# room_A_2()##def room_A_3():# print "Upon entering the room you hear a sinister laughter from above you"# print "The exit is on the other side of the room"# choice = raw_input("Proceed?: ")# if choice == "Y":# room_A_3_fight()# else:# print "Come on you coward!"# room_A_3()##def room_A_3_fight():# global level# global exp# global stre# global agi# global long_sword# global long_sword_stre# global gold# global exp_c# global name# global health# global fireball# global fireball_dmg# global name# print "???: You thought you could escape that easily?"# time.sleep(1)# print name, ":Who are you?"# time.sleep(1)# print "???: You're a lot more messed up than I thought, buahaha"# time.sleep(2)# print "???: This should be quite fun!"# time.sleep(1)# print name, ":..."# time.sleep(1)# print "???: Time to die!"# time.sleep(1)# print "The mysterious man approaches you!"# time.sleep(1)# boss_health = 20# boss_stre = 5# while boss_health > 0:# choice = raw_input("Pick your weapon:")# if choice == "long sword" and long_sword > 0:# print "You engage the mysterious man!"# print "He has", boss_health,"health."# time.sleep(1)# dynamic = random.random()# if dynamic > 0.3:# print "You slashed him!"# print "He lost", long_sword_stre, "health!"# boss_health = boss_health - long_sword_stre## elif dynamic < 0.3:# print "The mysterious man strikes!"# random_hit = random.random()# if random_hit > 0.9:# print "You lost", boss_stre*2, "health!"# health = health - boss_stre*2# else:# print "You lost", boss_stre, "health!"# health = health - boss_stre# if choice == "fireball" and fireball > 0:# print "You begin to channel energy!"# print "The mysterious man has", boss_health,"health."# time.sleep(1)# dynamic = random.random()# if dynamic > 0:# print "You launch a ball of fire at the mysterious man!"# print "He lost", fireball_dmg, "health!"# boss_health = boss_health - fireball_dmg## print "You felled the mysterious man!"# exp = exp + 6# print "You gained 6 experience points."# dungeon_exit()##def dungeon_exit():# level_up()# global name# print "???: You win this round, I'm too weak to continue fighting..."# print "???: But good luck getting around town with that bounty on your head! Buahaha"# print name, "What's your name?"## room_A_1()##def world_map():# stuff###def level_up():# global level# global stre# global agi# global health# global exp# if level == 1 and exp == 2:# level = level + 1# print "You have reached Level 2!"# stre = stre + 1# print "You have gained 1 strength!"# agi = agi + 1# print "You have gained 1 agility!"# health = health + 5# print "You have gained 5 hit points!"# elif level == 2 and exp == 10:# level = level + 1# print "You have reached level 3!"# stre = stre + 2# print "You have gained 2 strength!"# health = health + 5# "You have gained 5 hit points!"##intro()#room_A_1()