cave_rat.c

final_realms_fluffos_v1/lib/d/newbie/goblin/npcs/cave_rat.c · 1.9 KB

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

inherit "/obj/monster";

void setup() {
    set_level(2);
    set_wimpy(0);
    set_random_stats(6,13);
    set_str(6);
    set_con(11);
    set_max_hp(15);
    set_gender (1);
    set_al (300);
    set_short("Cave rat");
    set_main_plural("cave rats");
    set_name("rat");
    add_alias("rat");
    add_plural("rats");
    set_long("This is a huge cave rat.  It it is the size of a "
      "small dog.  It's razor sharp teeth and claws make it "
      "look as if this beast could be a dangerous foe.  "
      "\n\n");
    set_aggressive (0);
    add_move_zone("CAVE");
    set_move_after(5,60);
}
//#define AN this_object()->query_cap_name()
//#define DN this_player()->query_cap_name()
#define AN attacker->query_cap_name()
#define DN defender->query_cap_name()

mapping valid_attack()
{

    int two,three,four,five;
    two=random(2);
    three=random(3);
    four=random(4);
    five=random(5);

    return ([
      "punch"   :({ AN+" "+({"claws","scratches",})[two]+" "+DN+" on the "+({"arm","hand","leg","neck",})[four]+".\n",
    "You hit "+DN+".\n",
    AN+" "+({"claws","scratches",})[two]+" you on the "+({"arm","hand","leg","neck",})[four]+".\n"}),
      "kick"    :({ AN+" "+({"bites","chews",})[two]+" "+DN+" on the "+({"arm","hand","leg","neck",})[four]+".\n",
    "You hit "+DN+".\n",
    AN+" "+({"bites","chews",})[two]+" you on the "+({"arm","hand","leg","neck",})[four]+".\n"}),
      "knee"    :({ AN+" "+({"gnaws","slashes",})[two]+" "+DN+" on the "+({"arm","hand","leg","neck",})[four]+".\n",
    "You hit "+DN+".\n",
    AN+" "+({"gnaws","slashes",})[two]+" you on the "+({"arm","hand","leg","neck",})[four]+".\n"}),
      "headbutt":({ AN+" "+({"hits","slaps",})[two]+" "+DN+" on the "+({"arm","hand","leg","neck",})[four]+".\n",
    "You hit "+DN+".\n",
    AN+" "+({"hits","slaps",})[two]+" you on the "+({"arm","hand","leg","neck",})[four]+".\n"}),
    ]);}

//For more information on this code see /w/sojan/combat/unarmed_combat.c

Site Stats

Snippets: 1791
Codebases: 571