Split init attr minor variation
This commit is contained in:
@@ -191,6 +191,7 @@ extern void exercise(int, boolean);
|
|||||||
extern void exerchk(void);
|
extern void exerchk(void);
|
||||||
extern void init_attr(int);
|
extern void init_attr(int);
|
||||||
extern void redist_attr(void);
|
extern void redist_attr(void);
|
||||||
|
extern void vary_init_attr(void);
|
||||||
extern void adjabil(int, int);
|
extern void adjabil(int, int);
|
||||||
extern int newhp(void);
|
extern int newhp(void);
|
||||||
extern int minuhpmax(int);
|
extern int minuhpmax(int);
|
||||||
|
|||||||
@@ -743,6 +743,22 @@ redist_attr(void)
|
|||||||
/* (void) encumber_msg(); -- caller needs to do this */
|
/* (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
|
static
|
||||||
void
|
void
|
||||||
postadjabil(long *ability)
|
postadjabil(long *ability)
|
||||||
|
|||||||
+1
-11
@@ -933,18 +933,8 @@ u_init(void)
|
|||||||
|
|
||||||
find_ac(); /* get initial ac value */
|
find_ac(); /* get initial ac value */
|
||||||
init_attr(75); /* init attribute values */
|
init_attr(75); /* init attribute values */
|
||||||
|
vary_init_attr(); /* minor variation to attrs */
|
||||||
max_rank_sz(); /* set max str size for class ranks */
|
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 */
|
/* make sure you can carry all you have - especially for Tourists */
|
||||||
while (inv_weight() > 0) {
|
while (inv_weight() > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user