From: Aenarion (Aenarion@finality.drachen.com) Subject: ManaCost fix if you have ever noticed that when you cast a Cleric spell as a Magic_user you get the mana_max - mana_min well the following will correct that error There are 2 files that need to be edited they are spell_parser.c and spells.h if you have any problems at all contact me at Aenarion@finality.drachen.com -- Discliamer if you use this following fix I am not responsible for any damage it causes your mud it works on mine which is bpl11 if you have any changes that you have added please e-mail me at the above address with the changes. *** spells.h :: search for :: struct spell_info_type { byte min_position; /* Position for caster */ 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 */ /* ADD THE BELOW LINE */ byte class; }; *** End spells.h *** spell_parser.c :: search for :: int mag_manacost(struct char_data * ch, int spellnum) { int mana; mana = MAX(SINFO.mana_max - (SINFO.mana_change * (GET_LEVEL(ch) - SINFO.min_level[(int)GET_CLASS(ch)])), SINFO.mana_min); return mana; } :: change to :: int mag_manacost(struct char_data * ch, int spellnum) { int mana; mana = MAX(SINFO.mana_max - (SINFO.mana_change * (GET_LEVEL(ch) - SINFO.min_level[(int)SINFO.class])), SINFO.mana_min); return mana; } :: search for :: /* Assign the spells on boot up */ void spello(int spl, int max_mana, int min_mana, int mana_change, int minpos, int targets, int violent, int routines, int class) { int i; for (i = 0; i < NUM_CLASSES; i++) spell_info[spl].min_level[i] = LVL_BLD; spell_info[spl].mana_max = max_mana; spell_info[spl].mana_min = min_mana; spell_info[spl].mana_change = mana_change; spell_info[spl].min_position = minpos; spell_info[spl].targets = targets; spell_info[spl].violent = violent; spell_info[spl].routines = routines; /* ADD THE BLOW LINE */ spell_info[spl].class = class; } void unused_spell(int spl) { int i; for (i = 0; i < NUM_CLASSES; i++) spell_info[spl].min_level[i] = LVL_OWNER + 1; spell_info[spl].mana_max = 0; spell_info[spl].mana_min = 0; spell_info[spl].mana_change = 0; spell_info[spl].min_position = 0; spell_info[spl].targets = 0; spell_info[spl].violent = 0; spell_info[spl].routines = 0; /* ADD THE BELOW LINE */ spell_info[spl].class = 0; } :: Done :: now in the The following is an example of what is needed spello(SPELL_ARMOR, 50, 5, 11, POS_FIGHTING, TAR_CHAR_ROOM, FALSE, MAG_AFFECTS); add the class of the spell if its assigned to mages and clerics use the lowest defined class level. For the change just add the class define EX. CLASS_MAGIC_USER or CLASS_CLERIC at the end. :: example :: spello(SPELL_ARMOR, 50, 5, 11, POS_FIGHTING, TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, CLASS_CLERIC); Just add the class of the spell to the end and the mana cost will be correct --MK