Beispiel #1
0
					if that_item.body_part == "head":
						hero.head = that_item
						print("Założyłeś "+that_item.name)
					elif that_item.body_part == "hands":
						hero.hands = that_item
						print("Założyłeś "+that_item.name)
					elif that_item.body_part == "torso1":
						hero.torso1 = that_item
					elif that_item.body_part == "torso2":
						hero.torso2 = that_item
						print("Założyłeś "+that_item.name)
					elif that_item.body_part == "legs":
						hero.legs = that_item
						print("Założyłeś "+that_item.name)
					elif that_item.body_part == "boots":
						hero.boots = that_item
						print("Założyłeś "+that_item.name)
				elif isinstance(that_item, Jewellery):
					if that_item.body_part == "finger":
						if hero.finger1 is not None:
							if hero.finger2 is not None:
								print("Masz już maksymalną liczbę pierścieni, zdjemij jeden")
							else:
								hero.finger2 = that_item
								print("Założyłeś "+that_item.name)
						else: 
							hero.finger1 = that_item
							print("Założyłeś "+that_item.name)
					elif that_item.body_part == "neck":
						hero.neck = that_item
						print("Założyłeś "+that_item.name)