def cmd_darkheart(ch, argument): if ch.is_npc(): return if not ch.is_vampire(): ch.huh() return if not ch.vampaff.is_set(merc.VAM_SERPENTIS): ch.send("You are not trained in the Serpentis discipline.\n") return if ch.immune.is_set(merc.IMM_STAKE): ch.send("But you've already torn your heart out!\n") return if ch.blood < 100: ch.send("You have insufficient blood.\n") return ch.blood -= 100 ch.send("You rip your heart from your body and toss it to the ground.\n") handler_game.act("$n rips $s heart out and tosses it to the ground.", ch, None, None, merc.TO_ROOM) object_creator.make_part(ch, "heart") ch.hit -= game_utils.number_range(10, 20) fight.update_pos(ch) if ch.position == merc.POS_DEAD and not ch.is_hero(): ch.send("You have been KILLED!!\n\n") fight.raw_kill(ch) return ch.immune.set_bit(merc.IMM_STAKE)
def cmd_eyespy(ch, argument): if ch.head.is_set(merc.LOST_EYE_L) and ch.head.is_set(merc.LOST_EYE_R): ch.send("But you don't have any more eyes to pluck out!\n") return if not ch.head.is_set(merc.LOST_EYE_L) and game_utils.number_range(1, 2) == 1: handler_game.act("You pluck out your left eyeball and throw it to the ground.", ch, None, None, merc.TO_CHAR) handler_game.act("$n plucks out $s left eyeball and throws it to the ground.", ch, None, None, merc.TO_ROOM) elif not ch.head.is_set(merc.LOST_EYE_R): handler_game.act("You pluck out your right eyeball and throw it to the ground.", ch, None, None, merc.TO_CHAR) handler_game.act("$n plucks out $s right eyeball and throws it to the ground.", ch, None, None, merc.TO_ROOM) else: handler_game.act("You pluck out your left eyeball and throw it to the ground.", ch, None, None, merc.TO_CHAR) handler_game.act("$n plucks out $s left eyeball and throws it to the ground.", ch, None, None, merc.TO_ROOM) familiar = ch.familiar if familiar: object_creator.make_part(ch, "eyeball") return if merc.MOB_VNUM_EYE not in instance.npc_templates: ch.send("Error - please inform an Immortal.\n") return victim = object_creator.create_mobile(instance.npc_templates[merc.MOB_VNUM_EYE]) ch.in_room.put(victim) ch.familiar = victim victim.wizard = ch
def crack_head(ch, item, argument): argument, arg1 = game_utils.read_word(argument) argument, arg2 = game_utils.read_word(argument) if not game_utils.str_cmp(arg2, "mob") and item.chobj and not item.chobj.is_npc() and item.chobj.is_affected(merc.AFF_POLYMORPH): victim = item.chobj object_creator.make_part(victim, "cracked_head") object_creator.make_part(victim, "brain") victim.morph = "the quivering brain of {}".format(victim.name) elif game_utils.str_cmp(arg2, "mob"): mob_index = instance.npc_templates[item.value[1]] if not mob_index: return victim = object_creator.create_mobile(mob_index) ch.in_room.put(victim) object_creator.make_part(victim, "cracked_head") object_creator.make_part(victim, "brain") victim.extract(True) else: mob_index = instance.npc_templates[30002] if not mob_index: return victim = object_creator.create_mobile(mob_index) victim.short_descr = arg2[0].upper() + arg2[1:] ch.in_room.put(victim) object_creator.make_part(victim, "cracked_head") object_creator.make_part(victim, "brain") victim.extract(True)