is_lminion should only match lawful minions

When Angels were introduced, they were always lawful.  Somewhere along the
line, non-lawful angels were added, but is_lminion and uses of it was never
updated to address this change.  Among other things, this resulted in
non-lawful angels delivering messages via #chat that are only appropriate
for lawful angels.  That is addressed simply by changing the definition of
is_lminion, which must take a struct monst, not a permonst, to return valid
results.  Also, non-lawful angels should summon appropriate monsters, not
lawful minions.
This commit is contained in:
cohrs
2002-10-24 04:13:56 +00:00
parent 71480033c6
commit ff8512b36b
8 changed files with 55 additions and 16 deletions

View File

@@ -9,6 +9,7 @@
#include "hack.h"
#include "qtext.h"
#include "epri.h"
extern const int monstr[];
@@ -428,7 +429,7 @@ nasty(mcast)
int count=0;
if(!rn2(10) && Inhell) {
msummon(&mons[PM_WIZARD_OF_YENDOR]);
msummon((struct monst *) 0); /* summons like WoY */
count++;
} else {
tmp = (u.ulevel > 3) ? u.ulevel/3 : 1; /* just in case -- rph */
@@ -621,7 +622,7 @@ register struct monst *mtmp;
verbalize("%s %s!",
random_malediction[rn2(SIZE(random_malediction))],
random_insult[rn2(SIZE(random_insult))]);
} else if(is_lminion(mtmp->data)) {
} else if(is_lminion(mtmp)) {
com_pager(rn2(QTN_ANGELIC - 1 + (Hallucination ? 1 : 0)) +
QT_ANGELIC);
} else {