def __init__(self, name, sprite, description, price, equipped_sprites, body_part, defense, res, atk, weight, restrictions): Item.__init__(self, name, sprite, description, price) self.defense = defense self.res = res self.atk = atk self.weight = weight self.restrictions = restrictions self.body_part = body_part self.equipped_sprite = pg.transform.scale( pg.image.load(equipped_sprites[0]).convert_alpha(), (TILE_SIZE, TILE_SIZE)) if len(equipped_sprites) > 1: for sp in equipped_sprites[1:]: self.equipped_sprite.blit( pg.transform.scale( pg.image.load(sp).convert_alpha(), (TILE_SIZE, TILE_SIZE)), (0, 0)) # Used when character wearing the equipment cannot be selected self.sprite_unavailable = self.equipped_sprite.copy() color_image = pg.Surface(self.sprite.get_size()).convert_alpha() color_image.fill(LIGHT_GREY) self.sprite_unavailable.blit(color_image, (0, 0), special_flags=pg.BLEND_RGBA_MULT) self.normal_sprite = self.equipped_sprite
def __init__(self, dialect, item_id, title, definition, user, contributor, cultural_note, reference, image_id, audio_id, video_id, children_archive, status, literal_translation=None, change=None): Item.__init__(self, dialect, item_id, title, user, change) self.definition = definition self.cultural_note = cultural_note self.reference = reference self.image_id = image_id self.audio_id = audio_id self.video_id = video_id self.contributor = contributor self.status = status self.children_archive = children_archive self.literal_translation = literal_translation
def __init__(self, amount): Item.__init__( self, str(amount) + " Gold", "imgs/dungeon_crawl/item/gold/gold_pile_10.png", "Gold could be used to buy some items or other services", 0) self.amount = amount
def __init__(self, name, sprite, description, equipped_sprite, body_part, res, magic_res, atk, weight): Item.__init__(self, name, sprite, description) self.res = res self.magic_res = magic_res self.atk = atk self.weight = weight self.body_part = body_part self.equipped_sprite = pg.transform.scale(pg.image.load(equipped_sprite).convert_alpha(), (TILE_SIZE, TILE_SIZE))
def __init__(self, name, sprite, description, price): Item.__init__(self, name, sprite, description, price)
def __init__(self, name, sprite, description, price, effect): Item.__init__(self, name, sprite, description, price) self.effect = effect
def __init__(self, name, sprite, description, price, for_chest, for_door): Item.__init__(self, name, sprite, description, price) self.for_chest = for_chest self.for_door = for_door