circlemud_squared_0.5.153/cnf/
circlemud_squared_0.5.153/etc/
circlemud_squared_0.5.153/etc/etc/
circlemud_squared_0.5.153/etc/house/
circlemud_squared_0.5.153/etc/misc/
circlemud_squared_0.5.153/etc/plralias/A-E/
circlemud_squared_0.5.153/etc/plralias/F-J/
circlemud_squared_0.5.153/etc/plralias/K-O/
circlemud_squared_0.5.153/etc/plralias/P-T/
circlemud_squared_0.5.153/etc/plralias/U-Z/
circlemud_squared_0.5.153/etc/plralias/ZZZ/
circlemud_squared_0.5.153/etc/plrobjs/
circlemud_squared_0.5.153/etc/plrobjs/A-E/
circlemud_squared_0.5.153/etc/plrobjs/F-J/
circlemud_squared_0.5.153/etc/plrobjs/K-O/
circlemud_squared_0.5.153/etc/plrobjs/P-T/
circlemud_squared_0.5.153/etc/plrobjs/U-Z/
circlemud_squared_0.5.153/etc/plrobjs/ZZZ/
circlemud_squared_0.5.153/etc/text/
circlemud_squared_0.5.153/etc/text/help/
circlemud_squared_0.5.153/src/util/
circlemud_squared_0.5.153/src/util/worldconv/
/* ************************************************************************
*   File: constants.c                                   Part of CircleMUD *
*  Usage: Numeric and string contants used by the MUD                     *
*                                                                         *
*  All rights reserved.  See license.doc for complete information.        *
*                                                                         *
*  Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
*  CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.               *
************************************************************************ */

#define __CONSTANTS_C__

#include "conf.h"
#include "sysdep.h"
#include "structs.h"
#include "interpreter.h"	/* alias_data */

cpp_extern const char *circlemud_version =
  "CircleMUD, version 3.1";

/**
 * The authorization level type strings.
 * @var const char**
 */
const char *auth_types[] = {
  /* 0 */ "none",
  /* 1 */ "guest",
  /* 2 */ "player",
  /* 3 */ "wizard",
  /* 4 */ "owner",
          "\n"
};

/* cardinal directions */
const char *dirs[] = {
  /* 0 */ "north",
  /* 1 */ "east",
  /* 2 */ "south",
  /* 3 */ "west",
  /* 4 */ "up",
  /* 5 */ "down",
          "\n"
};

/* ROOM_x */
const char *room_bits[] = {
 /* 00 */ "Dark",
 /* 01 */ "Death",
 /* 02 */ "NoMob",
 /* 03 */ "Indoors",
 /* 04 */ "Peaceful",
 /* 05 */ "Soundproof",
 /* 06 */ "NoTrack",
 /* 07 */ "NoMagic",
 /* 08 */ "Tunnel",
 /* 09 */ "Private",
 /* 10 */ "GodRoom",
 /* 11 */ "House",
 /* 12 */ "HouseCrash",
 /* 13 */ "Atrium",
 /* 14 */ "Olc",
 /* 15 */ "BfsMark",
          "\n"
};

/* Labels for types of zone resets.
 * Known quantity, no need to end with \n
 */
const char *zone_reset_types[] = {
 /* 00 */ "Never",
 /* 01 */ "Empty",
 /* 02 */ "Always"
};

/* EX_x */
const char *exit_bits[] = {
 /* 00 */ "Door",
 /* 01 */ "Closed",
 /* 02 */ "Locked",
 /* 03 */ "Pickproof",
          "\n"
};

/* SECT_ */
const char *sector_types[] = {
 /* 00 */ "Inside",
 /* 01 */ "City",
 /* 02 */ "Field",
 /* 03 */ "Forest",
 /* 04 */ "Hills",
 /* 05 */ "Mountains",
 /* 06 */ "WaterSwimmable",
 /* 07 */ "WaterNotSwimmable",
 /* 08 */ "InFlight",
 /* 09 */ "Underwater",
          "\n"
};

/*
 * SEX_x
 * Not used in sprinttype() so no \n.
 */
const char *genders[] = {
 /* 00 */ "Neuter",
 /* 01 */ "Male",
 /* 02 */ "Female",
          "\n"
};

/* POS_x */
const char *position_types[] = {
 /* 00 */ "Dead",
 /* 01 */ "MortallyWounded",
 /* 02 */ "Incapacitated",
 /* 03 */ "Stunned",
 /* 04 */ "Sleeping",
 /* 05 */ "Resting",
 /* 06 */ "Sitting",
 /* 07 */ "Fighting",
 /* 08 */ "Standing",
          "\n"
};

/* PLR_x */
const char *player_bits[] = {
 /* 00 */ "Killer",
 /* 01 */ "Thief",
 /* 02 */ "Frozen",
 /* 03 */ "DontSet",
 /* 04 */ "Writing",
 /* 05 */ "Mailing",
 /* 06 */ "Crash",
 /* 07 */ "SiteOk",
 /* 08 */ "NoShout",
 /* 09 */ "NoTitle",
 /* 10 */ "Deleted",
 /* 11 */ "LoadRoom",
 /* 12 */ "NoWizList",
 /* 13 */ "NoDelete",
 /* 14 */ "InvisStart",
 /* 15 */ "Cryo",
 /* 16 */ "Dead",    /* You should never see this. */
          "\n"
};

/* MOB_x */
const char *action_bits[] = {
 /* 00 */ "spec",
 /* 01 */ "sentinel",
 /* 02 */ "scavenger",
 /* 03 */ "isNpc",
 /* 04 */ "aware",
 /* 05 */ "aggressive",
 /* 06 */ "stayZone",
 /* 07 */ "wimpy",
 /* 08 */ "aggroEvil",
 /* 09 */ "aggroGood",
 /* 10 */ "aggroNeutral",
 /* 11 */ "memory",
 /* 12 */ "Helper",
 /* 13 */ "noCharm",
 /* 14 */ "noSummon",
 /* 15 */ "noSleep",
 /* 16 */ "noBash",
 /* 17 */ "noBlind",
 /* 18 */ "Dead",    /* You should never see this. */
          "\n"
};

/* PRF_x */
const char *preference_bits[] = {
 /* 00 */ "Brief",
 /* 01 */ "Compact",
 /* 02 */ "Deaf",
 /* 03 */ "NoTell",
 /* 04 */ "DisplayHp",
 /* 05 */ "DisplayMana",
 /* 06 */ "DisplayMove",
 /* 07 */ "AutoExits",
 /* 08 */ "NoHassle",
 /* 09 */ "Quest",
 /* 10 */ "Summon",
 /* 11 */ "NoRepeat",
 /* 12 */ "HolyLight",
 /* 13 */ "Color1",
 /* 14 */ "Color2",
 /* 15 */ "NoWizChat",
 /* 16 */ "Log1",
 /* 17 */ "Log2",
 /* 18 */ "NoAuction",
 /* 19 */ "NoGossip",
 /* 20 */ "NoGratz",
 /* 21 */ "RoomFlags",
 /* 22 */ "DispAuto",
          "\n"
};

/* AFF_x */
const char *affected_bits[] = {
 /* 00 */ "Blind",
 /* 01 */ "Invis",
 /* 02 */ "DetectAlignment",
 /* 03 */ "DetectInvis",
 /* 04 */ "DetectMagic",
 /* 05 */ "SenseLife",
 /* 06 */ "WaterWalk",
 /* 07 */ "Sanctuary",
 /* 08 */ "Group",
 /* 09 */ "Cursed",
 /* 10 */ "Infravision",
 /* 11 */ "Poisoned",
 /* 12 */ "ProtectionFromEvil",
 /* 13 */ "ProtectionFromGood",
 /* 14 */ "Sleep",
 /* 15 */ "NoTrack",
 /* 16 */ "Unused16",
 /* 17 */ "Unused17",
 /* 18 */ "Sneak",
 /* 19 */ "Hide",
 /* 20 */ "Unused20",
 /* 21 */ "Charm",
          "\n"
};

/* Saving Throw Types */
const char *save_types[] = {
 /* 00 */ "paralyzation",
 /* 01 */ "rod",
 /* 02 */ "petrification",
 /* 03 */ "breath",
 /* 04 */ "spell"
};

/* Zone Reset commands */
/* Make sure this order matches the order of ZCMD_s in structs.h */
const char *reset_command_types[] = {
  /* 00 */ "loadMobile",
  /* 01 */ "loadItem",
  /* 02 */ "giveItemToMobile",
  /* 03 */ "doorState",
  /* 04 */ "purgeItem",
  /* 05 */ "purgeMobile",
  /* 06 */ "equipMobile",
  /* 07 */ "putItemInContainer",
  /* 08 */ "stop",
           "\n"
};

const char *door_states[] = {
  /* 00 */ "open",
  /* 01 */ "closed",
  /* 02 */ "locked",
           "\n"
};

const char *equip_slots[] = {
  "light",
  "rightFinger",
  "leftFinger",
  "firstNeck",
  "secondNeck",
  "onBody",
  "head",
  "legs",
  "feet",
  "hands",
  "arms",
  "shield",
  "aboutBody",
  "waist",
  "rightWrist",
  "leftWrist",
  "wielded",
  "held",
  "\n"
};

/* CON_x */
const char *connected_types[] = {
  "Playing",
  "Disconnecting",
  "Get name",
  "Confirm name",
  "Get password",
  "Get new PW",
  "Confirm new PW",
  "Select sex",
  "Select class",
  "Reading MOTD",
  "Main Menu",
  "Get descript.",
  "Changing PW 1",
  "Changing PW 2",
  "Changing PW 3",
  "Self-Delete 1",
  "Self-Delete 2",
  "Disconnecting",
  "\n"
};

/*
 * WEAR_x - for eq list
 * Not use in sprinttype() so no \n.
 */
const char *wear_where[] = {
  "<used as light> ...... ",
  "<worn on finger> ..... ",
  "<worn on finger> ..... ",
  "<worn around neck> ... ",
  "<worn around neck> ... ",
  "<worn on body> ....... ",
  "<worn on head> ....... ",
  "<worn on legs> ....... ",
  "<worn on feet> ....... ",
  "<worn on hands> ...... ",
  "<worn on arms> ....... ",
  "<worn as shield> ..... ",
  "<worn about body> .... ",
  "<worn about waist> ... ",
  "<worn around wrist> .. ",
  "<worn around wrist> .. ",
  "<wielded> ............ ",
  "<held> ............... "
};

/* WEAR_x - for stat */
const char *equipment_types[] = {
  "Used as light",
  "Worn on right finger",
  "Worn on left finger",
  "First worn around Neck",
  "Second worn around Neck",
  "Worn on body",
  "Worn on head",
  "Worn on legs",
  "Worn on feet",
  "Worn on hands",
  "Worn on arms",
  "Worn as shield",
  "Worn about body",
  "Worn around waist",
  "Worn around right wrist",
  "Worn around left wrist",
  "Wielded",
  "Held",
  "\n"
};

/* ITEM_x (ordinal object types) */
const char *item_types[] = {
 /* 00 */ "Undefined",
 /* 01 */ "Light",
 /* 02 */ "Scroll",
 /* 03 */ "Wand",
 /* 04 */ "Staff",
 /* 05 */ "Weapon",
 /* 06 */ "RangedWeapon",
 /* 07 */ "Ammunition",
 /* 08 */ "Treasure",
 /* 09 */ "Armor",
 /* 10 */ "Potion",
 /* 11 */ "Worn",
 /* 12 */ "Other",
 /* 13 */ "Trash",
 /* 14 */ "Trap",
 /* 15 */ "Container",
 /* 16 */ "Note",
 /* 17 */ "LiquidContainer",
 /* 18 */ "Key",
 /* 19 */ "Food",
 /* 20 */ "Money",
 /* 21 */ "Pen",
 /* 22 */ "Boat",
 /* 23 */ "Fountain",
          "\n"
};

/* ITEM_WEAR_ (wear bitvector) */
const char *wear_bits[] = {
 /* 00 */ "Take",
 /* 01 */ "Finger",
 /* 02 */ "Neck",
 /* 03 */ "Body",
 /* 04 */ "Head",
 /* 05 */ "Legs",
 /* 06 */ "Feet",
 /* 07 */ "Hands",
 /* 08 */ "Arms",
 /* 09 */ "Shield",
 /* 10 */ "About",
 /* 11 */ "Waist",
 /* 12 */ "Wrist",
 /* 13 */ "Wield",
 /* 14 */ "Hold",
          "\n"
};

/* ITEM_x (extra bits) */
const char *extra_bits[] = {
 /* 00 */ "glow",
 /* 01 */ "hum",
 /* 02 */ "noRent",
 /* 03 */ "noDonate",
 /* 04 */ "noInvis",
 /* 05 */ "invisible",
 /* 06 */ "magic",
 /* 07 */ "noDrop",
 /* 08 */ "bless",
 /* 09 */ "antiGood",
 /* 10 */ "antiEvil",
 /* 11 */ "antiNeutral",
 /* 12 */ "antiMagicUser",
 /* 13 */ "antiCleric",
 /* 14 */ "antiThief",
 /* 15 */ "antiWarrior",
 /* 16 */ "NoSell",
          "\n"
};

/* APPLY_x */
const char *apply_types[] = {
 /* 00 */ "None",
 /* 01 */ "Strength",
 /* 02 */ "Dexterity",
 /* 03 */ "Intelligence",
 /* 04 */ "Wisdom",
 /* 05 */ "Constitution",
 /* 06 */ "Charisma",
 /* 07 */ "Class",
 /* 08 */ "Level",
 /* 09 */ "Age",
 /* 10 */ "Weight",
 /* 11 */ "Height",
 /* 12 */ "MaxManaPoints",
 /* 13 */ "MaxHitPoints",
 /* 14 */ "MaxMovePoints",
 /* 15 */ "Gold",
 /* 16 */ "Experience",
 /* 17 */ "ArmorClass",
 /* 18 */ "HitRoll",
 /* 19 */ "DamageRoll",
 /* 20 */ "SaveVsParalyze",
 /* 21 */ "SaveVsRod",
 /* 22 */ "SaveVsPetrify",
 /* 23 */ "SaveVsBreath",
 /* 24 */ "SaveVsSpell",
          "\n"
};

/* CONT_x */
const char *container_bits[] = {
 /* 00 */ "Closeable",
 /* 01 */ "Pickproof",
 /* 02 */ "Closed",
 /* 03 */ "Locked",
          "\n",
};

/* LIQ_x */
const char *drinks[] = {
  "water",
  "beer",
  "wine",
  "ale",
  "dark ale",
  "whisky",
  "lemonade",
  "firebreather",
  "local speciality",
  "slime mold juice",
  "milk",
  "tea",
  "coffee",
  "blood",
  "salt water",
  "clear water",
  "\n"
};

/* other constants for liquids ******************************************/

/* one-word alias for each drink */
const char *drinknames[] = {
  "water",
  "beer",
  "wine",
  "ale",
  "ale",
  "whisky",
  "lemonade",
  "firebreather",
  "local",
  "juice",
  "milk",
  "tea",
  "coffee",
  "blood",
  "salt",
  "water",
  "\n"
};

/* effect of drinks on hunger, thirst, and drunkenness -- see values.doc */
int drink_aff[][3] = {
  {0, 1, 10},
  {3, 2, 5},
  {5, 2, 5},
  {2, 2, 5},
  {1, 2, 5},
  {6, 1, 4},
  {0, 1, 8},
  {10, 0, 0},
  {3, 3, 3},
  {0, 4, -8},
  {0, 3, 6},
  {0, 1, 6},
  {0, 1, 6},
  {0, 2, -1},
  {0, 1, -2},
  {0, 0, 13}
};


/* color of the various drinks */
const char *color_liquid[] = {
  "clear",
  "brown",
  "clear",
  "brown",
  "dark",
  "golden",
  "red",
  "green",
  "clear",
  "light green",
  "white",
  "brown",
  "black",
  "red",
  "clear",
  "crystal clear",
  "\n"
};

/*
 * level of fullness for drink containers
 * Not used in sprinttype() so no \n.
 */
const char *fullness[] = {
  "less than half ",
  "about half ",
  "more than half ",
  ""
};

/* str, int, wis, dex, con applies **************************************/

/* [ch] strength apply (all) */
cpp_extern const strApply_t str_app[] = {
  {-5, -4, 0, 0},	/* str = 0 */
  {-5, -4, 3, 1},	/* str = 1 */
  {-3, -2, 3, 2},
  {-3, -1, 10, 3},
  {-2, -1, 25, 4},
  {-2, -1, 55, 5},	/* str = 5 */
  {-1, 0, 80, 6},
  {-1, 0, 90, 7},
  {0, 0, 100, 8},
  {0, 0, 100, 9},
  {0, 0, 115, 10},	/* str = 10 */
  {0, 0, 115, 11},
  {0, 0, 140, 12},
  {0, 0, 140, 13},
  {0, 0, 170, 14},
  {0, 0, 170, 15},	/* str = 15 */
  {0, 1, 195, 16},
  {1, 1, 220, 18},
  {1, 2, 255, 20},	/* str = 18 */
  {3, 7, 640, 40},
  {3, 8, 700, 40},	/* str = 20 */
  {4, 9, 810, 40},
  {4, 10, 970, 40},
  {5, 11, 1130, 40},
  {6, 12, 1440, 40},
  {7, 14, 1750, 40},	/* str = 25 */
  {1, 3, 280, 22},	/* str = 18/0 - 18-50 */
  {2, 3, 305, 24},	/* str = 18/51 - 18-75 */
  {2, 4, 330, 26},	/* str = 18/76 - 18-90 */
  {2, 5, 380, 28},	/* str = 18/91 - 18-99 */
  {3, 6, 480, 30}	/* str = 18/100 */
};

/* [dex] skill apply (thieves only) */
cpp_extern const dexSkillApply_t dex_app_skill[] = {
  {-99, -99, -90, -99, -60},	/* dex = 0 */
  {-90, -90, -60, -90, -50},	/* dex = 1 */
  {-80, -80, -40, -80, -45},
  {-70, -70, -30, -70, -40},
  {-60, -60, -30, -60, -35},
  {-50, -50, -20, -50, -30},	/* dex = 5 */
  {-40, -40, -20, -40, -25},
  {-30, -30, -15, -30, -20},
  {-20, -20, -15, -20, -15},
  {-15, -10, -10, -20, -10},
  {-10, -5, -10, -15, -5},	/* dex = 10 */
  {-5, 0, -5, -10, 0},
  {0, 0, 0, -5, 0},
  {0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0},		/* dex = 15 */
  {0, 5, 0, 0, 0},
  {5, 10, 0, 5, 5},
  {10, 15, 5, 10, 10},		/* dex = 18 */
  {15, 20, 10, 15, 15},
  {15, 20, 10, 15, 15},		/* dex = 20 */
  {20, 25, 10, 15, 20},
  {20, 25, 15, 20, 20},
  {25, 25, 15, 20, 20},
  {25, 30, 15, 25, 25},
  {25, 30, 15, 25, 25}		/* dex = 25 */
};

/* [dex] apply (all) */
cpp_extern const dexApply_t dex_app[] = {
  {-7, -7, 6},		/* dex = 0 */
  {-6, -6, 5},		/* dex = 1 */
  {-4, -4, 5},
  {-3, -3, 4},
  {-2, -2, 3},
  {-1, -1, 2},		/* dex = 5 */
  {0, 0, 1},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},		/* dex = 10 */
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, -1},		/* dex = 15 */
  {1, 1, -2},
  {2, 2, -3},
  {2, 2, -4},		/* dex = 18 */
  {3, 3, -4},
  {3, 3, -4},		/* dex = 20 */
  {4, 4, -5},
  {4, 4, -5},
  {4, 4, -5},
  {5, 5, -6},
  {5, 5, -6}		/* dex = 25 */
};

/* [con] apply (all) */
cpp_extern const conApply_t con_app[] = {
  {-4, 20},		/* con = 0 */
  {-3, 25},		/* con = 1 */
  {-2, 30},
  {-2, 35},
  {-1, 40},
  {-1, 45},		/* con = 5 */
  {-1, 50},
  {0, 55},
  {0, 60},
  {0, 65},
  {0, 70},		/* con = 10 */
  {0, 75},
  {0, 80},
  {0, 85},
  {0, 88},
  {1, 90},		/* con = 15 */
  {2, 95},
  {2, 97},
  {3, 99},		/* con = 18 */
  {3, 99},
  {4, 99},		/* con = 20 */
  {5, 99},
  {5, 99},
  {5, 99},
  {6, 99},
  {6, 99}		/* con = 25 */
};

/* [int] apply (all) */
cpp_extern const intApply_t int_app[] = {
  {3},		/* int = 0 */
  {5},		/* int = 1 */
  {7},
  {8},
  {9},
  {10},		/* int = 5 */
  {11},
  {12},
  {13},
  {15},
  {17},		/* int = 10 */
  {19},
  {22},
  {25},
  {30},
  {35},		/* int = 15 */
  {40},
  {45},
  {50},		/* int = 18 */
  {53},
  {55},		/* int = 20 */
  {56},
  {57},
  {58},
  {59},
  {60}		/* int = 25 */
};

/* [wis] apply (all) */
cpp_extern const wisApply_t wis_app[] = {
  {0},	/* wis = 0 */
  {0},  /* wis = 1 */
  {0},
  {0},
  {0},
  {0},  /* wis = 5 */
  {0},
  {0},
  {0},
  {0},
  {0},  /* wis = 10 */
  {0},
  {2},
  {2},
  {3},
  {3},  /* wis = 15 */
  {3},
  {4},
  {5},	/* wis = 18 */
  {6},
  {6},  /* wis = 20 */
  {6},
  {6},
  {7},
  {7},
  {7}  /* wis = 25 */
};

const char *npc_class_types[] = {
  "Normal",
  "Undead",
  "\n"
};

int rev_dir[] = {
  SOUTH,
  WEST,
  NORTH,
  EAST,
  DOWN,
  UP
};

int movement_loss[] = {
  1,	/* Inside     */
  1,	/* City       */
  2,	/* Field      */
  3,	/* Forest     */
  4,	/* Hills      */
  6,	/* Mountains  */
  4,	/* Swimming   */
  1,	/* Unswimable */
  1,	/* Flying     */
  5     /* Underwater */
};

/* Not used in sprinttype(). */
const char *weekdays[] = {
  "the Day of the Moon",
  "the Day of the Bull",
  "the Day of the Deception",
  "the Day of Thunder",
  "the Day of Freedom",
  "the Day of the Great Gods",
  "the Day of the Sun"
};

/* Not used in sprinttype(). */
const char *month_name[] = {
  "Month of Winter",		/* 0 */
  "Month of the Winter Wolf",
  "Month of the Frost Giant",
  "Month of the Old Forces",
  "Month of the Grand Struggle",
  "Month of the Spring",
  "Month of Nature",
  "Month of Futility",
  "Month of the Dragon",
  "Month of the Sun",
  "Month of the Heat",
  "Month of the Battle",
  "Month of the Dark Shades",
  "Month of the Shadows",
  "Month of the Long Shadows",
  "Month of the Ancient Darkness",
  "Month of the Great Evil"
};

/* --- End of constants arrays. --- */

/*
 * Various arrays we count so we can check the world files.  These
 * must be at the bottom of the file so they're pre-declared.
 */
size_t	room_bits_count = sizeof(room_bits) / sizeof(room_bits[0]) - 1,
	action_bits_count = sizeof(action_bits) / sizeof(action_bits[0]) - 1,
	affected_bits_count = sizeof(affected_bits) / sizeof(affected_bits[0]) - 1,
	extra_bits_count = sizeof(extra_bits) / sizeof(extra_bits[0]) - 1,
	wear_bits_count = sizeof(wear_bits) / sizeof(wear_bits[0]) - 1;