#include <mudlib.h>
inherit MONSTER;
void make_items();
void reset(status arg) {
::reset(arg);
if(arg) {
make_items();
return;
}
set_name("earothas");
set_short("Lieutenant Earothas of the city guard");
set_long(
"The lieutenant is a strong, sturdy elf of about 22 human years, \n"+
"with the muscle many warriors would be jealous of. He is here \n"+
"to make sure that no one gets into any trouble.\n");
set_al(1000); /* what a nice guy */
set_race("elf");
set_wander(75, 120);
add_spell_immune("charm");
set_gender(1);
load_chat(10, ({ "Earothas says: Move along quietly then.\n",
"Earothas asks: What are you doing here, fair stranger?\n",
"Earothas polishes his longsword.\n",
"Earothas polishes his breastplate.\n",
"Earothas watches your movements closely.\n",
"Earothas says: Make no trouble while you stay in Tempus.\n",
"Earothas says: Hello fair traveller.\n",
}));
load_a_chat(8,({
"Earothas exclaims: Foul beast!\n",
"Earothas frowns.\n",
"Earothas you dare make me an enemy!\n",
"Earothas says: You shall die, pittiful beast.\n",
"Earothas defends against your blow.\n",
"Earothas deflects your blow.\n",
"Earothas parries your attack.\n",
}));
add_class("mage");
add_class("fighter");
load_spells(20,({
"fire shield", "burning hands", "comet", "chill touch",
"ice storm", "stoneskin", "chain lightning", "death spell",
}));
set_level(26);
set_hp(2500);
add_money(100 + random(500));
set_magic_resist(25 + random(50));
make_items();
set_heart_ob(this_object());
}
void monster_heart_beat() {
int i;
object *bandit;
bandit = all_inventory(environment());
for(i=0; i<sizeof(bandit); i++) { /* this will be a little NPC combat fun */
if(bandit[i] -> id("orc") && living(bandit[i])) {
if(!bandit[i]->add_secondary_attacker(this_object()))
bandit[i]->hit_player(10);
if(!random(5))
tell_room(environment(),
"Earothas exclaims: Putrid orc!\n"); /* he hates orcs */
}
if(bandit[i] -> query_alignment() < -10) {
tell_room(environment(), "Earothas exclaims: Evil scum!\n");
bandit[i] -> hit_player(random(5)); /* ouch! */
}
if(bandit[i] ->id("corpse")) {
tell_room(environment(), "Earothas takes the corpse.\n");
move_object(bandit[i], this_object());
}
}
}
void make_items() {
object obj;
if(!present("sword"))
move_object(clone_object("room/city/monst/lsword"),this_object());
if(!present("armour"))
move_object(clone_object("room/city/monst/plate"),this_object());
if(!present("shield")) {
obj = clone_object(ARMOUR);
obj -> set_name("shield");
obj -> set_type("shield");
obj -> set_ac(2); /* because he is so tough */
obj -> set_weight(2);
obj -> set_value(600);
obj -> set_short("A silver shield");
obj -> set_long(
"This shield bears elvish designs across its middle.\n"+
"The crest on the front is the design of the Tempus \n"+
"city guards.");
move_object(obj,this_object());
}
command("wear shield",this_object());
command("wear armour",this_object());
command("wield sword",this_object());
set_wc(30);
set_ac(20);
}