/* ************************************************************************ * File: spells.h Part of CircleMUD * * Usage: header file: constants and fn prototypes for spell system * * * * 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 DEFAULT_STAFF_LVL 12 #define DEFAULT_SCOUTER_LVL 12 #define focus_UNDEFINED -1 #define focus_SPELL 0 #define focus_SAIBAKIT 1 #define focus_SCOUTER 2 #define focus_STAFF 3 #define focus_SENZU 4 #define MAG_DAMAGE (1 << 0) #define MAG_AFFECTS (1 << 1) #define MAG_UNAFFECTS (1 << 2) #define MAG_POINTS (1 << 3) #define MAG_ALTER_OBJS (1 << 4) #define MAG_GROUPS (1 << 5) #define MAG_MASSES (1 << 6) #define MAG_AREAS (1 << 7) #define MAG_SUMMONS (1 << 8) #define MAG_CREATIONS (1 << 9) #define MAG_MANUAL (1 << 10) #define TYPE_UNDEFINED -1 #define SPELL_RESERVED_DBC 0 /* SKILL NUMBER ZERO -- RESERVED */ /* PLAYER SPELLS -- Numbered from 1 to MAX_SPELLS */ #define SPELL_armor 1 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_TELEPORT 2 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_ZANZOKEN 3 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_SOLAR_FLARE 4 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_MAJIN 7 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_MULTIFORM 9 /* 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_SOLAR_FLARE 14 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_CURE_CRITIC 15 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_HASSHUKEN 16 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_CURSE 17 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_DETECT_ALIGN 18 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_DETECT_INVIS 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_BURNING_SOULS 24 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_SAIBA 26 /* 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_LOCATE_OBJECT 31 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_POISON 33 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_PROT_FROM_EVIL 34 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_REMOVE_CURSE 35 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_BARRIER 36 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_YOIKOMINMINKEN 38 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_SENZU 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 */ #define SPELL_ANIMATE_DEAD 45 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_DISPEL_GOOD 46 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_GROUP_armor 47 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_GROUP_HEAL 48 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_GROUP_RECALL 49 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_INFRAVISION 50 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_WATERWALK 51 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_MIND_FREEZE 52 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_KI_SHOT 53 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_TSURUGI 59 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_REPRODUCE 60 /* Reserved Skill[] DO NOT CHANGE */ #define SPELL_KYODAIKA 61 /* Super namek! */ #define SPELL_BLADEMORPH 62 /* Turn hands to blades */ #define SPELL_MUTATE 63 /* Turn skin defensive */ #define SPELL_SWORD 64 /* Turn skin defensive */ /* Insert new spells here, up to MAX_SPELLS */ #define MAX_SPELLS 130 /* PLAYER SKILLS - Numbered from MAX_SPELLS+1 to MAX_SKILLS */ #define SKILL_BACKSTAB 131 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_SWEEP 132 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_HIDE 133 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_PICK_LOCK 135 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_PUNCH 136 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_RESCUE 137 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_SWIFTNESS 138 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_STEAL 139 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_SENSE 140 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_TAILWHIP 141 /* Icers hit with tail */ #define SKILL_REPAIR 143 /* Androids repair themselves */ #define SKILL_KAIOKEN 144 /* Self Explanitory */ #define SKILL_KNEE 145 /* Self Explanitory */ #define SKILL_ELBOW 146 /* Self Explanitory */ #define SKILL_ROUNDHOUSE 147 /* Self Explanitory */ #define SKILL_FLY 148 /* Self Explanitory */ #define SKILL_POWERUP 149 /* Self Explanitory */ #define SKILL_INGEST 150 /* Self Explanitory */ #define SKILL_POWERDOWN 151 /* Self Explanitory */ #define SKILL_SCAN 152 /* Self Explanitory */ #define SKILL_ABSORB 153 /* Self Explanitory */ #define SKILL_DESTRUCT 154 /* Self Explanitory */ #define SKILL_POWERSENSE 155 /* Self Explanitory */ #define SKILL_STEALTH 156 /* Self Explanitory */ #define SKILL_REGENERATE 157 /* Self Explanitory */ /* New skills may be added here up to MAX_SKILLS (200) */ /* * NON-PLAYER AND OBJECT SPELLS AND SKILLS * The practice levels for the spells and skills below are _not_ recorded * in the playerfile; therefore, the intended use is for spells and skills * associated with objects (such as SPELL_IDENTIFY used with SENZUs of * IDENTIFY) or non-players (such as NPC-only spells). */ #define SPELL_IDENTIFY 201 #define SPELL_FIRE_BREATH 202 #define SPELL_GAS_BREATH 203 #define SPELL_FROST_BREATH 204 #define SPELL_ACID_BREATH 205 #define SPELL_LIGHTNING_BREATH 206 #define SPELL_POWER_SENSE 207 #define TOP_SPELL_DEFINE 299 /* NEW NPC/OBJECT SPELLS can be inserted here up to 299 */ /* WEAPON ATTACK TYPES */ #define TYPE_HIT 300 #define TYPE_STING 301 #define TYPE_WHIP 302 #define TYPE_SLASH 303 #define TYPE_BITE 304 #define TYPE_BLUDGEON 305 #define TYPE_CRUSH 306 #define TYPE_POUND 307 #define TYPE_CLAW 308 #define TYPE_MAUL 309 #define TYPE_THRASH 310 #define TYPE_PIERCE 311 #define TYPE_BLAST 312 #define TYPE_PUNCH 313 #define TYPE_STAB 314 /* new attack types can be added here - up to TYPE_SUFFERING */ #define TYPE_SUFFERING 399 #define SAVING_PARA 0 #define SAVING_ROD 1 #define SAVING_PETRI 2 #define SAVING_BREATH 3 #define SAVING_SPELL 4 #define TAR_IGNORE 1 #define TAR_CHAR_ROOM 2 #define TAR_CHAR_WORLD 4 #define TAR_FIGHT_SELF 8 #define TAR_FIGHT_VICT 16 #define TAR_SELF_ONLY 32 /* Only a check, use with i.e. TAR_CHAR_ROOM */ #define TAR_NOT_SELF 64 /* Only a check, use with i.e. TAR_CHAR_ROOM */ #define TAR_OBJ_INV 128 #define TAR_OBJ_ROOM 256 #define TAR_OBJ_WORLD 512 #define TAR_OBJ_EQUIP 1024 struct spell_info_type { byte min_position; /* Position for focuser */ int mana_min; /* Min amount of mana used by a spell (highest lev) */ int mana_max; /* Max amount of mana used by a spell (lowest lev) */ int mana_change; /* Change in mana used by spell from lev to lev */ int min_level[NUM_CLASSES]; int routines; byte violent; 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_SAIBAKIT 1 #define SPELL_TYPE_SCOUTER 2 #define SPELL_TYPE_STAFF 3 #define SPELL_TYPE_SENZU 4 /* Attacktypes with grammar */ struct attack_hit_type { const char *singular; const char *plural; }; #define ASPELL(spellname) \ void spellname(int level, struct char_data *ch, \ struct char_data *victim, struct obj_data *obj) #define MANUAL_SPELL(spellname) spellname(level, focuser, cvict, ovict); ASPELL(spell_create_water); ASPELL(spell_recall); ASPELL(spell_teleport); ASPELL(spell_summon); ASPELL(spell_locate_object); ASPELL(spell_MAJIN); ASPELL(spell_information); ASPELL(spell_IDENTIFY); ASPELL(spell_POWER_SENSE); ASPELL(spell_BURNING_SOULS); ASPELL(spell_detect_poison); /* basic magic calling functions */ int find_skill_num(char *name); int mag_damage(int level, struct char_data *ch, struct char_data *victim, int spellnum, int savetype); void mag_affects(int level, struct char_data *ch, struct char_data *victim, int spellnum, int savetype); void mag_groups(int level, struct char_data *ch, int spellnum, int savetype); void mag_masses(int level, struct char_data *ch, int spellnum, int savetype); void mag_areas(int level, struct char_data *ch, int spellnum, int savetype); void mag_summons(int level, struct char_data *ch, struct obj_data *obj, int spellnum, int savetype); void mag_points(int level, struct char_data *ch, struct char_data *victim, int spellnum, int savetype); void mag_unaffects(int level, struct char_data *ch, struct char_data *victim, int spellnum, int type); void mag_alter_objs(int level, struct char_data *ch, struct obj_data *obj, int spellnum, int type); void mag_creations(int level, struct char_data *ch, int spellnum); int call_magic(struct char_data *focuser, struct char_data *cvict, struct obj_data *ovict, int spellnum, int level, int focustype); void mag_objectmagic(struct char_data *ch, struct obj_data *obj, char *argument); int focus_spell(struct char_data *ch, struct char_data *tch, struct obj_data *tobj, int spellnum); /* other prototypes */ void spell_level(int spell, int chclass, long long level); void init_spell_levels(void); const char *skill_name(int num);