#include "path.h" inherit "/obj/monster"; string *colors = ({"scrawny","mangy","black","fat","albino","brown"}); void setup() { int i; i = random(sizeof(colors)); set_name("rat"); set_short("rat"); set_long(" A wary "+colors[i]+" rat. " "With all the cats and dogs around a rat's life is short, nasty, and brutish. " "You aren't likely to change that either, are you ?. " "\n"); set_random_stats(2,5); load_chat(10, ({ 1,":squeaks", 1,":preens its whiskers.", })); load_a_chat(100, ({ 1,":bites you!", 1,":chitters at you.", })); set_level(i-3); } //This is supposed to be code for modifying the unarmed combat //of various creatures. I am Talon; however, so not even the gods //know how this will turn out... #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+" "+({"bites","claws","scratches",})[three]+" "+DN+" on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n", "You hit "+DN+".\n", AN+" "+({"bites","claws","scratches",})[three]+" you on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n"}), "kick" :({ AN+" "+({"bites","claws","scratches",})[three]+" "+DN+" on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n", "You hit "+DN+".\n", AN+" "+({"bites","claws","scratches",})[three]+" you on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n"}), "knee" :({ AN+" "+({"bites","claws","scratches",})[three]+" "+DN+" on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n", "You hit "+DN+".\n", AN+" "+({"bites","claws","scratches",})[three]+" you on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n"}), "headbutt":({ AN+" "+({"bites","claws","scratches",})[three]+" "+DN+" on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n", "You hit "+DN+".\n", AN+" "+({"bites","claws","scratches",})[three]+" you on the "+({"arm","hand","leg","neck","thigh",})[five]+".\n"}), ]);} //For more information on this code see /w/sojan/combat/unarmed_combat.c