def __init__(self): self.inventory = [items.Knife(), items.Bread()] self.x = 1 self.y = 2 self.hp = 100 self.gold = 5 self.victory = False
class Player: inventory = [items.Knife(), items.ProPlus()] hp = 100 stamina = 50 location_x, location_y = (0, 1) victory = False def is_alive(self): return self.hp > 0 def view_inventory(self): print("\n=====\nYou have {} hit points and {} stamina left.\n=====\n".format(self.hp, self.stamina),"\nYou are currently carrying:\n") for item in self.inventory: print(item) """def use_consumables(self): print("\nChoose an an item to use:") consumables = [] if items.ProPlus(self.inventory): consumables.append(actions_usePP) if items.FirstAidKit(self.inventory): consumables.append(actions_useFAK) return consumables""" """def use_fak(self):""" def use_pp(self): for items.ProPlus(self.inventory):
def __init__(self): # begining items in inventory self.inventory = [items.Knife()] # player starting coordinates self.x = ship.start_tile_location[0] self.y = ship.start_tile_location[1] # self.x = 1 # self.y = 2 self.hp = 100 self.victory = False
def __init__(self): self.inventory = [ items.ShortBow(), items.Knife(), 'Gold(5)', items.Bread() ] self.x = world.start_tile_location[0] self.y = world.start_tile_location[1] self.hp = 100 self.gold = 10 self.victory = False
def __init__(self, name, description): super().__init__(name, description) self.cash = 100 self.items = [ items.CrustyBread(), items.CrustyBread(), items.Chips(), items.Chips(), items.Chips(), items.Chips(), items.Implement("hot glue gun", "stolen from the art room", 5, 35, 50), items.Knife("steak knife", "a pointy serrated knife", 10, 15, 25), items.Knife("potato peeler", "a dull fruit peeler", 5, 5, 5) ] self.dialogue = [ "I got guns, knives, and candy.", "Diddd you brinnnnng me my precioussss?", "How much you got?", "Yo Richie Rich.", "Hey kid, you need a cigar?", "Tryna make some money out here." ]
def __init__(self): self.inventory = [ items.Brick(), items.Knife(), items.Sword(), items.Medipack(), items.Herbs(), ] self.x = world.start_tile_location[0] self.y = world.start_tile_location[1] self.hp = 100 self.gold = 5 self.victory = False
def __init__(self): self.name = "Administrator" self.health = 20 self.damage = 10 self.xp = 200 super().__init__() if randint(0, 10) < 3: self.items.append(items.Philz()) if randint(0, 10) < 5: self.items.append(items.Hundo()) if randint(0, 10) < 5: self.items.append(items.Chips()) if randint(0, 10) < 2: self.items.append( items.Knife("letter opener", "an awkward but pointed implement", 5, 15, 10)) if randint(0, 10) < 2: self.items.append( items.Implement("ball point pen", "you could poke somebody's eye out", 3, 25, 10))
def __init__(self, x, y): super().__init__(x, y, items.Knife())
def __init__(self): self.inventory = [items.Knife()] self.x = vaisseau.start_tile_location[0] self.y = vaisseau.start_tile_location[1] self.hp = 100 self.victory = False
def __init__(self): self.inventory = [items.Handgun(), items.Knife(), 'Cash(5)', 'medpack']