Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-06-06 08:09:18 -04:00

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pray.c $NHDT-Date: 1559670608 2019/06/04 17:50:08 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.112 $ */
/* NetHack 3.6 pray.c $NHDT-Date: 1559785004 2019/06/06 01:36:44 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.113 $ */
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1885,7 +1885,7 @@ prayer_done() /* M. Stephenson (1.0.3b) */
return 1;
}
if (Inhell) {
pline("Since you are in Gehennom, %s won't help you.",
pline("Since you are in Gehennom, %s can't help you.",
align_gname(alignment));
/* haltingly aligned is least likely to anger */
if (u.ualign.record <= 0 || rnl(u.ualign.record))
@@ -1926,6 +1926,7 @@ doturn()
{
/* Knights & Priest(esse)s only please */
struct monst *mtmp, *mtmp2;
const char *Gname;
int once, range, xlev;
if (!Role_if(PM_PRIEST) && !Role_if(PM_KNIGHT)) {
@@ -1948,33 +1949,50 @@ doturn()
return 0;
}
u.uconduct.gnostic++;
Gname = halu_gname(u.ualign.type);
/* [What about needing free hands (does #turn involve any gesturing)?] */
if (!can_chant(&youmonst)) {
/* "evilness": "demons and undead" is too verbose and too precise */
You("are %s upon %s to turn aside evilness.",
Strangled ? "not able to call" : "incapable of calling", Gname);
/* violates agnosticism due to intent; conduct tracking is not
supposed to affect play but we make an exception here: use a
move if this is the first time agnostic conduct has been broken */
return (u.uconduct.gnostic == 1);
}
if ((u.ualign.type != A_CHAOTIC
&& (is_demon(g.youmonst.data) || is_undead(g.youmonst.data)))
|| u.ugangr > 6) { /* "Die, mortal!" */
pline("For some reason, %s seems to ignore you.", u_gname());
pline("For some reason, %s seems to ignore you.", Gname);
aggravate();
exercise(A_WIS, FALSE);
return 1;
}
if (Inhell) {
pline("Since you are in Gehennom, %s won't help you.", u_gname());
pline("Since you are in Gehennom, %s %s help you.",
/* not actually calling upon Moloch but use alternate
phrasing anyway if hallucinatory feedback says it's him */
Gname, !strcmp(Gname, Moloch) ? "won't" : "can't");
aggravate();
return 1;
}
pline("Calling upon %s, you chant an arcane formula.", u_gname());
pline("Calling upon %s, you chant an arcane formula.", Gname);
exercise(A_WIS, TRUE);
/* note: does not perform unturn_dead() on victims' inventories */
range = BOLT_LIM + (u.ulevel / 5); /* 5 to 11 */
range = BOLT_LIM + (u.ulevel / 5); /* 8 to 14 */
range *= range;
once = 0;
for (mtmp = fmon; mtmp; mtmp = mtmp2) {
mtmp2 = mtmp->nmon;
if (DEADMONSTER(mtmp))
continue;
if (!cansee(mtmp->mx, mtmp->my) || distu(mtmp->mx, mtmp->my) > range)
/* 3.6.3: used to use cansee() here but the purpose is to prevent
#turn operating through walls, not to require that the hero be
able to see the target location */
if (!couldsee(mtmp->mx, mtmp->my)
|| distu(mtmp->mx, mtmp->my) > range)
continue;
if (!mtmp->mpeaceful
@@ -1993,15 +2011,20 @@ doturn()
/* this is intentional, lichs are tougher
than zombies. */
case S_LICH:
xlev += 2; /*FALLTHRU*/
xlev += 2;
/*FALLTHRU*/
case S_GHOST:
xlev += 2; /*FALLTHRU*/
xlev += 2;
/*FALLTHRU*/
case S_VAMPIRE:
xlev += 2; /*FALLTHRU*/
xlev += 2;
/*FALLTHRU*/
case S_WRAITH:
xlev += 2; /*FALLTHRU*/
xlev += 2;
/*FALLTHRU*/
case S_MUMMY:
xlev += 2; /*FALLTHRU*/
xlev += 2;
/*FALLTHRU*/
case S_ZOMBIE:
if (u.ulevel >= xlev && !resist(mtmp, '\0', 0, NOTELL)) {
if (u.ualign.type == A_CHAOTIC) {
@@ -2020,6 +2043,17 @@ doturn()
}
}
}
/*
* TODO?
* Shouldn't there be some detrimental effect on self for
* successful #turn while in demon or undead form?
*
* Paralysis duration probably ought to be based on the strengh
* of turned creatures rather than on turner's level.
* Why doesn't this honor Free_action? [Because being able to
* repeat #turn every turn would be too powerful.]
*/
nomul(-(5 - ((u.ulevel - 1) / 6))); /* -5 .. -1 */
g.multi_reason = "trying to turn the monsters";
g.nomovemsg = You_can_move_again;