spells.h
silly/doc/spells.h · 10.3 KB
From the archive silly.tar.gz
Download the archive « Back to the archive contents
/* ************************************************************************
* file: spells.h , Implementation of magic spells. Part of DIKUMUD *
* Usage : Spells *
************************************************************************* */
#define MAX_BUF_LENGTH 240
#define TYPE_UNDEFINED -1
#define SPELL_RESERVED_DBC 0 /* SKILL NUMBER ZERO */
#define SPELL_ARMOR 1 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_TELEPORT 2 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_BLESS 3 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_BLINDNESS 4 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_BURNING_HANDS 5 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CALL_LIGHTNING 6 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CHARM_PERSON 7 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CHILL_TOUCH 8 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CLONE 9 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_COLOUR_SPRAY 10 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CONTROL_WEATHER 11 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CREATE_FOOD 12 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CREATE_WATER 13 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CURE_BLIND 14 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CURE_CRITIC 15 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CURE_LIGHT 16 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_CURSE 17 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_DETECT_EVIL 18 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_DETECT_INVISIBLE 19 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_DETECT_MAGIC 20 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_DETECT_POISON 21 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_DISPEL_EVIL 22 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_EARTHQUAKE 23 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_ENCHANT_WEAPON 24 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_ENERGY_DRAIN 25 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_FIREBALL 26 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_HARM 27 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_HEAL 28 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_INVISIBLE 29 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_LIGHTNING_BOLT 30 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_LOCATE_OBJECT 31 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_MAGIC_MISSILE 32 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_POISON 33 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_PROTECT_FROM_EVIL 34 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_REMOVE_CURSE 35 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_SANCTUARY 36 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_SHOCKING_GRASP 37 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_SLEEP 38 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_STRENGTH 39 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_SUMMON 40 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_VENTRILOQUATE 41 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_WORD_OF_RECALL 42 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_REMOVE_POISON 43 /* Reserved Skill[] DO NOT CHANGE */
#define SPELL_SENSE_LIFE 44 /* Reserved Skill[] DO NOT CHANGE */
/* types of attacks and skills must NOT use same numbers as spells! */
#define SKILL_SNEAK 45 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_HIDE 46 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_STEAL 47 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_BACKSTAB 48 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_PICK_LOCK 49 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_KICK 50 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_BASH 51 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_RESCUE 52 /* MAXIMUM SKILL NUMBER */
/* END OF SKILL RESERVED "NO TOUCH" NUMBERS */
/* NEW SPELLS are to be inserted here */
#define SPELL_IDENTIFY 53
#define SPELL_INFRAVISION 54
#define SPELL_CAUSE_LIGHT 55
#define SPELL_CAUSE_CRITICAL 56
#define SPELL_FLAMESTRIKE 57
#define SPELL_DISPEL_GOOD 58
#define SPELL_WEAKNESS 59
#define SPELL_DISPEL_MAGIC 60
#define SPELL_KNOCK 61
#define SPELL_KNOW_ALIGNMENT 62
#define SPELL_ANIMATE_DEAD 63
#define SPELL_PARALYSIS 64
#define SPELL_REMOVE_PARALYSIS 65
#define SPELL_FEAR 66
#define SPELL_ACID_BLAST 67
#define SPELL_WATER_BREATH 68
#define SPELL_FLY 69
#define SPELL_CONE_OF_COLD 70
#define SPELL_METEOR_SWARM 71
#define SPELL_ICE_STORM 72
#define SPELL_SHIELD 73
#define SPELL_MON_SUM_1 74 /* done */
#define SPELL_MON_SUM_2 75
#define SPELL_MON_SUM_3 76
#define SPELL_MON_SUM_4 77
#define SPELL_MON_SUM_5 78
#define SPELL_MON_SUM_6 79
#define SPELL_MON_SUM_7 80 /* done */
#define SPELL_FIRESHIELD 81
#define SPELL_CHARM_MONSTER 82
#define SPELL_CURE_SERIOUS 83
#define SPELL_CAUSE_SERIOUS 84
#define SPELL_REFRESH 85
#define SPELL_SECOND_WIND 86
#define SPELL_TURN 87
#define SPELL_SUCCOR 88
#define SPELL_LIGHT 89
#define SPELL_CONT_LIGHT 90
#define SPELL_CALM 91
#define SPELL_STONE_SKIN 92
#define SPELL_CONJURE_ELEMENTAL 93
#define SPELL_TRUE_SIGHT 94
#define SPELL_MINOR_CREATE 95
#define SPELL_FAERIE_FIRE 96
#define SPELL_FAERIE_FOG 97
#define SPELL_CACAODEMON 98
#define SPELL_POLY_SELF 99
#define MAX_EXIST_SPELL 98 /* move this and change it */
#define SPELL_MANA 100
#define SPELL_ASTRAL_WALK 101
#define SPELL_PWORD_KILL 101
#define SPELL_PWORD_BLIND 102
#define SPELL_SUMMON_OBJ 103
#define SPELL_FAMILIAR 104
#define SPELL_CHAIN_LIGHTNING 105
#define SPELL_SCARE 106
#define SPELL_SENDING 107
#define SPELL_HOLY_WORD 108
#define SPELL_UNHOLY_WORD 109
#define SPELL_AID 110
#define SPELL_GOLEM 111
#define SPELL_COMMAND 112
/* MAX_SKILL is 200! */
/* No more than 200 spells!!!!!! */
/* Ooh! What a limitation! */
/* temporary until i find a better place to put them. */
#define SKILL_HUNT 180
#define SKILL_FIND_TRAP 181
#define SKILL_SET_TRAP 182
#define SKILL_DISARM 183
#define SKILL_READ_MAGIC 184
#define SPELL_DRAGON_BREATH 105
#define SPELL_GREEN_SLIME 199
#define FIRST_BREATH_WEAPON 200
#define SPELL_GEYSER 200
#define SPELL_FIRE_BREATH 201
#define SPELL_GAS_BREATH 202
#define SPELL_FROST_BREATH 203
#define SPELL_ACID_BREATH 204
#define SPELL_LIGHTNING_BREATH 205
#define LAST_BREATH_WEAPON 205
#define TYPE_HIT 206
#define TYPE_BLUDGEON 207
#define TYPE_PIERCE 208
#define TYPE_SLASH 209
#define TYPE_WHIP 210 /* EXAMPLE */
#define TYPE_CLAW 211 /* NO MESSAGES WRITTEN YET! */
#define TYPE_BITE 212 /* NO MESSAGES WRITTEN YET! */
#define TYPE_STING 213 /* NO MESSAGES WRITTEN YET! */
#define TYPE_CRUSH 214 /* NO MESSAGES WRITTEN YET! */
#define TYPE_CLEAVE 215
#define TYPE_STAB 216
#define TYPE_SMASH 217
#define TYPE_SMITE 218
#define TYPE_SUFFERING 220
/* More anything but spells and weapontypes can be insterted here! */
#define MAX_TYPES 70
#define SAVING_PARA 0
#define SAVING_ROD 1
#define SAVING_PETRI 2
#define SAVING_BREATH 3
#define SAVING_SPELL 4
#define MAX_SPL_LIST 215
#define TAR_IGNORE (1<< 0)
#define TAR_CHAR_ROOM (1<< 1)
#define TAR_CHAR_WORLD (1<< 2)
#define TAR_FIGHT_SELF (1<< 3)
#define TAR_FIGHT_VICT (1<< 4)
#define TAR_SELF_ONLY (1<< 5) /* Only a check, use with ei. TAR_CHAR_ROOM */
#define TAR_SELF_NONO (1<< 6) /* Only a check, use with ei. TAR_CHAR_ROOM */
#define TAR_OBJ_INV (1<< 7)
#define TAR_OBJ_ROOM (1<< 8)
#define TAR_OBJ_WORLD (1<< 9)
#define TAR_OBJ_EQUIP (1<<10)
#define TAR_NAME (1<<11)
#define TAR_VIOLENT (1<<12)
struct spell_info_type
{
void (*spell_pointer)
(byte level, struct char_data *ch, char *arg, int type,
struct char_data *tar_ch, struct obj_data *tar_obj);
byte minimum_position; /* Position for caster */
ubyte min_usesmana; /* Amount of mana used by a spell */
byte beats; /* Heartbeats until ready for next */
byte min_level_cleric; /* Level required for cleric */
byte min_level_magic; /* Level required for magic user */
sh_int targets; /* See below for use with TAR_XXX */
};
/* Possible Targets:
bit 0 : IGNORE TARGET
bit 1 : PC/NPC in room
bit 2 : PC/NPC in world
bit 3 : Object held
bit 4 : Object in inventory
bit 5 : Object in room
bit 6 : Object in world
bit 7 : If fighting, and no argument, select tar_char as self
bit 8 : If fighting, and no argument, select tar_char as victim (fighting)
bit 9 : If no argument, select self, if argument check that it IS self.
*/
#define SPELL_TYPE_SPELL 0
#define SPELL_TYPE_POTION 1
#define SPELL_TYPE_WAND 2
#define SPELL_TYPE_STAFF 3
#define SPELL_TYPE_SCROLL 4
/* Attacktypes with grammar */
struct attack_hit_type {
char *singular;
char *plural;
};