1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-05-02 21:35:11 +01:00

Don't use role mon as youmonst.data, use race mon addled by mtemplate of youmonst. what will the consequences of this be???

This commit is contained in:
demogorgon22 2024-12-23 10:36:34 -05:00
parent 21036ecc52
commit 549ad5169d
3 changed files with 3 additions and 3 deletions

View file

@ -252,7 +252,7 @@ extern const struct Race races[]; /* Table of available races */
extern struct Race urace;
#define Race_if(X) (urace.malenum == (X))
#define Race_switch (urace.malenum)
#define youracedata (maybe_polyd(youmonst.data, &mons[urace.malenum]))
#define youracedata (youmonst.data)
#define Humanoid_half_dragon(role) (Role_if(PM_MADMAN) || (Role_if(PM_NOBLEMAN) && flags.initgend))
/*** Unified structure specifying gender information ***/

View file

@ -74,7 +74,7 @@ int mtyp;
struct permonst * ptr;
/* players in their base form are a very special case */
if (mon == &youmonst && (mtyp == u.umonster)) {
ptr = &upermonst;
ptr = permonst_of(mtyp, get_template(mon));
/* I'm not sure what bas should be, if it were to be needed */
}
/* horrors are a special case, and have memory allocated on a per-monster basis */

View file

@ -33,7 +33,7 @@ init_uasmon()
void
set_uasmon()
{
set_mon_data(&youmonst, u.umonnum);
set_mon_data(&youmonst, (flags.female && urace.femalenum != NON_PM) ? urace.femalenum : urace.malenum);
}
/** Returns true if the player monster is genocided. */