#include <mudlib.h> inherit MONSTER; void make_items(); void reset(status arg) { ::reset(arg); if(arg) { make_items(); return; } set_name("golem"); set_short("Stone golem"); set_long( "This large walking mass of rock stands about 7 feet tall. Its' "+ "sightless \n"+"gaze fills you with dread. In its' massive hands it "+ "is holding a huge sword.\n"+"It seems more intent on keeping "+ "things in than stopping intruders.\n" ); set_al(0); /* flat neutral */ set_race("golem"); add_spell_immune("charm"); set_gender(0); load_a_chat(8,({ "Golem exclaims: Golem must crush !\n", "Golem growls at you.\n", "Golem says: I enforce the will of the mage tower.\n", })); add_class("mage"); add_class("fighter"); load_spells(20,({ "stoneskin" , })); set_level(20); 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++) { /* , taken by josh from the elf dude*/ if(bandit[i] -> id("orc") && living(bandit[i])) { if(!bandit[i]->add_secondary_attacker(this_object())) if(bandit[i] -> query_level() > 5) bandit[i]->hit_player(10); if(!random(5)) tell_room(environment(), "Golem exclaims: Putrid orc!\n"); /* he hates orcs */ } if(bandit[i] -> query_alignment() < -50) { tell_room(environment(), "Golem attacks!\n"); if(bandit[i] -> query_level() > 5) bandit[i] -> hit_player(random(5)); /* ouch! */ } if(bandit[i] ->id("corpse")) { tell_room(environment(), "Golem takes the corpse.\n"); move_object(bandit[i], this_object()); } } } void make_items() { object obj; if(!present("sword")) move_object(clone_object("/players/josh/room/mage/dungeon/obj/bigsword"),this_object()); command("wield sword",this_object()); set_wc(30); set_ac(25); }