HORSE.C

LIB3/D/HOME/CITY/MONSTERS/HORSE.C · 1.0 KB

From the archive nm4dos.zip

Download the archive   « Back to the archive contents

inherit "/obj/monster";
#include "path.h"

setup() {
   set_name("horse");
   set_short("horse");
   set_race("horse");
   set_long("A horse, with four legs.\n");
   set_main_plural("horses");
   add_attack("bite", 0, 50, ({10, 2, 10}), ({ }), ({ }), "sharp");
   add_attack("stomp", 0, 50, ({20, 2, 15}), ({ }), ({ }), "blunt");
   set_gender(0);
   set_level(1+random(3));
load_chat(20, ({
     1, "'neigh.\n",
     1, ":whinnys at you.\n",
     1, ":eats some grass.\n",
    }));
}

int write_message(int dam,object him,object me,string type,string attack)
{
   switch (attack)
   {
      case "bite" :
      say(me->query_cap_name()+" bites "+
         him->query_name()+".\n",him);
      tell_object(him,me->query_cap_name()+" bites you.\n");
      break;
      case "stomp" :
      say(me->query_cap_name()+" tramples on "+
         him->query_name()+".\n",him);
      tell_object(him,me->query_cap_name()+" tramples on you.\n");
      break;
      default :
      ::write_message(dam, him, me, type, attack);
      break;
   }
}

Site Stats

Snippets: 1791
Codebases: 571