return TRUE if praying revived a pet corpse */
| 2174 | |
| 2175 | /* return TRUE if praying revived a pet corpse */ |
| 2176 | staticfn boolean |
| 2177 | pray_revive(void) |
| 2178 | { |
| 2179 | struct obj *otmp; |
| 2180 | |
| 2181 | for (otmp = svl.level.objects[u.ux][u.uy]; otmp; otmp = otmp->nexthere) |
| 2182 | if ((otmp->otyp == CORPSE || otmp->otyp == STATUE) |
| 2183 | && has_omonst(otmp) |
| 2184 | && OMONST(otmp)->mtame && !OMONST(otmp)->isminion) |
| 2185 | break; |
| 2186 | |
| 2187 | if (!otmp) |
| 2188 | return FALSE; |
| 2189 | |
| 2190 | if (otmp->otyp == CORPSE) |
| 2191 | return (revive(otmp, TRUE) != NULL); |
| 2192 | else { |
| 2193 | return (animate_statue(otmp, u.ux, u.uy, ANIMATE_SPELL, NULL) != NULL); |
| 2194 | } |
| 2195 | } |
| 2196 | |
| 2197 | /* #pray command */ |
| 2198 | int |
no test coverage detected