def __init__(self): self.craft_type = item_type.ALTAR self.modifiers = {} self.score = 0 self.size = compute().RANDOMIZE_SIZE_ALTAR() self.durability = compute().RANDOMIZE_DURABILITY() self.rarity = compute().RANDOMIZE_RARITY() self.timestamp = datetime.datetime.now(pytz.utc).isoformat() self.alignment = compute().ALIGNMENT() self.name = item_type.ALTAR self.icon = ch.ALTAR_ICON self.badge = "" self.countdown = str(self.get_uses())
def __init__(self, ing_name=None): self.craft_type = item_type.INGREDIENT self.modifiers = {} self.size = compute().RANDOMIZE_SIZE_INGREDIENT() self.durability = compute().RANDOMIZE_DURABILITY() self.rarity = compute().RANDOMIZE_RARITY() self.timestamp = datetime.datetime.now(pytz.utc).isoformat() self.alignment = compute().ALIGNMENT() self.score = super().get_uses() self.name = ing_name if ing_name else compute( ).RANDOMIZE_INGREDIENT_NAME() self.icon = ch.CRAFT_ICON self.badge = "" self.countdown = 1
def __init__(self): self.craft_type = item_type.BOOK self.modifiers = {} self.score = 0 self.size = compute().RANDOMIZE_SIZE_BOOK() self.durability = compute().RANDOMIZE_DURABILITY() self.rarity = compute().RANDOMIZE_RARITY() self.timestamp = datetime.datetime.now(pytz.utc).isoformat() self.alignment = compute().ALIGNMENT() self.name = item_type.BOOK self.icon = ch.BOOK_ICON self.badge = str(random.choice([6, 7, 8, 9, 10 ])) + "s" # time to reads self.countdown = 1
def __init__(self): self.craft_type = item_type.LIGHT self.modifiers = {} self.score = 0 self.size = compute().RANDOMIZE_SIZE_LAMP() self.durability = compute().RANDOMIZE_DURABILITY() self.rarity = compute().RANDOMIZE_RARITY() self.timestamp = datetime.datetime.now(pytz.utc).isoformat() self.alignment = compute().ALIGNMENT() self.name = compute().RANDOMIZE_STYLE_LAMP() self.icon = ch.LIGHT_ICON self.status = compute().RANDOMIZE_LIGHT_STATUS().value self.badge = ["off", "on"][self.status] self.countdown = ""
def __init__(self): self.containers = { # container:[item,...] } self.person_container = None # None for no person, otherwise a container self.doors = [DOOR(), DOOR(), DOOR()] random.choice( self.doors ).murderous = True ## makes one of the doors contain a room with the serial killer in it self.room_type = compute().RANDOMIZE_ROOM_TYPE() self.book = None # occurs in 30% of rooms self.light = None # occurs in 40% of rooms self.altar = None # occurs in 10% of rooms self.time_to_encounter = { # time until attack happens (in seconds) room_type.BEDROOM: 180, room_type.SITTINGROOM: 60, room_type.KITCHEN: 120, room_type.HALLWAY: 30, room_type.STUDY: 240, room_type.LIBRARY: 280 }[self.room_type] self.furnish()