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
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
static void consume_offering(struct obj *);
static void offer_too_soon(aligntyp);
static void desecrate_high_altar(aligntyp);
+static boolean pray_revive(void);
static boolean water_prayer(boolean);
static boolean blocked_boulder(int, int);
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 */
int
dopray(void)
pleased(alignment);
} else {
/* coaligned */
- if (on_altar())
+ if (on_altar()) {
+ (void) pray_revive();
(void) water_prayer(TRUE);
+ }
pleased(alignment); /* nice */
}
return 1;