improvements to pronoun usage when hallucinating
function calls made from mapglyph based on dungeon level are now called once
per level
+fix accessing mons[-1] when trying to gate in a non-valid demon
Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository
if (is_dprince(ptr) || (ptr == &mons[PM_WIZARD_OF_YENDOR])) {
dtype = (!rn2(20)) ? dprince(atyp) : (!rn2(4)) ? dlord(atyp)
: ndemon(atyp);
- cnt = (!rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
+ cnt = ((dtype != NON_PM)
+ && !rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
} else if (is_dlord(ptr)) {
dtype = (!rn2(50)) ? dprince(atyp) : (!rn2(20)) ? dlord(atyp)
: ndemon(atyp);
- cnt = (!rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
+ cnt = ((dtype != NON_PM)
+ && !rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
} else if (is_ndemon(ptr)) {
dtype = (!rn2(20)) ? dlord(atyp) : (!rn2(6)) ? ndemon(atyp)
: monsndx(ptr);
dtype = (is_lord(ptr) && !rn2(20))
? llord()
: (is_lord(ptr) || !rn2(6)) ? lminion() : monsndx(ptr);
- cnt = (!rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1;
+ cnt = ((dtype != NON_PM)
+ && !rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1;
} else if (ptr == &mons[PM_ANGEL]) {
/* non-lawful angels can also summon */
if (!rn2(6)) {
} else {
dtype = PM_ANGEL;
}
- cnt = (!rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1;
+ cnt = ((dtype != NON_PM)
+ && !rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1;
}
if (dtype == NON_PM)