… | |
… | |
23 | |
23 | |
24 | /* the contents of this file were create solely by peterm@soda.berkeley.edu |
24 | /* the contents of this file were create solely by peterm@soda.berkeley.edu |
25 | all of the above disclaimers apply. */ |
25 | all of the above disclaimers apply. */ |
26 | |
26 | |
27 | #include <global.h> |
27 | #include <global.h> |
28 | #ifndef __CEXTRACT__ |
|
|
29 | # include <sproto.h> |
28 | #include <sproto.h> |
30 | #endif |
|
|
31 | #include <spells.h> |
29 | #include <spells.h> |
32 | #include <errno.h> |
30 | #include <errno.h> |
33 | #ifdef sequent |
|
|
34 | |
31 | |
35 | /* stoopid sequent includes don't do this like they should */ |
|
|
36 | extern char *sys_errlist[]; |
|
|
37 | extern int sys_nerr; |
|
|
38 | #endif |
|
|
39 | extern char **classname; |
32 | extern char **classname; |
40 | extern object *objects; |
33 | extern object *objects; |
41 | |
|
|
42 | |
|
|
43 | |
34 | |
44 | /* name of the person to resurrect and which spell was used |
35 | /* name of the person to resurrect and which spell was used |
45 | * to resurrect |
36 | * to resurrect |
46 | */ |
37 | */ |
47 | static int |
38 | static int |
… | |
… | |
56 | char buf2[MAX_BUF]; |
47 | char buf2[MAX_BUF]; |
57 | const char *race = NULL; |
48 | const char *race = NULL; |
58 | sint64 exp; |
49 | sint64 exp; |
59 | int Con; |
50 | int Con; |
60 | |
51 | |
61 | |
|
|
62 | /* reincarnation, which changes the race */ |
52 | /* reincarnation, which changes the race */ |
63 | if (spell->race) |
53 | if (spell->race) |
64 | { |
54 | { |
65 | treasurelist *tl = find_treasurelist (spell->race); |
55 | treasurelist *tl = find_treasurelist (spell->race); |
66 | treasure *t; |
56 | treasure *t; |
… | |
… | |
189 | temp = NULL; |
179 | temp = NULL; |
190 | else |
180 | else |
191 | { |
181 | { |
192 | /* First we need to find a corpse, if any. */ |
182 | /* First we need to find a corpse, if any. */ |
193 | /* If no object, temp will be set to NULL */ |
183 | /* If no object, temp will be set to NULL */ |
194 | for (temp = get_map_ob (m, sx, sy); temp != NULL; temp = temp->above) |
184 | for (temp = GET_MAP_OB (m, sx, sy); temp != NULL; temp = temp->above) |
195 | /* If it is corpse, this must be what we want to raise */ |
185 | /* If it is corpse, this must be what we want to raise */ |
196 | if (temp->type == CORPSE) |
186 | if (temp->type == CORPSE) |
197 | break; |
187 | break; |
198 | } |
188 | } |
199 | |
189 | |
… | |
… | |
215 | newob->x = temp->x; |
205 | newob->x = temp->x; |
216 | newob->y = temp->y; |
206 | newob->y = temp->y; |
217 | insert_ob_in_map (newob, temp->map, op, 0); |
207 | insert_ob_in_map (newob, temp->map, op, 0); |
218 | } |
208 | } |
219 | leveldead = temp->level; |
209 | leveldead = temp->level; |
220 | remove_ob (temp); |
210 | temp->destroy (); |
221 | free_object (temp); |
|
|
222 | } |
211 | } |
223 | |
212 | |
224 | if (resurrection_fails (clevel, leveldead)) |
213 | if (resurrection_fails (clevel, leveldead)) |
225 | { |
214 | { |
226 | if (spell->randomitems) |
215 | if (spell->randomitems) |