Ejemplo n.º 1
0
	def MYSTERY(self):
		if random.randint(1,10) != 5:
			random.shuffle(self.data['items'])
			raw_input("You found a %s" % (items.getInfo(self.data['items'][1], 'name')))
			self.data['player'].pickupItem(self.data['items'][1], False)
		else:
			x = random.randint(1,10)
			self.data['player'].looseHealth(x)
			print "Ouch! The mystery box takes %s health from you!" % (x)
		self.data['player'].goBack()
		self.data['setChar'](self.data['map'], self.pos, " ")
Ejemplo n.º 2
0
		def chestScreen(self):
			if self.data['contains'] == []: return None
			x = 0
			for i in self.data['contains']:
				x += 1
				print "[%s] %s" % (x, items.getInfo(i, 'name'))
			choice = raw_input("Selection => ")
			if utils.canInt(choice) is True:
				if int(choice) > x or int(choice) < 0:
					raw_input("Invalid selection!")
					self.data['player'].goBack()
				else:
					raw_input(choice)
					self.data['player'].pickupItem(self.data['contains'][int(choice)-1], True)
					self.data['contains'].pop(int(choice)-1)
					self.data['player'].goBack()
			else:
				raw_input("Invalid selection!")
				self.data['player'].goBack()
Ejemplo n.º 3
0
def itemCheck(item): return items.getInfo(item, 'xp')

def wordy():