mage.c - example for course 03

[previous example] [course03] [Table of contents] [next example]
/* Filename      : mage.c
 * Description   : an evil woman with spells to cast
 *
 * written       : 30-09-1996 - Gunner
 * last modified : 30-09-1996 - Gunner
 * HTML-Version  : 28-01-2000 - Ghorwin
 */

#include <mudlib.h>
inherit I_MONSTER;            // inherit "/std/monster.c"

create()
{
    ::create();
    set_name("evil mage");
    add_id(({"mage","angry mage","woman","angry woman","evil woman"}));
    set_short("An evil mage");
    set_long("The evil mage looks upon you with pure evil in her eyes. "
        "She seems to be angry with you. Maybe she doesn't like to "
        "be disturbed by the likes of you.\n");
    add_item(({"eye","eyes","evil eye","evil eyes","death"}),
        "As you stare into her eyes you see nothing but death.\n");
    set_race("elf");          // She's an elf, this one...
    set_level(20);
    set_str(15+random(5));    // Let's make the stats more random...
    set_dex(15+random(5));
    set_hp(500);              // Lots of hps...
    set_sp(500);              // Lots of sps...
    set_aggressivity(50);     // 50% aggressive... She will attack...
    set_gender(2);            // A woman...
    set_al(-500);             // An evil mage...
    add_exp(500000);          // More experience for the killer...
    set_wc(20);               // Weapon class...
    set_ac(10);               // Armour class...

                /* Let's give her a spell to cast...  */
    set_spell_mess1("The evil mage sends a ball of fire right at #N!\n");
    set_spell_mess2("The evil mage sends a ball of fire right at you!\n");
    set_spell_dam(50+random(30));
    set_spell_dam_type("fire");
    set_spell_chance(10+random(10));
    replace_program(I_MONSTER);
}