LOP/
LOP/area/
LOP/boards/
LOP/channels/
LOP/clans/
LOP/classes/
LOP/color/
LOP/councils/
LOP/deity/
LOP/races/
LOP/src/specials/
/*****************************************************************************
 * DikuMUD (C) 1990, 1991 by:                                                *
 *   Sebastian Hammer, Michael Seifert, Hans Henrik Staefeldt, Tom Madsen,   *
 *   and Katja Nyboe.                                                        *
 *---------------------------------------------------------------------------*
 * MERC 2.1 (C) 1992, 1993 by:                                               *
 *   Michael Chastain, Michael Quan, and Mitchell Tse.                       *
 *---------------------------------------------------------------------------*
 * SMAUG 1.4 (C) 1994, 1995, 1996, 1998 by: Derek Snider.                    *
 *   Team: Thoric, Altrag, Blodkai, Narn, Haus, Scryn, Rennard, Swordbearer, *
 *         gorog, Grishnakh, Nivek, Tricops, and Fireblade.                  *
 *---------------------------------------------------------------------------*
 * SMAUG 1.7 FUSS by: Samson and others of the SMAUG community.              *
 *                    Their contributions are greatly appreciated.           *
 *---------------------------------------------------------------------------*
 * LoP (C) 2006, 2007, 2008 by: the LoP team.                                *
 *---------------------------------------------------------------------------*
 *			     Mud constants module			     *
 *****************************************************************************/

#include <stdio.h>
#include "h/mud.h"

char *const he_she[]  = { "it",  "he",  "she" };
char *const him_her[] = { "it",  "him", "her" };
char *const his_her[] = { "its", "his", "her" };

char *con_state( short state )
{
   if( state == CON_GET_NAME )              return "Get Name";
   if( state == CON_GET_OLD_PASSWORD )      return "Get Password";
   if( state == CON_CONFIRM_NEW_NAME )      return "Confirm Name";
   if( state == CON_GET_NEW_PASSWORD )      return "New Password";
   if( state == CON_CONFIRM_NEW_PASSWORD )  return "Confirm Password";
   if( state == CON_GET_NEW_SEX )           return "New Sex";
   if( state == CON_READ_MOTD )             return "Read MOTD";
   if( state == CON_GET_NEW_RACE )          return "New Race";
   if( state == CON_GET_NEW_CLASS )         return "New Class";
   if( state == CON_GET_WANT_ANSI )         return "Want ANSI";
   if( state == CON_PRESS_ENTER )           return "Press Enter";
   if( state == CON_COPYOVER_RECOVER )      return "Copyover Recover";
   if( state == CON_GET_PKILL )             return "Get PKill";
   if( state == CON_PLAYING )               return "Playing";
   if( state == CON_EDITING )               return "Editing";
   return "Unknown";
};

char *const perms_flag[] =
{
   "all", "imm", "builder", "leader", "head",
   "imp", "max"
};

char *const save_flag[] =
{
   "death",    "kill",  "passwd",  "drop",     "put",
   "give",     "auto",  "zap",     "auction",  "get",
   "receive",  "idle",  "fill",    "empty",    "max"
};

char *const stattypes[] =
{
   "strength", "intelligence", "wisdom", "dexterity", "constitution",
   "charisma", "luck",         "max"
};

int const lang_array[] =
{
   LANG_COMMON, LANG_UNKNOWN
};

char *const lang_names[] =
{
   "common", "max"
};

char *const channelflags[] =
{
   "global",   "yell",       "log",       "clan",
   "council",  "tells",      "racetalk",  "whisper",
   "nation",   "classtalk",  "max"
};

char *const spell_flag[] =
{
   "water",        "area",        "distant",     "noself",
   "accumulative", "recastable",  "canscribe",   "canbrew",
   "group",        "object",      "character",   "secretskill",
   "pksensitive",  "stoponfail",  "nofight",     "nodispel",
   "canmix",       "canconcoct",  "cancarve",    "canimbue",
   "max"
};

char *const spell_saves[] =
{
   "none",   "poison_death", "wands", "para_petri",
   "breath", "spell_staff",  "max"
};

char *const spell_save_effect[] =
{
   "none",    "negate",  "eightdam", "quarterdam",
   "halfdam", "3qtrdam", "reflect",  "absorb",
   "max"
};

char *const spell_damage[] =
{
   "none",   "fire", "wind",   "earth",
   "water",  "ice",  "cold",   "electricity",
   "energy", "acid", "poison", "drain",
   "holy",   "shadow", "max"
};

char *const spell_action[] =
{
   "none",    "create",   "destroy", "resist",
   "suscept", "divinate", "obscure", "change",
   "max"
};

char *const spell_power[] =
{
   "none", "minor", "greater", "major",
   "max"
};

char *const spell_class[] =
{
   "none",   "lunar", "solar", "travel",
   "summon", "life",  "death", "illusion",
   "max"
};

char *const target_type[] =
{
   "ignore", "offensive", "defensive", "self",
   "objinv", "max"
};

char *const trap_flags[] =
{
   "room",    "obj",    "enter", "leave",
   "open",    "close",  "get",   "put",
   "pick",    "unlock", "north", "south",
   "east",    "west",   "up",    "down",
   "examine", "ne",     "nw",    "se",
   "sw",      "max"
};

char *const cmd_flags[] =
{
   "polymorphed",  "noshow",    "npc",   "pc",
   "allow_tilde",  "fullname",  "max"
};

char *const style_names[] =
{
   "berserk", "aggressive", "standard", "defensive",
   "evasive", "max"
};

char *const a_types[] =
{
   "none",         "affected",     "resistant",  "immune",
   "susceptible",  "weaponspell",  "wearspell",  "removespell",
   "stripsn",      "hit",          "mana",       "blood",
   "move",         "hitroll",      "damroll",    "armor",
   "max"
};

char *const ris_flags[] =
{
   "fire",     "wind",     "earth",       "water",
   "ice",      "cold",     "electricity", "energy",
   "blunt",    "pierce",   "slash",       "acid",
   "poison",   "drain",    "sleep",       "charm",
   "nonmagic", "magic",    "paralysis",   "holy",
   "shadow",   "max"
};

char *const a_flags[] =
{
   "none",          "blind",           "invisible",      "detect_evil",
   "detect_invis",  "detect_magic",    "detect_hidden",  "sanctuary",
   "faerie_fire",   "infrared",        "curse",          "poison",
   "protect",       "paralysis",       "sneak",          "hide",
   "sleep",         "charm",           "flying",         "pass_door",
   "floating",      "truesight",       "detect_traps",   "scrying",
   "fireshield",    "shockshield",     "iceshield",      "berserk",
   "aqua_breath",   "acidmist",        "venomshield",    "detect_sneak",
   "max"
};

char *const attack_flags[] =
{
   "bite",        "claws",          "tail",        "punch",
   "kick",        "trip",           "bash",        "stun",
   "gouge",       "backstab",       "feed",        "drain",
   "firebreath",  "frostbreath",    "acidbreath",  "lightnbreath",
   "gasbreath",   "poison",         "blindness",   "causeserious",
   "earthquake",  "causecritical",  "curse",       "fireball",
   "max"
};

char *const defense_flags[] =
{
   "parry",       "dodge",        "heal",        "curelight",
   "cureserious", "curecritical", "dispelmagic", "dispelevil",
   "sanctuary",   "fireshield",   "shockshield", "shield",
   "bless",       "stoneskin",    "teleport",    "disarm",
   "iceshield",   "grip",         "truesight",   "acidmist",
   "venomshield", "max"
};

char *const plr_flags[] =
{
   "npc",       "shovedrag",   "autoexits",     "autoloot",
   "autosac",   "blank",       "brief",         "combine",
   "prompt",    "telnet_ga",   "holylight",     "wizinvis",
   "silence",   "noemote",     "notell",        "deny",
   "freeze",    "ansi",        "nice",          "flee",
   "autogold",  "afk",         "keepalive",     "questor",
   "telloff",   "whisperoff",  "compass",       "solo",
   "suicide",   "noassist",    "groupaffects",  "nohints",
   "smartsac",  "noinduct",    "autosplit",     "max"
};

char *const act_flags[] =
{
   "npc",         "sentinel",    "scavenger",   "aggressive",
   "stayarea",    "wimpy",       "pet",         "practice",
   "immortal",    "meta_aggr",   "running",     "mountable",
   "mounted",     "scholar",     "secretive",   "hardhat",
   "mobinvis",    "noassist",    "pacifist",    "noattack",
   "annoying",    "statshield",  "prototype",   "banker",
   "questgiver",  "undertaker",  "max"
};

char *const o_types[] =
{
   "none",           "light",        "scroll",     "wand",
   "staff",          "weapon",       "treasure",   "armor",
   "potion",         "trash",        "container",  "drinkcon",
   "key",            "food",         "money",      "boat",
   "corpse",         "corpse_pc",    "fountain",   "pill",
   "blood",          "bloodstain",   "scraps",     "pipe",
   "herbcon",        "herb",         "fire",       "switch",
   "lever",          "pullchain",    "button",     "trap",
   "map",            "portal",       "paper",      "lockpick",
   "missileweapon",  "projectile",   "quiver",     "shovel",
   "salve",          "cook",         "keyring",    "gem",
   "mortar",         "powder",       "axe",        "wood",
   "fish",           "fishingpole",  "max"
};

char *const pc_flags[] =
{
   "deadly",  "unauthed",   "norecall",  "nointro",
   "gag",     "retired",    "guest",     "nosummon",
   "pager",   "notitled",   "groupwho",  "dnd",
   "idle",    "nopdelete",  "max"
};

char *const r_flags[] =
{
   "dark",           "death",     "nomob",         "indoors",
   "nomagic",        "tunnel",    "private",       "safe",
   "solitary",       "petshop",   "norecall",      "donation",
   "nodropall",      "silence",   "logspeech",     "nodrop",
   "clanstoreroom",  "nosummon",  "noastral",      "teleport",
   "teleshowdesc",   "nofloor",   "nosupplicate",  "arena",
   "nomissile",      "dnd",       "locker",        "max"
};

char *const ex_flags[] =
{
   "isdoor",     "closed",     "locked",     "secret",
   "swim",       "pickproof",  "fly",        "climb",
   "dig",        "eatkey",     "nopassdoor", "hidden",
   "passage",    "portal",     "can_climb",  "can_enter",
   "can_leave",  "auto",       "noflee",     "searchable",
   "bashed",     "bashproof",  "nomob",      "window",
   "can_look",   "isbolt",     "bolted",     "mcreated",
   "max"
};

char *const w_flags[] =
{
   "notake",    "head",     "ears",    "ear",
   "eyes",      "eye",      "face",    "neck",
   "shoulders", "shoulder", "about",   "body",
   "back",      "arms",     "arm",     "wrists",
   "wrist",     "hands",    "hand",    "fingers",
   "finger",    "2hands",   "hold",    "waist",
   "legs",      "leg",      "ankles",  "ankle",
   "feet",      "foot",     "max"
};

char *const item_w_flags[] =
{
   "notake",   "head",    "ears",      "ear",
   "ear",      "eyes",    "eye",       "eye",
   "face",     "neck",    "shoulders", "shoulder",
   "shoulder", "about",   "body",      "back",
   "arms",     "arm",     "arm",       "wrists",
   "wrist",    "wrist",   "hands",     "hand",
   "hand",     "fingers", "finger",    "finger",
   "2hand",    "hold",    "hold",      "waist",
   "legs",     "leg",     "leg",       "ankles",
   "ankle",    "ankle",   "feet",      "foot",
   "foot",     "max"
};

char *const wear_locs[] =
{
   "head",    "ears",      "ear1",      "ear2",
   "eyes",    "eye1",      "eye2",      "face",
   "neck",    "shoulders", "shoulder1", "shoulder2",
   "about",   "body",      "back",      "arms",
   "arm1",    "arm2",      "wrists",    "wrist1",
   "wrist2",  "hands",     "hand1",     "hand2",
   "fingers", "finger1",   "finger2",   "2hand",
   "hold1",   "hold2",     "waist",     "legs",
   "leg1",    "leg2",      "ankles",    "ankle1",
   "ankle2",  "feet",      "foot1",     "foot2",
   "max"
};

char *const where_name[] =
{
   "<worn on head>              ",
   "<worn on ears>              ", "<worn on left ear>          ",  "<worn on right ear>         ",
   "<worn on eyes>              ", "<worn on left eye>          ",  "<worn on right eye>         ",
   "<worn over face>            ",
   "<worn on neck>              ",
   "<worn on shoulders>         ", "<worn on left shoulder>     ",  "<worn on right shoulder>    ",
   "<worn about body>           ",
   "<worn on body>              ",
   "<worn on back>              ",
   "<worn on arms>              ", "<worn on left arm>          ",  "<worn on right arm>         ",
   "<worn around wrists>        ", "<worn around left wrist>    ",  "<worn around right wrist>   ",
   "<worn on hands>             ", "<worn on left hand>         ",  "<worn on right hand>        ",
   "<worn on fingers>           ", "<worn on left ring finger>  ",  "<worn on right ring finger> ",
   "<held in both hands>        ", "<held in left hand>         ",  "<held in right hand>        ",
   "<worn around waist>         ",
   "<worn on legs>              ", "<worn on left leg>          ",  "<worn on right leg>         ",
   "<worn around ankles>        ", "<worn around left ankle>    ",  "<worn around right ankle>   ",
   "<worn on feet>              ", "<worn on left foot>         ",  "<worn on right foot>        "
};

char *const o_flags[] =
{
   "glow",         "loyal",       "invis",       "magic",
   "nodrop",       "bless",       "antigood",    "antievil",
   "antineutral",  "noremove",    "inventory",   "organic",
   "metal",        "donation",    "clanobject",  "clancorpse",
   "hidden",       "poisoned",    "covering",    "deathrot",
   "buried",       "prototype",   "nolocate",    "groundrot",
   "pkdisarmed",   "noscrap",     "enchanted",   "max"
};

char *const area_flags[] =
{
   "nopkill",   "freekill",   "noteleport",   "prototype",
   "noquest",   "max"
};

char *const sect_flags[] =
{
   "inside",     "city",        "field",      "forest",
   "hills",      "mountain",    "water_swim", "water_noswim",
   "underwater", "air",         "desert",     "dunno",
   "oceanfloor", "underground", "lava",       "swamp",
   "max"
};

char *const pos_names[] =
{
   "dead",     "mortal",   "incap",     "stunned",
   "sleeping", "berserk",  "resting",   "aggressive",
   "sitting",  "fighting", "defensive", "evasive",
   "standing", "mounted",  "shove",     "drag",
   "max"
};

char *const sex_names[] =
{
   "neutral", "male", "female", "max"
};

/* Part things */
char *const part_flags[] =
{
   "head",      "arms",      "legs",       "heart",
   "brains",    "guts",      "hands",      "feet",
   "fingers",   "ear",       "eye",        "long_tongue",
   "eyestalks", "tentacles", "fins",       "wings",
   "tail",      "scales",    "claws",      "fangs",
   "horns",     "tusks",     "tailattack", "sharpscales",
   "beak",      "haunches",  "hooves",     "paws",
   "forelegs",  "feathers",  "max"
};

/* Vnums for the various bodyparts */
int part_vnums[] =
{
   12, /* Head */       14, /* arms */       15, /* legs */        13, /* heart */
   44, /* brains */     16, /* guts */       45, /* hands */       46, /* feet */
   47, /* fingers */    48, /* ear */        49, /* eye */         50, /* long_tongue */
   51, /* eyestalks */  52, /* tentacles */  53, /* fins */        54, /* wings */
   55, /* tail */       56, /* scales */     59, /* claws */       87, /* fangs */
   58, /* horns */      57, /* tusks */      55, /* tailattack */  85, /* sharpscales */
   84, /* beak */       86, /* haunches */   83, /* hooves */      82, /* paws */
   81, /* forelegs */   80, /* feathers */   0   /* max */
};

/* Messages for flinging off the various bodyparts */
char *part_messages[] =
{
   "$n's severed head plops from its neck.",
   "$n's arm is sliced from $s dead body.",
   "$n's leg is sliced from $s dead body.",
   "$n's heart is torn from $s chest.",
   "$n's brains spill grotesquely from $s head.",
   "$n's guts spill grotesquely from $s torso.",
   "$n's hand is sliced from $s dead body.",
   "$n's foot is sliced from $s dead body.",
   "A finger is sliced from $n's dead body.",
   "$n's ear is sliced from $s dead body.",
   "$n's eye is gouged from its socket.",
   "$n's tongue is torn from $s mouth.",
   "An eyestalk is sliced from $n's dead body.",
   "A tentacle is severed from $n's dead body.",
   "A fin is sliced from $n's dead body.",
   "A wing is severed from $n's dead body.",
   "$n's tail is sliced from $s dead body.",
   "A scale falls from the body of $n.",
   "A claw is torn from $n's dead body.",
   "$n's fangs are torn from $s mouth.",
   "A horn is wrenched from the body of $n.",
   "$n's tusk is torn from $s dead body.",
   "$n's tail is sliced from $s dead body.",
   "A ridged scale falls from the body of $n.",
   "$n's beak is sliced from $s dead body.",
   "$n's haunches are sliced from $s dead body.",
   "A hoof is sliced from $n's dead body.",
   "A paw is sliced from $n's dead body.",
   "$n's foreleg is sliced from $s dead body.",
   "Some feathers fall from $n's dead body.",
   "Max Part Message"
};

int get_flag( char *flag, char *const flagarray[], int max )
{
   int x;

   if( !flag || flag[0] == '\0' || !flagarray )
      return -1;
   for( x = 0; x < max; x++ )
   {
      if( !str_cmp( flag, flagarray[x] ) )
         return x;
      /* This check can possibly slow the mud down a bit more...comment it out if it does */
      /* Normaly in things that use get_flag I end it with a max so why not make use of it to */
      if( !str_cmp( "max", flagarray[x] ) )
      {
         bug( "%s: max found at %d when max is %d, breaking out to avoid possible crash.", __FUNCTION__, x, max );
         break;
      }
   }
   return -1;
}

int get_langflag( char *flag )
{
   unsigned int x;

   for( x = 0; lang_array[x] != LANG_UNKNOWN; x++ )
      if( !str_cmp( flag, lang_names[x] ) )
         return lang_array[x];
   return LANG_UNKNOWN;
}

int get_langnum( char *flag )
{
   unsigned int x;

   for( x = 0; lang_array[x] != LANG_UNKNOWN; x++ )
      if( !str_cmp( flag, lang_names[x] ) )
         return x;
   return -1;
}

/*
 * Liquid properties.
 * Used in #OBJECT section of area file.
 */
const struct liq_type liq_table[LIQ_MAX] =
{
   {"unknown", "unknown", {0, 0, 0}}, /* 0 */
   {"water", "clear", {0, 1, 10}},  /*  1 */
   {"beer", "amber", {3, 2, 5}},
   {"wine", "rose", {5, 2, 5}},
   {"ale", "brown", {2, 2, 5}},
   {"dark ale", "dark", {1, 2, 5}}, /* 5 */
   {"whisky", "golden", {6, 1, 4}},
   {"lemonade", "pink", {0, 1, 8}},
   {"firebreather", "boiling", {10, 0, 0}},
   {"local specialty", "everclear", {3, 3, 3}},
   {"slime mold juice", "green", {0, 4, -8}}, /* 10 */
   {"milk", "white", {0, 3, 6}},
   {"tea", "tan", {0, 1, 6}},
   {"coffee", "black", {0, 1, 6}},
   {"blood", "red", {0, 2, -1}},
   {"salt water", "clear", {0, 1, -2}}, /* 15 */
   {"cola", "cherry", {0, 1, 5}},
   {"mead", "honey color", {4, 2, 5}},
   {"grog", "thick brown", {3, 2, 5}}  /* 18 */
};

char *s_blade_messages[24] =
{
   "miss", "barely scratch", "scratch", "nick", "cut", "hit", "tear",
   "rip", "gash", "lacerate", "hack", "maul", "rend", "decimate",
   "mangle", "devastate", "cleave", "butcher", "disembowel",
   "disfigure", "gut", "eviscerate", "slaughter", "annihilate"
};

char *p_blade_messages[24] =
{
   "misses", "barely scratches", "scratches", "nicks", "cuts", "hits",
   "tears", "rips", "gashes", "lacerates", "hacks", "mauls", "rends",
   "decimates", "mangles", "devastates", "cleaves", "butchers",
   "disembowels", "disfigures", "guts", "eviscerates", "slaughters",
   "annihilates"
};

char *s_blunt_messages[24] =
{
   "miss", "barely scuff", "scuff", "pelt", "bruise", "strike", "thrash",
   "batter", "flog", "pummel", "smash", "maul", "bludgeon", "decimate",
   "shatter", "devastate", "maim", "cripple", "mutilate", "disfigure",
   "massacre", "pulverize", "obliterate", "annihilate"
};

char *p_blunt_messages[24] =
{
   "misses", "barely scuffs", "scuffs", "pelts", "bruises", "strikes",
   "thrashes", "batters", "flogs", "pummels", "smashes", "mauls",
   "bludgeons", "decimates", "shatters", "devastates", "maims",
   "cripples", "mutilates", "disfigures", "massacres", "pulverizes",
   "obliterates", "annihilates"
};

char *s_generic_messages[24] =
{
   "miss", "brush", "scratch", "graze", "nick", "jolt", "wound",
   "injure", "hit", "jar", "thrash", "maul", "decimate", "traumatize",
   "devastate", "maim", "demolish", "mutilate", "massacre",
   "pulverize", "destroy", "obliterate", "annihilate",
   "smite"
};

char *p_generic_messages[24] =
{
   "misses", "brushes", "scratches", "grazes", "nicks", "jolts", "wounds",
   "injures", "hits", "jars", "thrashes", "mauls", "decimates", "traumatizes",
   "devastates", "maims", "demolishes", "mutilates", "massacres",
   "pulverizes", "destroys", "obliterates", "annihilates",
   "smites"
};

char *const attack_table[17] =
{
   "hit",    "slice",  "stab",    "slash",
   "whip",   "claw",   "blast",   "pound",
   "crush",  "bite",   "pierce",  "suction",
   "bolt",   "arrow",  "dart",    "stone",
   "pea"
};

char **const s_message_table[17] =
{
   s_generic_messages,  /* hit */
   s_blade_messages,    /* slice */
   s_blade_messages,    /* stab */
   s_blade_messages,    /* slash */
   s_blunt_messages,    /* whip */
   s_blade_messages,    /* claw */
   s_generic_messages,  /* blast */
   s_blunt_messages,    /* pound */
   s_blunt_messages,    /* crush */
   s_blade_messages,    /* bite */
   s_blade_messages,    /* pierce */
   s_blunt_messages,    /* suction */
   s_generic_messages,  /* bolt */
   s_generic_messages,  /* arrow */
   s_generic_messages,  /* dart */
   s_generic_messages,  /* stone */
   s_generic_messages   /* pea */
};

char **const p_message_table[17] =
{
   p_generic_messages,  /* hit */
   p_blade_messages,    /* slice */
   p_blade_messages,    /* stab */
   p_blade_messages,    /* slash */
   p_blunt_messages,    /* whip */
   p_blade_messages,    /* claw */
   p_generic_messages,  /* blast */
   p_blunt_messages,    /* pound */
   p_blunt_messages,    /* crush */
   p_blade_messages,    /* bite */
   p_blade_messages,    /* pierce */
   p_blunt_messages,    /* suction */
   p_generic_messages,  /* bolt */
   p_generic_messages,  /* arrow */
   p_generic_messages,  /* dart */
   p_generic_messages,  /* stone */
   p_generic_messages   /* pea */
};

/* Weather constants - FB */
char *const temp_settings[MAX_CLIMATE] =
{
   "cold",  "cool",  "normal",  "warm",  "hot"
};

char *const precip_settings[MAX_CLIMATE] =
{
   "arid",  "dry",  "normal",  "damp",  "wet"
};

char *const wind_settings[MAX_CLIMATE] =
{
   "still",  "calm",  "normal",  "breezy",  "windy"
};

char *const preciptemp_msg[6][6] =
{
   /* precip = 0 */
   {
      "Frigid temperatures settle over the land",
      "It is bitterly cold",
      "The weather is crisp and dry",
      "A comfortable warmth sets in",
      "A dry heat warms the land",
      "Seething heat bakes the land"
   },
   /* precip = 1 */
   {
      "A few flurries drift from the high clouds",
      "Frozen drops of rain fall from the sky",
      "An occasional raindrop falls to the ground",
      "Mild drops of rain seep from the clouds",
      "It is very warm, and the sky is overcast",
      "High humidity intensifies the seering heat"
   },
   /* precip = 2 */
   {
      "A brief snow squall dusts the earth",
      "A light flurry dusts the ground",
      "Light snow drifts down from the heavens",
      "A light drizzle mars an otherwise perfect day",
      "A few drops of rain fall to the warm ground",
      "A light rain falls through the sweltering sky"
   },
   /* precip = 3 */
   {
      "Snowfall covers the frigid earth",
      "Light snow falls to the ground",
      "A brief shower moistens the crisp air",
      "A pleasant rain falls from the heavens",
      "The warm air is heavy with rain",
      "A refreshing shower eases the oppresive heat"
   },
   /* precip = 4 */
   {
      "Sleet falls in sheets through the frosty air",
      "Snow falls quickly, piling upon the cold earth",
      "Rain pelts the ground on this crisp day",
      "Rain drums the ground rythmically",
      "A warm rain drums the ground loudly",
      "Tropical rain showers pelt the seering ground"
   },
   /* precip = 5 */
   {
      "A downpour of frozen rain covers the land in ice",
      "A blizzard blankets everything in pristine white",
      "Torrents of rain fall from a cool sky",
      "A drenching downpour obscures the temperate day",
      "Warm rain pours from the sky",
      "A torrent of rain soaks the heated earth"
   }
};

char *const windtemp_msg[6][6] =
{
   /* wind = 0 */
   {
      "The frigid air is completely still",
      "A cold temperature hangs over the area",
      "The crisp air is eerily calm",
      "The warm air is still",
      "No wind makes the day uncomfortably warm",
      "The stagnant heat is sweltering"
   },
   /* wind = 1 */
   {
      "A light breeze makes the frigid air seem colder",
      "A stirring of the air intensifies the cold",
      "A touch of wind makes the day cool",
      "It is a temperate day, with a slight breeze",
      "It is very warm, the air stirs slightly",
      "A faint breeze stirs the feverish air"
   },
   /* wind = 2 */
   {
      "A breeze gives the frigid air bite",
      "A breeze swirls the cold air",
      "A lively breeze cools the area",
      "It is a temperate day, with a pleasant breeze",
      "Very warm breezes buffet the area",
      "A breeze ciculates the sweltering air"
   },
   /* wind = 3 */
   {
      "Stiff gusts add cold to the frigid air",
      "The cold air is agitated by gusts of wind",
      "Wind blows in from the north, cooling the area",
      "Gusty winds mix the temperate air",
      "Brief gusts of wind punctuate the warm day",
      "Wind attempts to cut the sweltering heat"
   },
   /* wind = 4 */
   {
      "The frigid air whirls in gusts of wind",
      "A strong, cold wind blows in from the north",
      "Strong wind makes the cool air nip",
      "It is a pleasant day, with gusty winds",
      "Warm, gusty winds move through the area",
      "Blustering winds punctuate the seering heat"
   },
   /* wind = 5 */
   {
      "A frigid gale sets bones shivering",
      "Howling gusts of wind cut the cold air",
      "An angry wind whips the air into a frenzy",
      "Fierce winds tear through the tepid air",
      "Gale-like winds whip up the warm air",
      "Monsoon winds tear the feverish air"
   }
};

char *const precip_msg[3] =
{
   "there is not a cloud in the sky",
   "pristine white clouds are in the sky",
   "thick, grey clouds mask the sun"
};

char *const wind_msg[6] =
{
   "there is not a breath of wind in the air",
   "a slight breeze stirs the air",
   "a breeze wafts through the area",
   "brief gusts of wind punctuate the air",
   "angry gusts of wind blow",
   "howling winds whip the air into a frenzy"
};

/* See if character is holding a type of eq */
OBJ_DATA *get_eq_hold( CHAR_DATA *ch, int type )
{
   OBJ_DATA *obj, *maxobj = NULL;

   for( obj = ch->first_carrying; obj; obj = obj->next_content )
   {
      if( ( obj->wear_loc == WEAR_HOLD_B || obj->wear_loc == WEAR_HOLD_L
      || obj->wear_loc == WEAR_HOLD_R ) && obj->item_type == type )
      {
         if( !obj->pIndexData->layers )
            return obj;
         else if( !maxobj || obj->pIndexData->layers > maxobj->pIndexData->layers )
            maxobj = obj;
      }
   }
   return maxobj;
}

/* This one is used incase you want to get another hold item then the other one */
OBJ_DATA *get_next_eq_hold( CHAR_DATA *ch, OBJ_DATA *oobj, int type )
{
   OBJ_DATA *obj, *maxobj = NULL;

   for( obj = ch->first_carrying; obj; obj = obj->next_content )
   {
      if( oobj && oobj == obj )
         continue;
      if( ( obj->wear_loc == WEAR_HOLD_B || obj->wear_loc == WEAR_HOLD_L
      || obj->wear_loc == WEAR_HOLD_R ) && obj->item_type == type )
      {
         if( !obj->pIndexData->layers )
            return obj;
         else if( !maxobj || obj->pIndexData->layers > maxobj->pIndexData->layers )
            maxobj = obj;
      }
   }
   return maxobj;
}

int get_ac( CHAR_DATA *ch )
{
   if( !ch )
      return 0;
   return ( ch->armor + ( is_awake( ch ) ? ( get_curr_dex( ch ) / 5 ) : 0 ) );
}

int get_hitroll( CHAR_DATA *ch )
{
   if( !ch )
      return 0;
   return ( ch->hitroll + ( get_curr_dex( ch ) - ( get_curr_str( ch ) / 2 ) ) + ( 2 - ( abs( ch->mental_state ) / 10 ) ) );
}

int get_damroll( CHAR_DATA *ch )
{
   if( !ch )
      return 0;
   return ( ch->damroll + ( get_curr_str( ch ) - ( get_curr_dex( ch ) / 2 ) ) + ( 2 - ( abs( ch->mental_state ) / 10 ) ) );
}