Praying on an altar with pet corpse on it can revive the pet
This commit is contained in:
@@ -950,6 +950,7 @@ a hero on the quest home level who runs or travels past the quest leader and
|
|||||||
allow rush/run over water if wearing discovered water walking boots
|
allow rush/run over water if wearing discovered water walking boots
|
||||||
flying pets wouldn't target underwater food but if they happened to fly over
|
flying pets wouldn't target underwater food but if they happened to fly over
|
||||||
such food they could and would eat it
|
such food they could and would eat it
|
||||||
|
praying on an altar with pet corpse on it can revive the pet
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
+21
-1
@@ -22,6 +22,7 @@ static void gods_upset(aligntyp);
|
|||||||
static void consume_offering(struct obj *);
|
static void consume_offering(struct obj *);
|
||||||
static void offer_too_soon(aligntyp);
|
static void offer_too_soon(aligntyp);
|
||||||
static void desecrate_high_altar(aligntyp);
|
static void desecrate_high_altar(aligntyp);
|
||||||
|
static boolean pray_revive(void);
|
||||||
static boolean water_prayer(boolean);
|
static boolean water_prayer(boolean);
|
||||||
static boolean blocked_boulder(int, int);
|
static boolean blocked_boulder(int, int);
|
||||||
|
|
||||||
@@ -1994,6 +1995,23 @@ can_pray(boolean praying) /* false means no messages should be given */
|
|||||||
return !praying ? (boolean) (g.p_type == 3 && !Inhell) : TRUE;
|
return !praying ? (boolean) (g.p_type == 3 && !Inhell) : TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* return TRUE if praying revived a pet corpse */
|
||||||
|
static boolean
|
||||||
|
pray_revive(void)
|
||||||
|
{
|
||||||
|
struct obj *otmp;
|
||||||
|
|
||||||
|
for (otmp = g.level.objects[u.ux][u.uy]; otmp; otmp = otmp->nexthere)
|
||||||
|
if (otmp->otyp == CORPSE && has_omonst(otmp)
|
||||||
|
&& OMONST(otmp)->mtame && !OMONST(otmp)->isminion)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (!otmp)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return (revive(otmp, TRUE) != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/* #pray commmand */
|
/* #pray commmand */
|
||||||
int
|
int
|
||||||
dopray(void)
|
dopray(void)
|
||||||
@@ -2102,8 +2120,10 @@ prayer_done(void) /* M. Stephenson (1.0.3b) */
|
|||||||
pleased(alignment);
|
pleased(alignment);
|
||||||
} else {
|
} else {
|
||||||
/* coaligned */
|
/* coaligned */
|
||||||
if (on_altar())
|
if (on_altar()) {
|
||||||
|
(void) pray_revive();
|
||||||
(void) water_prayer(TRUE);
|
(void) water_prayer(TRUE);
|
||||||
|
}
|
||||||
pleased(alignment); /* nice */
|
pleased(alignment); /* nice */
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user