troll.c - example for course 11

[previous example] [course 11] [Table of contents] [next example]
/* Filename      : troll.c
 * Description   : the bad guy
 *
 * written       : 23-12-1996 - Gunner
 * last modified : 23-12-1996 - Gunner
 * HTML-Version  : 06-02-2000 - Ghorwin
 */

#include <mudlib.h>
inherit I_MONSTER;

create()
{
    ::create();
    set_name("ugly troll");
    add_id(({"troll","big troll"}));
    set_short("An ugly troll");
    set_long("This sure is an ugly troll. And it is big, too. Maybe you "
        "should just leave it alone?\n");
    set_level(15);
    set_race("troll");
    set_hp(200);
    set_ac(5);
    set_wc(10);
    load_chat(10,({
        "The troll screams: ''The necklace is mine now!''\n",
        "The troll shouts: ''You can't have it! It's mine!''\n"}));
    load_a_chat(10,({
        "The troll screams: ''The necklace is mine now!''\n",
        "The troll shouts: ''You can't have it! It's mine!''\n"}));
    add_eq("./necklace",1);
    replace_program(I_MONSTER);
}