more github issue #679 - orc strength

Handle alternate values for hero poly'd into a 'strongmonst' form
more thoroughly by propagating max values other than 18/100 to the
attribute manipulation routines.

ATTRMAX(A_STR), which used to be a relatively simple expression, now
contains a function call.

Along the way, change the races[] terminator's value for 'mnum' from
0 (giant ant) to NON_PM.
This commit is contained in:
PatR
2022-10-12 02:05:32 -07:00
committed by nhmall
parent 96e933f974
commit 82476afdd6
4 changed files with 90 additions and 50 deletions

View File

@@ -40,10 +40,8 @@ struct attribs {
schar a[A_MAX];
};
#define ATTRMAX(x) \
((x == A_STR && Upolyd && strongmonst(g.youmonst.data)) \
? STR18(100) \
: g.urace.attrmax[x])
#define ATTRMAX(x) \
((x == A_STR && Upolyd) ? uasmon_maxStr() : g.urace.attrmax[x])
#define ATTRMIN(x) (g.urace.attrmin[x])
#endif /* ATTRIB_H */

View File

@@ -2152,6 +2152,7 @@ extern void change_sex(void);
extern void livelog_newform(boolean, int, int);
extern void polyself(int);
extern int polymon(int);
extern schar uasmon_maxStr(void);
extern void rehumanize(void);
extern int dobreathe(void);
extern int dospit(void);
@@ -2398,14 +2399,15 @@ extern void rigid_role_checks(void);
extern boolean setrolefilter(const char *);
extern boolean gotrolefilter(void);
extern void clearrolefilter(void);
extern char *build_plselection_prompt(char *, int, int, int, int, int);
extern char *root_plselection_prompt(char *, int, int, int, int, int);
extern char *build_plselection_prompt(char *, int, int, int, int, int);
extern void plnamesuffix(void);
extern void role_selection_prolog(int, winid);
extern void role_menu_extra(int, winid, boolean);
extern void role_init(void);
extern const char *Hello(struct monst *);
extern const char *Goodbye(void);
extern const struct Race *character_race(short);
/* ### rumors.c ### */