/**
* @file structs.h
* @ingroup common
*
* Header file for central structures and constants
*
* @author Part of CircleMUD
*
* @par Copyright:
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University<br>
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
* @par
* All rights reserved. See license.doc for complete information.
*
* @package cs
* @version 1.0
*/
#ifndef __STRUCTS_H__
#define __STRUCTS_H__
#include "base.h"
#include "bits.h"
/*
* Intended use of this macro is to allow external packages to work with
* a variety of CircleMUD versions without modifications. For instance,
* an IS_CORPSE() macro was introduced in pl13. Any future code add-ons
* could take into account the CircleMUD version and supply their own
* definition for the macro if used on an older version of CircleMUD.
* You are supposed to compare this with the macro CIRCLEMUD_VERSION()
* in utils.h. See there for usage.
*/
#define _CIRCLEMUD 0x030100 /**< Major/Minor/Patchlevel - MMmmPP */
#define _CIRCLEMUDSQUARED 0x0005 /**< Major/Minor - MMmm */
/*
* If you want equipment to be automatically equipped to the same place
* it was when players rented, set the define below to 1. Please note
* that this will require erasing or converting all of your rent files.
* And of course, you have to recompile everything. We need this feature
* for CircleMUD to be complete but we refuse to break binary file
* compatibility.
*/
#define USE_AUTOEQ 0 /**< TRUE/FALSE aren't defined yet. */
/* preamble *************************************************************/
/*
* As of bpl20, it should be safe to use unsigned data types for the
* various virtual and real number data types. There really isn't a
* reason to use signed anymore so use the unsigned types and get
* 65,535 objects instead of 32,768.
*
* NOTE: This will likely be unconditionally unsigned later.
*/
#define CIRCLE_UNSIGNED_INDEX 0 /**< 0 = signed, 1 = unsigned */
#if CIRCLE_UNSIGNED_INDEX
# define IDXTYPE ush_int
# define NULL ((IDXTYPE)~0)
# define NOTHING ((IDXTYPE)~0)
# define NOBODY ((IDXTYPE)~0)
#else
# define IDXTYPE sh_int
# define NOTHING (-1) /**< nil reference for objects */
# define NOBODY (-1) /**< nil reference for mobiles */
#endif
#define SPECIAL(name) \
int (name)(charData_t *ch, void *me, const commandData_t *cmd, char *argument)
/**
* @ingroup zone
* @defgroup protoTypes
* @{
*/
#define ZONES (0) /**< Zones */
#define ROOMS (1) /**< Rooms */
#define MOBILES (2) /**< Mobiles */
#define ITEMPS (3) /**< Items */
#define SHOPS (4) /**< Shops */
/**
* @}
*/
/* Not prototyped, but used in functions with some of the above: */
#define DEATHTRAPS (5)
#define WIZROOMS (6)
/* room-related defines *************************************************/
/**
* @ingroup room
* @defgroup directions
* The cardinal directions: used as index to room_data.dir_option[]
* @{
*/
#define DIR_UNDEFINED (-1) /**< The direction is undefined. */
#define NORTH (0) /**< The north direction. */
#define EAST (1) /**< The east direction. */
#define SOUTH (2) /**< The south direction. */
#define WEST (3) /**< The west direction. */
#define UP (4) /**< The up direction. */
#define DOWN (5) /**< The down direction. */
#define NUM_OF_DIRS (6) /**< The number of directions. */
/**
* @}
*/
/**
* @ingroup room
* @defgroup roomFlags
* Room flags: used in room_data.room_flags
* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved")
* @{
*/
#define ROOM_DARK BIT_00 /**< Dark */
#define ROOM_DEATH BIT_01 /**< Death trap */
#define ROOM_NOMOB BIT_02 /**< MOBs not allowed */
#define ROOM_INDOORS BIT_03 /**< Indoors */
#define ROOM_PEACEFUL BIT_04 /**< Violence not allowed */
#define ROOM_SOUNDPROOF BIT_05 /**< Shouts, gossip blocked */
#define ROOM_NOTRACK BIT_06 /**< Track won't go through */
#define ROOM_NOMAGIC BIT_07 /**< Magic not allowed */
#define ROOM_TUNNEL BIT_08 /**< room for only 1 pers */
#define ROOM_PRIVATE BIT_09 /**< Can't teleport in */
#define ROOM_WIZROOM BIT_10 /**< AUTH_WIZARD+ only allowed */
#define ROOM_HOUSE BIT_11 /**< (R) Room is a house */
#define ROOM_HOUSE_CRASH BIT_12 /**< (R) House needs saving */
#define ROOM_ATRIUM BIT_13 /**< (R) The door to a house */
#define ROOM_OLC BIT_14 /**< (R) Modifyable/!compress */
#define ROOM_BFS_MARK BIT_15 /**< (R) breath-first srch mrk */
#define NUM_ROOM_FLAGS (16) /**< The number of room flags. */
/**
* @}
*/
/**
* @ingroup room
* @defgroup exitFlags
* Exit info: used in room_data.dir_option.exit_info
* @{
*/
#define EX_ISDOOR BIT_00 /**< The exit is a door. */
#define EX_CLOSED BIT_01 /**< The door is closed. */
#define EX_LOCKED BIT_02 /**< The door is locked. */
#define EX_PICKPROOF BIT_03 /**< The door can't be lockpicked. */
#define NUM_EXIT_FLAGS (5) /**< The number of EX_xxx flags. */
/**
* @}
*/
/**
* @ingroup room
* @defgroup sectorFlags
* Sector types: used in room_data.sector_type
* @{
*/
#define SECT_INSIDE (0) /**< The room is indoors. */
#define SECT_CITY (1) /**< The room is in a city. */
#define SECT_FIELD (2) /**< The room is in a field. */
#define SECT_FOREST (3) /**< The room is in a forest. */
#define SECT_HILLS (4) /**< The room is in the hills. */
#define SECT_MOUNTAIN (5) /**< The room is on a mountain. */
#define SECT_WATER_SWIM (6) /**< The room is swimmable water. */
#define SECT_WATER_NOSWIM (7) /**< The room is unswimmable water. */
#define SECT_FLYING (8) /**< The room is in mid-air. */
#define SECT_UNDERWATER (9) /**< The room is underwater. */
#define NUM_SECTOR_TYPES (10) /**< The number of sector types. */
/**
* @}
*/
/**
* @ingroup zone
* @defgroup resetTypes
* Types of zone resets
* @{
*/
#define ZONE_RESET_NEVER (0) /**< Never resets */
#define ZONE_RESET_EMPTY (1) /**< Resets only when empty */
#define ZONE_RESET_ALWAYS (2) /**< Always resets */
/**
* @}
*/
/**
* @ingroup zone
* @defgroup resetCommands
* Zone Reset Commands
* @{
*/
#define ZCMD_LOADMOB (0) /**< Load Mobile to Room */
#define ZCMD_LOADITEM (1) /**< Load Item to Room */
#define ZCMD_GIVEITEM (2) /**< Give Item to Mobile */
#define ZCMD_SETDOOR (3) /**< Set Door State */
#define ZCMD_PURGEITEM (4) /**< Remove Item from Room */
#define ZCMD_PURGEMOB (5) /**< Remove Mobile from Room */
#define ZCMD_EQUIPMOB (6) /**< Equip Item to Mobile */
#define ZCMD_PUTITEM (7) /**< Put Item In Item */
#define ZCMD_STOP (8) /**< Last entry in list. */
/**
* @}
*/
/* char and mob-related defines *****************************************/
/** PC classes */
#define CLASS_UNDEFINED (-1) /**< Unknown or undefined class. */
#define CLASS_MAGIC_USER (0) /**< The character is a mage. */
#define CLASS_CLERIC (1) /**< The character is a cleric. */
#define CLASS_THIEF (2) /**< The character is a thief. */
#define CLASS_WARRIOR (3) /**< The character is a warrior. */
#define NUM_CLASSES (4) /**< Must be the number of classes. */
/* NPC classes (currently unused - feel free to implement!) */
#define CLASS_OTHER 0
#define CLASS_UNDEAD 1
#define CLASS_HUMANOID 2
#define CLASS_ANIMAL 3
#define CLASS_DRAGON 4
#define CLASS_GIANT 5
/** Sex */
#define SEX_UNDEFINED (-1) /**< Unknown or undefined gender. */
#define SEX_NEUTRAL (0) /**< The character has no sex. */
#define SEX_MALE (1) /**< The character is male. */
#define SEX_FEMALE (2) /**< The character is female. */
#define NUM_SEXES (3) /**< The number of sex types. */
/** Positions */
#define POS_UNDEFINED (-1) /**< Unknown or undefined position */
#define POS_DEAD (0) /**< The char is dead. */
#define POS_MORTALLYW (1) /**< The char is mortally wounded */
#define POS_INCAP (2) /**< The char is incapacitated. */
#define POS_STUNNED (3) /**< The char has been stunned. */
#define POS_SLEEPING (4) /**< The char is sleeping. */
#define POS_RESTING (5) /**< The char has stopped to rest */
#define POS_SITTING (6) /**< The char is sitting down. */
#define POS_FIGHTING (7) /**< The char is fighting. */
#define POS_STANDING (8) /**< The char is standing up. */
#define NUM_POSITIONS (9) /**< The number of position types. */
/** Player flags: used by char_data.char_specials.act */
#define PLR_KILLER BIT_00 /**< Player is a player-killer */
#define PLR_THIEF BIT_01 /**< Player is a player-thief */
#define PLR_FROZEN BIT_02 /**< Player is frozen */
#define PLR_DONTSET BIT_03 /**< Don't EVER set (ISNPC bit) */
#define PLR_WRITING BIT_04 /**< Player writing (board/mail/olc)*/
#define PLR_MAILING BIT_05 /**< Player is writing mail */
#define PLR_CRASH BIT_06 /**< Player needs to be crash-saved */
#define PLR_SITEOK BIT_07 /**< Player has been site-cleared */
#define PLR_NOSHOUT BIT_08 /**< Player is unable to shout/goss */
#define PLR_NOTITLE BIT_09 /**< Player is unable to set title */
#define PLR_DELETED BIT_10 /**< Player deleted */
#define PLR_LOADROOM BIT_11 /**< Player uses nonstandard loadrm */
#define PLR_NOWIZLIST BIT_12 /**< Player shouldn't be on wizlist */
#define PLR_NODELETE BIT_13 /**< Player shouldn't be deleted */
#define PLR_INVSTART BIT_14 /**< Player enters game wizinvis */
#define PLR_CRYO BIT_15 /**< Player is cryo-saved */
#define PLR_NOTDEADYET BIT_16 /**< (R) Player being extracted. */
#define NUM_PLAYER_FLAGS (17) /**< The number of player flags. */
/** Mobile flags: used by char_data.char_specials.act */
#define MOB_SPEC BIT_00 /**< Mob has a callable spec-proc */
#define MOB_SENTINEL BIT_01 /**< Mob should not move */
#define MOB_SCAVENGER BIT_02 /**< Mob picks up items */
#define MOB_ISNPC BIT_03 /**< (R) AUTO SET ON ALL MOBS */
#define MOB_AWARE BIT_04 /**< Mob can't be backstabbed */
#define MOB_AGGRESSIVE BIT_05 /**< Mob auto-attacks characters */
#define MOB_STAY_ZONE BIT_06 /**< Mob can't leave zone */
#define MOB_WIMPY BIT_07 /**< Mob flees if severely injured */
#define MOB_AGGR_EVIL BIT_08 /**< Auto-attack any evil PC's */
#define MOB_AGGR_GOOD BIT_09 /**< Auto-attack any good PC's */
#define MOB_AGGR_NEUTRAL BIT_10 /**< Auto-attack any neutral PC's */
#define MOB_MEMORY BIT_11 /**< remember attackers if attacked */
#define MOB_HELPER BIT_12 /**< attack PCs fighting other NPCs */
#define MOB_NOCHARM BIT_13 /**< Mob can't be charmed */
#define MOB_NOSUMMON BIT_14 /**< Mob can't be summoned */
#define MOB_NOSLEEP BIT_15 /**< Mob can't be slept */
#define MOB_NOBASH BIT_16 /**< Mob can't be bashed */
#define MOB_NOBLIND BIT_17 /**< Mob can't be blinded */
#define MOB_NOTDEADYET BIT_18 /**< (R) Mob being extracted. */
#define NUM_MOB_FLAGS (19) /**< The number of MOB_xxx flags. */
/** Preference flags: used by char_data.player_specials.pref */
#define PRF_BRIEF BIT_00 /**< Don't show room descriptions. */
#define PRF_COMPACT BIT_01 /**< No extra CRLF before prompts */
#define PRF_DEAF BIT_02 /**< Can't hear shouts */
#define PRF_NOTELL BIT_03 /**< Can't receive tells */
#define PRF_DISPHP BIT_04 /**< Display hit points in prompt */
#define PRF_DISPMANA BIT_05 /**< Display mana points in prompt */
#define PRF_DISPMOVE BIT_06 /**< Display move points in prompt */
#define PRF_AUTOEXIT BIT_07 /**< Display exits in a room */
#define PRF_NOHASSLE BIT_08 /**< Aggr mobs won't attack */
#define PRF_QUEST BIT_09 /**< On quest */
#define PRF_SUMMONABLE BIT_10 /**< Can be summoned */
#define PRF_NOREPEAT BIT_11 /**< No repetition of comm commands */
#define PRF_HOLYLIGHT BIT_12 /**< Can see in dark */
#define PRF_COLOR_1 BIT_13 /**< Color (low bit) */
#define PRF_COLOR_2 BIT_14 /**< Color (high bit) */
#define PRF_NOWIZ BIT_15 /**< Can't hear wizline */
#define PRF_LOG1 BIT_16 /**< On-line System Log (low bit) */
#define PRF_LOG2 BIT_17 /**< On-line System Log (high bit) */
#define PRF_NOAUCT BIT_18 /**< Can't hear auction channel */
#define PRF_NOGOSS BIT_19 /**< Can't hear gossip channel */
#define PRF_NOGRATZ BIT_20 /**< Can't hear grats channel */
#define PRF_ROOMFLAGS BIT_21 /**< Can see room flags (ROOM_x) */
#define PRF_DISPAUTO BIT_22 /**< Show prompt HP, MP, MV if < 30%*/
#define NUM_PREF_FLAGS (23) /**< The number of PRF_xxx flags. */
/** Affect bits: used in char_data.char_specials.affected_by
* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved")
*/
#define AFF_BLIND BIT_00 /**< (R) Char is blind */
#define AFF_INVISIBLE BIT_01 /**< Char is invisible */
#define AFF_DETECT_ALIGN BIT_02 /**< Char is sensitive to align */
#define AFF_DETECT_INVIS BIT_03 /**< Char can see invis chars */
#define AFF_DETECT_MAGIC BIT_04 /**< Char is sensitive to magic */
#define AFF_SENSE_LIFE BIT_05 /**< Char can sense hidden life */
#define AFF_WATERWALK BIT_06 /**< Char can walk on water */
#define AFF_SANCTUARY BIT_07 /**< Char protected by sanct. */
#define AFF_GROUP BIT_08 /**< (R) Char is grouped */
#define AFF_CURSE BIT_09 /**< Char is cursed */
#define AFF_INFRAVISION BIT_10 /**< Char can see in dark */
#define AFF_POISON BIT_11 /**< (R) Char is poisoned */
#define AFF_PROTECT_EVIL BIT_12 /**< Char protected from evil */
#define AFF_PROTECT_GOOD BIT_13 /**< Char protected from good */
#define AFF_SLEEP BIT_14 /**< (R) Char magically asleep */
#define AFF_NOTRACK BIT_15 /**< Char can't be tracked */
#define AFF_UNUSED16 BIT_16 /**< Room for future expansion */
#define AFF_UNUSED17 BIT_17 /**< Room for future expansion */
#define AFF_SNEAK BIT_18 /**< Char can move quietly */
#define AFF_HIDE BIT_19 /**< Char is hidden */
#define AFF_UNUSED20 BIT_20 /**< Room for future expansion */
#define AFF_CHARM BIT_21 /**< Char is charmed */
#define NUM_AFF_FLAGS (22) /**< The number of AFF_xxx flags. */
/** Modes of connectedness: used by descriptor_data.state */
#define CON_PLAYING (0) /**< Playing - Nominal state */
#define CON_CLOSE (1) /**< User disconnect, remove char. */
#define CON_GET_NAME (2) /**< By what name ..? */
#define CON_NAME_CNFRM (3) /**< Did I get that right, x? */
#define CON_PASSWORD (4) /**< Password: */
#define CON_NEWPASSWD (5) /**< Give me a password for x */
#define CON_CNFPASSWD (6) /**< Please retype password: */
#define CON_QSEX (7) /**< Sex? */
#define CON_QCLASS (8) /**< Class? */
#define CON_RMOTD (9) /**< PRESS RETURN after MOTD */
#define CON_MENU (10) /**< Your choice: (main menu) */
#define CON_EXDESC (11) /**< Enter a new description: */
#define CON_CHPWD_GETOLD (12) /**< Changing passwd: get old */
#define CON_CHPWD_GETNEW (13) /**< Changing passwd: get new */
#define CON_CHPWD_VRFY (14) /**< Verify new password */
#define CON_DELCNF1 (15) /**< Delete confirmation 1 */
#define CON_DELCNF2 (16) /**< Delete confirmation 2 */
#define CON_DISCONNECT (17) /**< In-game link loss (leave char) */
#define NUM_CON_TYPES (18) /**< The number of CON_xxx types. */
/** Character equipment positions: used as index for char_data.equipment[]
* NOTE: Don't confuse these constants with the ITEM_ bitvectors
* which control the valid places you can wear a piece of
* equipment
*/
#define WEAR_UNDEFINED (-1) /**< Wear slot is not defined. */
#define WEAR_LIGHT (0) /**< The "light" wear slot. */
#define WEAR_FINGER_R (1) /**< The right ring finger wear slot*/
#define WEAR_FINGER_L (2) /**< The left ring finger wear slot */
#define WEAR_NECK_1 (3) /**< The "neck wear" slot. */
#define WEAR_NECK_2 (4) /**< The "neck wear" slot. */
#define WEAR_BODY (5) /**< The "body wear" slot. */
#define WEAR_HEAD (6) /**< The "head" wear slot. */
#define WEAR_LEGS (7) /**< The "legs" wear slot. */
#define WEAR_FEET (8) /**< The "feet" wear slot. */
#define WEAR_HANDS (9) /**< The "hands" wear slot. */
#define WEAR_ARMS (10) /**< The "arms" wear slot. */
#define WEAR_SHIELD (11) /**< The "shield" wear slot. */
#define WEAR_ABOUT (12) /**< The "about" wear slot. */
#define WEAR_WAIST (13) /**< The "waist" wear slot. */
#define WEAR_WRIST_R (14) /**< The "right wrist' wear slot. */
#define WEAR_WRIST_L (15) /**< The "left wrist" wear slot. */
#define WEAR_WIELD (16) /**< The "wield" wear slot. */
#define WEAR_HOLD (17) /**< The "hold" wear slot. */
#define NUM_WEARS (18) /**< This must be # of eq positions */
/* item-related defines ********************************************/
#define ITEM_UNDEFINED (0) /**< Unknown or undefined item type.*/
#define ITEM_LIGHT (1) /**< The item is a light source. */
#define ITEM_SCROLL (2) /**< The item is a scroll. */
#define ITEM_WAND (3) /**< The item is a wand. */
#define ITEM_STAFF (4) /**< The item is a staff. */
#define ITEM_WEAPON (5) /**< The item is a melee weapon. */
#define ITEM_FIREWEAPON (6) /**< Unimplemented */
#define ITEM_MISSILE (7) /**< Unimplemented */
#define ITEM_TREASURE (8) /**< The item is treasure/jewelry */
#define ITEM_ARMOR (9) /**< The item is armor (clothing) */
#define ITEM_POTION (10) /**< Item is a potion. */
#define ITEM_WORN (11) /**< Unimplemented. */
#define ITEM_OTHER (12) /**< The item is pure miscellany. */
#define ITEM_TRASH (13) /**< Trash - shopkeeps won't buy */
#define ITEM_TRAP (14) /**< Unimplemented */
#define ITEM_CONTAINER (15) /**< The item is a container. */
#define ITEM_NOTE (16) /**< The item is a note. */
#define ITEM_DRINKCON (17) /**< The item is a drink container */
#define ITEM_KEY (18) /**< The item is a key. */
#define ITEM_FOOD (19) /**< The item is food. */
#define ITEM_MONEY (20) /**< The item is money (credits) */
#define ITEM_PEN (21) /**< Item is a pen. */
#define ITEM_BOAT (22) /**< The item is a raft or boat. */
#define ITEM_FOUNTAIN (23) /**< Item is a fountain */
#define NUM_ITEM_TYPES (24) /**< The number of item types. */
#define ITEM_WEAR_TAKE BIT_00 /**< Item can be taken and held. */
#define ITEM_WEAR_FINGER BIT_01 /**< Can be worn on the ring finger.*/
#define ITEM_WEAR_NECK BIT_02 /**< Can be worn around the neck. */
#define ITEM_WEAR_BODY BIT_03 /**< Can be worn on the body. */
#define ITEM_WEAR_HEAD BIT_04 /**< Can be worn on the head. */
#define ITEM_WEAR_LEGS BIT_05 /**< Can be worn on the legs. */
#define ITEM_WEAR_FEET BIT_06 /**< Can be worn on the foot. */
#define ITEM_WEAR_HANDS BIT_07 /**< Can be worn on the hand. */
#define ITEM_WEAR_ARMS BIT_08 /**< Can be worn on the hand. */
#define ITEM_WEAR_SHIELD BIT_09 /**< Can be worn on the hand. */
#define ITEM_WEAR_ABOUT BIT_10 /**< Can be worn about the body. */
#define ITEM_WEAR_WAIST BIT_11 /**< Can be worn around the waist. */
#define ITEM_WEAR_WRIST BIT_12 /**< Can be worn on the wrist. */
#define ITEM_WEAR_WIELD BIT_13 /**< Can be wielded. */
#define ITEM_WEAR_HOLD BIT_14 /**< Can be held. */
#define NUM_ITEM_WEAR_FLAGS (15) /**< The number of ITEM_WEAR_x flags*/
#define ITEM_GLOW BIT_00 /**< The item is glowing. */
#define ITEM_HUM BIT_01 /**< The item is humming. */
#define ITEM_NORENT BIT_02 /**< The item cannot be rented. */
#define ITEM_NODONATE BIT_03 /**< The item cannot be donated. */
#define ITEM_NOINVIS BIT_04 /**< The item cannot be made invis. */
#define ITEM_INVISIBLE BIT_05 /**< The item is invisible. */
#define ITEM_MAGIC BIT_06 /**< The item is magical. */
#define ITEM_NODROP BIT_07 /**< The item is can't be dropped. */
#define ITEM_BLESS BIT_08 /**< The item is blessed. */
#define ITEM_ANTI_GOOD BIT_09 /**< Not usable by good people. */
#define ITEM_ANTI_EVIL BIT_10 /**< Not usable by evil people. */
#define ITEM_ANTI_NEUTRAL BIT_11 /**< Not usable by neutral people. */
#define ITEM_ANTI_MAGIC_USER BIT_12 /**< Not usable by mages. */
#define ITEM_ANTI_CLERIC BIT_13 /**< Not usable by clerics. */
#define ITEM_ANTI_THIEF BIT_14 /**< Not usable by thieves. */
#define ITEM_ANTI_WARRIOR BIT_15 /**< Not usable by warriors. */
#define ITEM_NOSELL BIT_16 /**< Shopkeepers won't touch it. */
#define NUM_ITEM_FLAGS (17) /**< The number of ITEM_x flags. */
/** Modifier constants used with obj affects ('A' fields) */
#define APPLY_UNDEFINED (-1) /**< An undefined or unknown apply. */
#define APPLY_NONE (0) /**< The apply has no effect. */
#define APPLY_STR (1) /**< Apply to strength score. */
#define APPLY_DEX (2) /**< Apply to dexterity score. */
#define APPLY_INT (3) /**< Apply to intelligence score. */
#define APPLY_WIS (4) /**< Apply to wisdom score. */
#define APPLY_CON (5) /**< Apply to constitution score. */
#define APPLY_CHA (6) /**< Apply to charisma score. */
#define APPLY_CLASS (7) /**< Reserved */
#define APPLY_LEVEL (8) /**< Reserved */
#define APPLY_AGE (9) /**< Apply to age. */
#define APPLY_WEIGHT (10) /**< Apply to weight value. */
#define APPLY_HEIGHT (11) /**< Apply to height value. */
#define APPLY_MANA (12) /**< Apply to max mana points. */
#define APPLY_HIT (13) /**< Apply to max hit points. */
#define APPLY_MOVE (14) /**< Apply to max move points. */
#define APPLY_GOLD (15) /**< Reserved */
#define APPLY_EXP (16) /**< Reserved */
#define APPLY_AC (17) /**< Apply to Armor Class. */
#define APPLY_HITROLL (18) /**< Apply to hitroll. */
#define APPLY_DAMROLL (19) /**< Apply to damage roll. */
#define APPLY_SAVING_PARA (20) /**< Apply to save throw: paralz. */
#define APPLY_SAVING_ROD (21) /**< Apply to save throw: rods. */
#define APPLY_SAVING_PETRI (22) /**< Apply to save throw: petrif. */
#define APPLY_SAVING_BREATH (23) /**< Apply to save throw: breath. */
#define APPLY_SAVING_SPELL (24) /**< Apply to save throw: spells. */
#define NUM_APPLIES (25) /**< The number of applies. */
/** Container flags - value[1] */
#define CONT_CLOSEABLE BIT_00 /**< The container can be closed. */
#define CONT_PICKPROOF BIT_01 /**< The container is pickproof. */
#define CONT_CLOSED BIT_02 /**< The container is closed. */
#define CONT_LOCKED BIT_03 /**< The container is locked. */
#define NUM_CONT_FLAGS (4) /**< The number of CONT_xxx flags. */
/* Some different kind of liquids for use in values of drink containers */
#define LIQ_WATER (0)
#define LIQ_BEER (1)
#define LIQ_WINE (2)
#define LIQ_ALE (3)
#define LIQ_DARKALE (4)
#define LIQ_WHISKY (5)
#define LIQ_LEMONADE (6)
#define LIQ_FIREBRT (7)
#define LIQ_LOCALSPC (8)
#define LIQ_SLIME (9)
#define LIQ_MILK (10)
#define LIQ_TEA (11)
#define LIQ_COFFE (12)
#define LIQ_BLOOD (13)
#define LIQ_SALTWATER (14)
#define LIQ_CLEARWATER (15)
/* other miscellaneous defines *******************************************/
/* Player conditions */
#define DRUNK (0)
#define FULL (1)
#define THIRST (2)
/* Sun state for weather_data */
#define SUN_DARK (0)
#define SUN_RISE (1)
#define SUN_LIGHT (2)
#define SUN_SET (3)
/* Sky conditions for weather_data */
#define SKY_CLOUDLESS (0)
#define SKY_CLOUDY (1)
#define SKY_RAINING (2)
#define SKY_LIGHTNING (3)
/* Rent codes */
#define RENT_UNDEF (0)
#define RENT_CRASH (1)
#define RENT_RENTED (2)
#define RENT_CRYO (3)
#define RENT_FORCED (4)
#define RENT_TIMEDOUT (5)
/* other #defined constants **********************************************/
/**
* The authorization levels.
* @{
*/
#define AUTH_NONE (0) /**< The char has no rights at all. */
#define AUTH_GUEST (1) /**< The char has guest rights. */
#define AUTH_PLAYER (2) /**< The char has player rights. */
#define AUTH_WIZARD (3) /**< The char has wizard rights. */
#define AUTH_OWNER (4) /**< The char has owner rights. */
/** @} */
/**
* The authorization level at which a wizard may freeze or thaw other
* players.
* @def (AUTH_WIZARD)
*/
#define AUTH_FREEZE (AUTH_OWNER)
/**
* The number of authorization levels.
* @def (5)
*/
#define NUM_AUTHS (5)
/**
* The number of player levels in the game.
* @def (30)
*/
#define NUM_LEVELS (30)
#define MAGIC_NUMBER (0x06) /* Arbitrary number that won't be in a string */
/*
* OPT_USEC determines how many commands will be processed by the MUD per
* second and how frequently it does socket I/O. A low setting will cause
* actions to be executed more frequently but will increase overhead due to
* more cycling to check. A high setting (e.g. 1 Hz) may upset your players
* as actions (such as large speedwalking chains) take longer to be executed.
* You shouldn't need to adjust this.
*/
#define OPT_USEC 100000 /* 10 passes per second */
#define PASSES_PER_SEC (1000000 / OPT_USEC)
#define RL_SEC * PASSES_PER_SEC
#define PULSE_ZONE (10 RL_SEC)
#define PULSE_MOBILE (10 RL_SEC)
#define PULSE_VIOLENCE ( 2 RL_SEC)
#define PULSE_AUTOSAVE (60 RL_SEC)
#define PULSE_IDLEPWD (15 RL_SEC)
#define PULSE_SANITY (30 RL_SEC)
#define PULSE_USAGE (5 * 60 RL_SEC) /* 5 mins */
#define PULSE_TIMESAVE (30 * 60 RL_SEC) /* should be >= SECS_PER_MUD_HOUR */
/* Variables for the output buffering system */
#define MAX_SOCK_BUF (12 * 1024) /* Size of kernel's sock buf */
#define MAX_PROMPT_LENGTH 96 /* Max length of prompt */
#define GARBAGE_SPACE 32 /* Space for **OVERFLOW** etc */
#define SMALL_BUFSIZE 1024 /* Static output buffer size */
/* Max amount of output that can be buffered */
#define LARGE_BUFSIZE (MAX_SOCK_BUF - GARBAGE_SPACE - MAX_PROMPT_LENGTH)
#define HISTORY_SIZE 5 /* Keep last 5 commands. */
#define MAX_STRING_LENGTH 8192
#define MAX_INPUT_LENGTH 256 /* Max length per *line* of input */
#define MAX_RAW_INPUT_LENGTH 512 /* Max size of *raw* input */
#define MAX_MESSAGES 60
#define MAX_NAME_LENGTH 20 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_PWD_LENGTH 10 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_TITLE_LENGTH 80 /* Used in char_file_u *DO*NOT*CHANGE* */
#define HOST_LENGTH 30 /* Used in char_file_u *DO*NOT*CHANGE* */
#define EXDSCR_LENGTH 240 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_TONGUE 3 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_SKILLS 200 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_AFFECT 32 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_ITEM_AFFECT 6 /* Used in obj_file_elem *DO*NOT*CHANGE* */
#define MAX_NOTE_LENGTH 1000 /* arbitrary */
/*
* A MAX_PWD_LENGTH of 10 will cause BSD-derived systems with MD5 passwords
* and GNU libc 2 passwords to be truncated. On BSD this will enable anyone
* with a name longer than 5 character to log in with any password. If you
* have such a system, it is suggested you change the limit to 20.
*
* Please note that this will erase your player files. If you are not
* prepared to do so, simply erase these lines but heed the above warning.
*/
#if defined(HAVE_UNSAFE_CRYPT) && MAX_PWD_LENGTH == 10
#error You need to increase MAX_PWD_LENGTH to at least 20.
#error See the comment near these errors for more explanation.
#endif
/**********************************************************************
* Structures *
**********************************************************************/
typedef signed char sbyte;
typedef unsigned char ubyte;
typedef signed short int sh_int;
typedef unsigned short int ush_int;
/*
* #if !defined(__cplusplus) * Anyone know a portable method? *
* typedef char bool;
* #endif
*/
#if !defined(CIRCLE_WINDOWS) || defined(LCC_WIN32) /* Hm, sysdep.h? */
typedef signed char byte;
#endif
/* Various virtual (human-reference) number types. */
typedef IDXTYPE roomVnum_t;
typedef IDXTYPE itemVnum_t;
typedef IDXTYPE mobileVnum_t;
typedef IDXTYPE zoneVnum_t;
typedef IDXTYPE shopVnum_t;
/**
* An alias for struct _aliasData_t.
* @typedef struct _aliasData_t
*/
typedef struct _aliasData_t aliasData_t;
/**
* An alias for struct _charAbilities_t.
* @typedef struct _charAbilities_t
*/
typedef struct _charAbilities_t charAbilities_t;
/**
* An alias for struct _charPlayerData_t.
* @typedef struct _charPlayerData_t
*/
typedef struct _charPlayerData_t charPlayerData_t;
/**
* An alias for struct _charPointData_t.
* @typedef struct _charPointData_t
*/
typedef struct _charPointData_t charPointData_t;
/**
* An alias for struct _charSpecials_t.
* @typedef struct _charSpecials_t
*/
typedef struct _charSpecials_t charSpecials_t;
/**
* An alias for struct _conApply_t.
* @typedef struct _conApply_t
*/
typedef struct _conApply_t conApply_t;
/**
* An alias for struct _dexApply_t.
* @typedef struct _dexApply_t
*/
typedef struct _dexApply_t dexApply_t;
/**
* An alias for struct _dexSkillApply_t.
* @typedef struct _dexSkillApply_t
*/
typedef struct _dexSkillApply_t dexSkillApply_t;
/**
* An alias for struct _effectData_t.
* @typedef struct _effectData_t
*/
typedef struct _effectData_t effectData_t;
/**
* An alias for struct _followData_t.
* @typedef struct _followData_t
*/
typedef struct _followData_t followData_t;
/**
* An alias for struct _intApply_t.
* @typedef struct _intApply_t
*/
typedef struct _intApply_t intApply_t;
/**
* An alias for struct _itemEffectData_t.
* @typedef struct _itemEffectData_t
*/
typedef struct _itemEffectData_t itemEffectData_t;
/**
* An alias for struct _itemFlags_t.
* @typedef struct _itemFlags_t
*/
typedef struct _itemFlags_t itemFlags_t;
/**
* An alias for struct _memoryData_t.
* @typedef struct _memoryData_t
*/
typedef struct _memoryData_t memoryData_t;
/**
* An alias for struct _mobileSpecialData_t.
* @typedef struct _mobileSpecialData_t
*/
typedef struct _mobileSpecialData_t mobileSpecialData_t;
/**
* An alias for struct _pfileElement_t.
* @typedef struct _pfileElement_t
*/
typedef struct _pfileElement_t pfileElement_t;
/**
* An alias for struct _playerSpecials_t.
* @typedef struct _playerSpecials_t
*/
typedef struct _playerSpecials_t playerSpecials_t;
/**
* An alias for struct _rentElement_t.
* @typedef struct _rentElement_t
*/
typedef struct _rentElement_t rentElement_t;
/**
* An alias for struct _rentHeader_t.
* @typedef struct _rentHeader_t
*/
typedef struct _rentHeader_t rentHeader_t;
/**
* An alias for struct _savedCharSpecials_t.
* @typedef struct _savedCharSpecials_t
*/
typedef struct _savedCharSpecials_t savedCharSpecials_t;
/**
* An alias for struct _savedPlayerSpecials_t.
* @typedef struct _savedPlayerSpecials_t
*/
typedef struct _savedPlayerSpecials_t savedPlayerSpecials_t;
/**
* An alias for struct _socialData_t.
* @typedef struct _socialData_t
*/
typedef struct _socialData_t socialData_t;
/**
* An alias for struct _strApply_t.
* @typedef struct _strApply_t
*/
typedef struct _strApply_t strApply_t;
/**
* An alias for struct _textBlock_t.
* @typedef struct _textBlock_t
*/
typedef struct _textBlock_t textBlock_t;
/**
* An alias for struct _textQueue_t.
* @typedef struct _textQueue_t
*/
typedef struct _textQueue_t textQueue_t;
/**
* An alias for struct _timeData_t.
* @typedef struct _timeData_t
*/
typedef struct _timeData_t timeData_t;
/**
* An alias for struct _timeInfoData_t.
* @typedef struct _timeInfoData_t
*/
typedef struct _timeInfoData_t timeInfoData_t;
/**
* An alias for struct _weatherData_t.
* @typedef struct _weatherData_t
*/
typedef struct _weatherData_t weatherData_t;
/**
* An alias for struct _wisApply_t.
* @typedef struct _wisApply_t
*/
typedef struct _wisApply_t wisApply_t;
/**
* Bitvector type for 32 bit unsigned long bitvectors.
* 'unsigned long long' will give you at least 64 bits if you have GCC.
*
* Since we don't want to break the pfiles, you'll have to search throughout
* the code for "bitvector_t" and change them yourself if you'd like this
* extra flexibility.
* @typedef unsigned long
*/
typedef unsigned long int bitvector_t;
/**
* The extra description structure.
*/
struct _extraDescData_t {
char *keyword; /**< The keyword of the extra desc. */
char *description; /**< The description to display. */
extraDescData_t *next; /**< The next extra desc in list. */
};
/* object-related structures ******************************************/
/* object flags; used in obj_data */
struct _itemFlags_t {
int value[4]; /* Values of the item (see list) */
byte type_flag; /* Type of item */
int /*bitvector_t*/ wear_flags; /* Where you can wear it */
int /*bitvector_t*/ extra_flags; /* If it hums, glows, etc. */
int weight; /* Weigt what else */
int cost; /* Value when sold (gp.) */
int cost_per_day; /* Cost to keep pr. real day */
int timer; /* Timer for object */
long /*bitvector_t*/ bitvector; /* To set chars bits */
};
/* Used in obj_file_elem *DO*NOT*CHANGE* */
struct _itemEffectData_t {
byte location; /* Which ability to change (APPLY_XXX) */
sbyte modifier; /* How much it changes by */
};
/* ====================== File Element for Objects ======================= */
/* BEWARE: Changing it will ruin rent files */
struct _rentElement_t {
itemVnum_t item_number;
#if USE_AUTOEQ
sh_int location;
#endif
int value[4];
int /*bitvector_t*/ extra_flags;
int weight;
int timer;
long /*bitvector_t*/ bitvector;
itemEffectData_t affected[MAX_ITEM_AFFECT];
};
/* header block for rent files. BEWARE: Changing it will ruin rent files */
struct _rentHeader_t {
int time;
int rentcode;
int net_cost_per_diem;
int gold;
int account;
int nitems;
int spare0;
int spare1;
int spare2;
int spare3;
int spare4;
int spare5;
int spare6;
int spare7;
};
/* ======================================================================= */
/* memory structure for characters */
struct _memoryData_t {
long id;
memoryData_t *next;
};
/* This structure is purely intended to be an easy way to transfer */
/* and return information about time (real or mudwise). */
struct _timeInfoData_t {
int hours, day, month;
sh_int year;
};
/* These data contain information about a players time data */
struct _timeData_t {
time_t birth; /* This represents the characters age */
time_t logon; /* Time of the last logon (used to calculate played) */
int played; /* This is the total accumulated time played in secs */
};
/* general player-related info, usually PC's and NPC's */
struct _charPlayerData_t {
char passwd[MAX_PWD_LENGTH+1]; /* character's password */
char *name; /* PC / NPC s name (kill ... ) */
char *short_descr; /* for NPC 'actions' */
char *long_descr; /* for 'look' */
char *description; /* Extra descriptions */
char *title; /* PC / NPC's title */
byte sex; /* PC / NPC's sex */
byte chclass; /* PC / NPC's class */
byte level; /* PC / NPC's level */
byte auth; /* PC's authorization level */
sh_int hometown; /* PC s Hometown (zone) */
timeData_t time; /* PC's AGE in days */
ubyte weight; /* PC / NPC's weight */
ubyte height; /* PC / NPC's height */
};
/* Char's abilities. Used in char_file_u *DO*NOT*CHANGE* */
struct _charAbilities_t {
sbyte str;
sbyte str_add; /* 000 - 100 if strength 18 */
sbyte intel;
sbyte wis;
sbyte dex;
sbyte con;
sbyte cha;
};
/* Char's points. Used in char_file_u *DO*NOT*CHANGE* */
struct _charPointData_t {
sh_int mana;
sh_int max_mana; /* Max mana for PC/NPC */
sh_int hit;
sh_int max_hit; /* Max hit for PC/NPC */
sh_int move;
sh_int max_move; /* Max move for PC/NPC */
sh_int armor; /* Internal -100..100, external -10..10 AC */
int gold; /* Money carried */
int bank_gold; /* Gold the char has in a bank account */
int exp; /* The experience of the player */
sbyte hitroll; /* Any bonus or penalty to the hit roll */
sbyte damroll; /* Any bonus or penalty to the damage roll */
};
/*
* char_special_data_saved: specials which both a PC and an NPC have in
* common, but which must be saved to the playerfile for PC's.
*
* WARNING: Do not change this structure. Doing so will ruin the
* playerfile. If you want to add to the playerfile, use the spares
* in player_special_data.
*/
struct _savedCharSpecials_t {
int alignment; /* +-1000 for alignments */
long idnum; /* player's idnum; -1 for mobiles */
long /*bitvector_t*/ act; /* act flag for NPC's; player flag for PC's */
long /*bitvector_t*/ affected_by;
/* Bitvector for spells/skills affected by */
sh_int apply_saving_throw[5]; /* Saving throw (Bonuses) */
};
/* Special playing constants shared by PCs and NPCs which aren't in pfile */
struct _charSpecials_t {
charData_t *fighting; /* Opponent */
charData_t *hunting; /* Char hunted by this char */
byte position; /* Standing, fighting, sleeping, etc. */
int carry_weight; /* Carried weight */
byte carry_items; /* Number of items carried */
int timer; /* Timer for update */
savedCharSpecials_t saved; /* constants saved in plrfile */
};
/*
* If you want to add new values to the playerfile, do it here. DO NOT
* ADD, DELETE OR MOVE ANY OF THE VARIABLES - doing so will change the
* size of the structure and ruin the playerfile. However, you can change
* the names of the spares to something more meaningful, and then use them
* in your new code. They will automatically be transferred from the
* playerfile into memory when players log in.
*/
struct _savedPlayerSpecials_t {
byte skills[MAX_SKILLS+1]; /* array of skills plus skill 0 */
byte PADDING0; /* used to be spells_to_learn */
bool talks[MAX_TONGUE]; /* PC s Tongues 0 for NPC */
int wimp_level; /* Below this # of hit points, flee! */
byte freeze_auth; /* Level of god who froze char, if any */
byte invis_auth; /* Authorization level of invisibility */
roomVnum_t load_room; /* Which room to place char in */
long /*bitvector_t*/ pref; /* preference flags for PC's. */
ubyte bad_pws; /* number of bad password attemps */
sbyte conditions[3]; /* Drunk, full, thirsty */
/* spares below for future expansion. You can change the names from
'sparen' to something meaningful, but don't change the order. */
ubyte spare0;
ubyte spare1;
ubyte spare2;
ubyte spare3;
ubyte spare4;
ubyte spare5;
int spells_to_learn; /* How many can you learn yet this level*/
int spare7;
int spare8;
int spare9;
int spare10;
int spare11;
int spare12;
int spare13;
int spare14;
int spare15;
int spare16;
long spare17;
long spare18;
long spare19;
long spare20;
long spare21;
};
/*
* Specials needed only by PCs, not NPCs. Space for this structure is
* not allocated in memory for NPCs, but it is for PCs and the portion
* of it labelled 'saved' is saved in the playerfile. This structure can
* be changed freely; beware, though, that changing the contents of
* player_special_data_saved will corrupt the playerfile.
*/
struct _playerSpecials_t {
savedPlayerSpecials_t saved;
char *poofin; /* Description on arrival of a god. */
char *poofout; /* Description upon a god's exit. */
aliasData_t *aliases; /* Character's aliases */
long last_tell; /* idnum of last tell from */
void *last_olc_targ; /* olc control */
int last_olc_mode; /* olc control */
};
/* Specials used by NPCs, not PCs */
struct _mobileSpecialData_t {
memoryData_t *memory; /* List of attackers to remember */
byte attack_type; /* The Attack Type Bitvector for NPC's */
byte default_pos; /* Default position for NPC */
byte damnodice; /* The number of damage dice's */
byte damsizedice; /* The size of the damage dice's */
};
/* An affect structure. Used in char_file_u *DO*NOT*CHANGE* */
struct _effectData_t {
sh_int type; /* The type of spell that caused this */
sh_int duration; /* For how long its effects will last */
sbyte modifier; /* This is added to apropriate ability */
byte location; /* Tells which ability to change(APPLY_XXX)*/
long /*bitvector_t*/ bitvector; /* Tells which bits to set (AFF_XXX) */
effectData_t *next;
};
/* Structure used for chars following other chars */
struct _followData_t {
charData_t *follower;
followData_t *next;
};
/**
* @ingroup character
* @brief Player and NPC "Character" struct
* @defgroup charData_t
* @{
*/
struct _charData_t {
/* Old */
int pfilepos; /**< playerfile pos */
mobileVnum_t nr; /**< Mob's rnum */
roomVnum_t in_room; /**< Location (real room number) */
roomVnum_t was_in_room; /**< location for linkdead people */
/* New */
mobileVnum_t vnum; /**< Mob's vnum */
charData_t *prototype; /**< Pointer to prototype or NULL */
zoneData_t *zone; /**< Mob's Zone, NULL for PC */
roomData_t *room; /**< Room char is in */
shopData_t *shop; /**< Keepers have this, else NULL */
roomData_t *wasInRoom; /**< Room char was in (pre linkdead) */
roomData_t *loadRoom; /**< Room to load char into or NULL */
char *loadRoomStr; /**< String value of room to load to */
int number; /**< Number of the mobile loaded */
SPECIAL(*func); /**< Specproc function or NULL */
/* Being Kept */
descriptorData_t *desc; /**< NULL for mobiles */
int wait; /**< wait for how many loops */
charPlayerData_t player; /**< Normal data */
charAbilities_t real_abils; /**< Abilities without modifiers */
charAbilities_t aff_abils; /**< Abils with spells/stones/etc */
charPointData_t points; /**< Points */
charSpecials_t char_specials; /**< PC/NPC specials */
playerSpecials_t *player_specials; /**< PC specials */
mobileSpecialData_t mob_specials; /**< NPC specials */
effectData_t *affected; /**< affected by what spells */
itemData_t *equipment[NUM_WEARS]; /**< Equipment array */
itemData_t *carrying; /**< Head of list */
charData_t *next_in_room; /**< For room->people - list */
charData_t *next; /**< For either monster or ppl-list */
charData_t *next_fighting; /**< For fighting list */
followData_t *followers; /**< List of chars followers */
charData_t *master; /**< Who is char following? */
};
/**
* @}
*/
/* ==================== File Structure for Player ======================= */
/* BEWARE: Changing it will ruin the playerfile */
struct _pfileElement_t {
/* char_player_data */
char name[MAX_NAME_LENGTH+1];
char description[EXDSCR_LENGTH];
char title[MAX_TITLE_LENGTH+1];
byte sex;
byte chclass;
byte level;
byte auth;
sh_int hometown;
time_t birth; /* Time of birth of character */
int played; /* Number of secs played in total */
ubyte weight;
ubyte height;
char pwd[MAX_PWD_LENGTH+1]; /* character's password */
savedCharSpecials_t char_specials_saved;
savedPlayerSpecials_t player_specials_saved;
charAbilities_t abilities;
charPointData_t points;
effectData_t affected[MAX_AFFECT];
time_t last_logon; /* Time (in secs) of last logon */
char host[HOST_LENGTH+1]; /* host of last logon */
};
/* ====================================================================== */
/* descriptor-related structures ******************************************/
struct _textBlock_t {
char *text;
int aliased;
textBlock_t *next;
};
struct _textQueue_t {
textBlock_t *head;
textBlock_t *tail;
};
struct _descriptorData_t {
socket_t descriptor; /* file descriptor for socket */
char host[HOST_LENGTH+1]; /* hostname */
byte bad_pws; /* number of bad pw attemps this login */
byte idle_tics; /* tics idle at password prompt */
int connected; /* mode of 'connectedness' */
int desc_num; /* unique num assigned to desc */
time_t login_time; /* when the person connected */
char *showstr_head; /* for keeping track of an internal str */
char **showstr_vector; /* for paging through texts */
int showstr_count; /* number of pages to page through */
int showstr_page; /* which page are we currently showing? */
char **str; /* for the modify-str system */
size_t max_str; /* - */
long mail_to; /* name for mail system */
int has_prompt; /* is the user at a prompt? */
char inbuf[MAX_RAW_INPUT_LENGTH]; /* buffer for raw input */
char last_input[MAX_INPUT_LENGTH]; /* the last input */
char small_outbuf[SMALL_BUFSIZE]; /* standard output buffer */
char *output; /* ptr to the current output buffer */
char **history; /* History of commands, for ! mostly. */
int history_pos; /* Circular array position. */
int bufptr; /* ptr to end of current output */
int bufspace; /* space left in the output buffer */
textBlock_t *large_outbuf; /* ptr to large buffer, if we need it */
textQueue_t input; /* q of unprocessed input */
charData_t *character; /* linked to char */
charData_t *original; /* original char if switched */
descriptorData_t *snooping; /* Who is this char snooping */
descriptorData_t *snoop_by; /* And who is snooping this char */
descriptorData_t *next; /* link to next descriptor */
};
/* other miscellaneous structures ***************************************/
/**
* @brief Social data struct
* @ingroup social
* @{
*/
struct _socialData_t {
char *command; /**< The command for this social. */
int hide; /**< Whether the social is hidden. */
int min_victim_position; /**< Position of victim */
char *char_no_arg; /**< To char, no arg specicied */
char *others_no_arg; /**< To others, no arg specified */
char *char_found; /**< To char, target found */
char *others_found; /**< To others, target found */
char *vict_found; /**< To target, target found */
char *not_found; /**< To char, target not found */
char *char_auto; /**< To char, self was target */
char *others_auto; /**< To others, self was target */
};
/**
* An alias for struct _messageType_t.
* @typedef struct _messageType_t
*/
typedef struct _messageType_t messageType_t;
struct _messageType_t {
char *attacker_msg; /* message to attacker */
char *victim_msg; /* message to victim */
char *room_msg; /* message to room */
};
/**
* An alias for struct _messageListEntry_t.
* @typedef struct _messageListEntry_t
*/
typedef struct _messageListEntry_t messageListEntry_t;
struct _messageListEntry_t {
messageType_t die_msg; /* messages when death */
messageType_t miss_msg; /* messages when miss */
messageType_t hit_msg; /* messages when hit */
messageType_t god_msg; /* messages when hit on god */
messageListEntry_t *next; /* to next messages of this kind. */
};
/**
* An alias for struct _messageList_t.
* @typedef struct _messageList_t
*/
typedef struct _messageList_t messageList_t;
struct _messageList_t {
int a_type; /* Attack type */
int number_of_attacks; /* How many attack messages to chose from. */
messageListEntry_t *msg; /* List of messages. */
};
struct _dexSkillApply_t {
sh_int p_pocket;
sh_int p_locks;
sh_int traps;
sh_int sneak;
sh_int hide;
};
struct _dexApply_t {
sh_int reaction;
sh_int miss_att;
sh_int defensive;
};
struct _strApply_t {
sh_int tohit; /* To Hit (THAC0) Bonus/Penalty */
sh_int todam; /* Damage Bonus/Penalty */
sh_int carry_w; /* Maximum weight that can be carrried */
sh_int wield_w; /* Maximum weight that can be wielded */
};
struct _wisApply_t {
byte bonus; /* how many practices player gains per lev */
};
struct _intApply_t {
byte learn; /* how many % a player learns a spell/skill */
};
struct _conApply_t {
sh_int hitp;
sh_int shock;
};
struct _weatherData_t {
int pressure; /* How is the pressure ( Mb ) */
int change; /* How fast and what way does it change. */
int sky; /* How is the sky. */
int sunlight; /* And how much sun. */
};
/*
* Element in monster and object index-tables.
*/
struct _indexData_t {
IDXTYPE vnum; /* virtual number of this mob/obj */
int number; /* number of existing units of this mob/obj */
SPECIAL(*func);
};
/**
* An alias for struct _guildData_t.
* @typedef struct _guildData_t
*/
typedef struct _guildData_t guildData_t;
struct _guildData_t {
int pc_class;
char *guildRoom;
int direction;
};
#endif /* __STRUCTS_H__ */