A few Bug-Fixes and Ideas

This commit is contained in:
JamDog 2010-11-06 15:47:38 +00:00
parent 222be04ec5
commit d4454288b1
9 changed files with 249 additions and 150 deletions

View file

@ -12,8 +12,8 @@
#define __CLASS_C__
/* This file attempts to concentrate most of the code which must be changed
* in order for new classes to be added. If you're adding a new class, you
* should go through this entire file from beginning to end and add the
* in order for new classes to be added. If you're adding a new class, you
* should go through this entire file from beginning to end and add the
* appropriate new special cases for your new class. */
#include "conf.h"
@ -53,7 +53,7 @@ const char *class_menu =
" [W]arrior\r\n"
" [M]agic-user\r\n";
/* The code to interpret a class letter -- used in interpreter.c when a new
/* The code to interpret a class letter -- used in interpreter.c when a new
* character is selecting a class and by 'set class' in act.wizard.c. */
int parse_class(char arg)
{
@ -68,9 +68,9 @@ int parse_class(char arg)
}
}
/* bitvectors (i.e., powers of two) for each class, mainly for use in do_who
/* bitvectors (i.e., powers of two) for each class, mainly for use in do_who
* and do_users. Add new classes at the end so that all classes use sequential
* powers of two (1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, etc.) up to
* powers of two (1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, etc.) up to
* the limit of your bitvector_t, typically 0-31. */
bitvector_t find_class_bitvector(const char *arg)
{
@ -82,17 +82,17 @@ bitvector_t find_class_bitvector(const char *arg)
return (ret);
}
/* These are definitions which control the guildmasters for each class.
* The first field (top line) controls the highest percentage skill level a
* character of the class is allowed to attain in any skill. (After this
/* These are definitions which control the guildmasters for each class.
* The first field (top line) controls the highest percentage skill level a
* character of the class is allowed to attain in any skill. (After this
* level, attempts to practice will say "You are already learned in this area."
*
* The second line controls the maximum percent gain in learnedness a character
* is allowed per practice -- in other words, if the random die throw comes out
* higher than this number, the gain will only be this number instead.
*
* The third line controls the minimu percent gain in learnedness a character
* is allowed per practice -- in other words, if the random die throw comes
* The third line controls the minimu percent gain in learnedness a character
* is allowed per practice -- in other words, if the random die throw comes
* out below this number, the gain will be set up to this number.
*
* The fourth line simply sets whether the character knows 'spells' or 'skills'.
@ -117,20 +117,20 @@ int prac_params[4][NUM_CLASSES] = {
};
/* The appropriate rooms for each guildmaster/guildguard; controls which types
* of people the various guildguards let through. i.e., the first line shows
* that from room 3017, only MAGIC_USERS are allowed to go south. Don't forget
* of people the various guildguards let through. i.e., the first line shows
* that from room 3017, only MAGIC_USERS are allowed to go south. Don't forget
* to visit spec_assign.c if you create any new mobiles that should be a guild
* master or guard so they can act appropriately. If you "recycle" the
* existing mobs that are used in other guilds for your new guild, then you
* master or guard so they can act appropriately. If you "recycle" the
* existing mobs that are used in other guilds for your new guild, then you
* don't have to change that file, only here. Guildguards are now implemented
* via triggers. This code remains as an example. */
struct guild_info_type guild_info[] = {
/* Midgaard */
{ CLASS_MAGIC_USER, 3017, SOUTH },
{ CLASS_CLERIC, 3004, NORTH },
{ CLASS_THIEF, 3027, EAST },
{ CLASS_WARRIOR, 3021, EAST },
{ CLASS_MAGIC_USER, 3017, SOUTH },
{ CLASS_CLERIC, 3004, NORTH },
{ CLASS_THIEF, 3027, EAST },
{ CLASS_WARRIOR, 3021, EAST },
/* Brass Dragon */
{ -999 /* all */ , 5065, WEST },
@ -139,7 +139,7 @@ struct guild_info_type guild_info[] = {
{ -1, NOWHERE, -1}
};
/* Saving throws for : MCTW : PARA, ROD, PETRI, BREATH, SPELL. Levels 0-40. Do
/* Saving throws for : MCTW : PARA, ROD, PETRI, BREATH, SPELL. Levels 0-40. Do
* not forget to change extern declaration in magic.c if you add to this. */
byte saving_throws(int class_num, int type, int level)
{
@ -1344,7 +1344,7 @@ int thaco(int class_num, int level)
/* Roll the 6 stats for a character... each stat is made of the sum of the best
* 3 out of 4 rolls of a 6-sided die. Each class then decides which priority
* 3 out of 4 rolls of a 6-sided die. Each class then decides which priority
* will be given for the best to worst stats. */
void roll_real_abils(struct char_data *ch)
{
@ -1456,13 +1456,13 @@ void do_start(struct char_data *ch)
GET_COND(ch, HUNGER) = 24;
GET_COND(ch, DRUNK) = 0;
SET_BIT_AR(PRF_FLAGS(ch), PRF_AUTOEXIT);
SET_BIT_AR(PRF_FLAGS(ch), PRF_AUTOEXIT);
if (CONFIG_SITEOK_ALL)
SET_BIT_AR(PLR_FLAGS(ch), PLR_SITEOK);
}
/* This function controls the change to maxmove, maxmana, and maxhp for each
/* This function controls the change to maxmove, maxmana, and maxhp for each
* class every time they gain a level. */
void advance_level(struct char_data *ch)
{
@ -1521,8 +1521,8 @@ void advance_level(struct char_data *ch)
}
/* This simply calculates the backstab multiplier based on a character's level.
* This used to be an array, but was changed to be a function so that it would
* be easier to add more levels to your MUD. This doesn't really create a big
* This used to be an array, but was changed to be a function so that it would
* be easier to add more levels to your MUD. This doesn't really create a big
* performance hit because it's not used very often. */
int backstab_mult(int level)
{
@ -1559,8 +1559,8 @@ int invalid_class(struct char_data *ch, struct obj_data *obj)
return FALSE;
}
/* SPELLS AND SKILLS. This area defines which spells are assigned to which
* classes, and the minimum level the character must be to use the spell or
/* SPELLS AND SKILLS. This area defines which spells are assigned to which
* classes, and the minimum level the character must be to use the spell or
* skill. */
void init_spell_levels(void)
{
@ -1587,6 +1587,7 @@ void init_spell_levels(void)
spell_level(SPELL_FIREBALL, CLASS_MAGIC_USER, 15);
spell_level(SPELL_CHARM, CLASS_MAGIC_USER, 16);
spell_level(SPELL_IDENTIFY, CLASS_MAGIC_USER, 20);
spell_level(SPELL_FLY, CLASS_MAGIC_USER, 22);
spell_level(SPELL_ENCHANT_WEAPON, CLASS_MAGIC_USER, 26);
spell_level(SPELL_CLONE, CLASS_MAGIC_USER, 30);
@ -1637,7 +1638,7 @@ void init_spell_levels(void)
spell_level(SKILL_BASH, CLASS_WARRIOR, 12);
}
/* This is the exp given to implementors -- it must always be greater than the
/* This is the exp given to implementors -- it must always be greater than the
* exp required for immortality, plus at least 20,000 or so. */
#define EXP_MAX 10000000