def LAMP(coords): x, y = coords item_com = actor.CompItem() return_object = actor.ObjActor(x, y, 'THE LAMP', animation_key = 'S_MAGIC_LAMP', item = item_com) globalvars.GAME.current_objects.insert(0, return_object)
def scroll_confusion(coords): x, y = coords effect_length = libtcod.random_get_int(0, 5, 8) item_com = actor.CompItem(use_function = magic.cast_confusion, value = effect_length) return_object = actor.ObjActor(x, y, "Confusion scroll", animation_key = "S_SCROLL_03", item = item_com) return return_object
def scroll_lightning(coords): x, y = coords damage = libtcod.random_get_int(0, 8, 10) m_range = libtcod.random_get_int(0, 8, 9) item_com = actor.CompItem(use_function = magic.cast_lighting, value = (damage, m_range)) return_object = actor.ObjActor(x, y, "Lightning scroll", animation_key = "S_SCROLL_01", item = item_com) return return_object
def scroll_fireball_diamond(coords): x, y = coords damage = libtcod.random_get_int(0, 7, 10) radius = 2 m_range = libtcod.random_get_int(0, 5, 9) item_com = actor.CompItem(use_function = magic.cast_fireball_diamond, value = (damage, radius, m_range)) return_object = actor.ObjActor(x, y, "Fireball-diamond scroll", animation_key = "S_SCROLL_04", item = item_com) return return_object
def scroll_fireball_box(coords): x, y = coords damage = libtcod.random_get_int(0, 6, 8) radius = 1 m_range = libtcod.random_get_int(0, 7, 8) item_com = actor.CompItem(use_function = magic.cast_fireball_box, value = (damage, radius, m_range)) return_object = actor.ObjActor(x, y, "Fireball-box scroll", animation_key = "S_SCROLL_02", item = item_com) return return_object
def mouse(coords): x, y = coords max_health = 1 base_attack = 0 creature_name = libtcod.namegen_generate('Celtic male') creature_com = actor.CompCreature(creature_name, death_function = death.mouse, base_atk = base_attack, max_hp = max_health, xp = -2, speed = 20) ai_com = ai.Flee() item_com = actor.CompItem(use_function = magic.cast_heal, value = 3) mouse = actor.ObjActor(x, y, "mouse", animation_key = "A_MOUSE", animation_speed = 1, creature = creature_com, ai= ai_com, item = item_com) return mouse