diff --git a/include/extern.h b/include/extern.h index 3b5fe525c..cd030ef48 100644 --- a/include/extern.h +++ b/include/extern.h @@ -191,6 +191,7 @@ extern void exercise(int, boolean); extern void exerchk(void); extern void init_attr(int); extern void redist_attr(void); +extern void vary_init_attr(void); extern void adjabil(int, int); extern int newhp(void); extern int minuhpmax(int); diff --git a/src/attrib.c b/src/attrib.c index e2d386434..f4343a7fd 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -743,6 +743,22 @@ redist_attr(void) /* (void) encumber_msg(); -- caller needs to do this */ } +/* apply minor variation to attributes */ +void +vary_init_attr(void) +{ + int i; + + for (i = 0; i < A_MAX; i++) + if (!rn2(20)) { + register int xd = rn2(7) - 2; /* biased variation */ + + (void) adjattrib(i, xd, TRUE); + if (ABASE(i) < AMAX(i)) + AMAX(i) = ABASE(i); + } +} + static void postadjabil(long *ability) diff --git a/src/u_init.c b/src/u_init.c index 3266bfa8c..8872b6993 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -933,18 +933,8 @@ u_init(void) find_ac(); /* get initial ac value */ init_attr(75); /* init attribute values */ + vary_init_attr(); /* minor variation to attrs */ max_rank_sz(); /* set max str size for class ranks */ - /* - * Do we really need this? - */ - for (i = 0; i < A_MAX; i++) - if (!rn2(20)) { - register int xd = rn2(7) - 2; /* biased variation */ - - (void) adjattrib(i, xd, TRUE); - if (ABASE(i) < AMAX(i)) - AMAX(i) = ABASE(i); - } /* make sure you can carry all you have - especially for Tourists */ while (inv_weight() > 0) {