… | |
… | |
198 | /* no matter what, we fry the corpse. */ |
198 | /* no matter what, we fry the corpse. */ |
199 | if (temp && temp->map) |
199 | if (temp && temp->map) |
200 | { |
200 | { |
201 | /* replace corpse object with a burning object */ |
201 | /* replace corpse object with a burning object */ |
202 | newob = arch_to_object (archetype::find ("burnout")); |
202 | newob = arch_to_object (archetype::find ("burnout")); |
203 | if (newob != NULL) |
203 | if (newob) |
204 | { |
204 | newob->insert_at (temp, op); |
205 | newob->x = temp->x; |
205 | |
206 | newob->y = temp->y; |
|
|
207 | insert_ob_in_map (newob, temp->map, op, 0); |
|
|
208 | } |
|
|
209 | leveldead = temp->level; |
206 | leveldead = temp->level; |
210 | temp->destroy (); |
207 | temp->destroy (); |
211 | } |
208 | } |
212 | |
209 | |
213 | if (resurrection_fails (clevel, leveldead)) |
210 | if (resurrection_fails (clevel, leveldead)) |
214 | { |
211 | { |
215 | if (spell->randomitems) |
212 | if (spell->randomitems) |
216 | { |
|
|
217 | treasure *t; |
|
|
218 | |
|
|
219 | for (t = spell->randomitems->items; t; t = t->next) |
213 | for (treasure *t = spell->randomitems->items; t; t = t->next) |
220 | { |
|
|
221 | summon_hostile_monsters (op, t->nrof, t->item->name); |
214 | summon_hostile_monsters (op, t->nrof, t->item->name); |
222 | } |
|
|
223 | |
215 | |
224 | } |
|
|
225 | return 1; |
216 | return 1; |
226 | |
217 | |
227 | } |
218 | } |
228 | else |
219 | else |
229 | { |
|
|
230 | return resurrect_player (op, name_to_resurrect, spell); |
220 | return resurrect_player (op, name_to_resurrect, spell); |
231 | } |
|
|
232 | |
|
|
233 | return 1; |
|
|
234 | } |
221 | } |
235 | |
222 | |
236 | |
223 | |
237 | int |
224 | int |
238 | resurrection_fails (int levelcaster, int leveldead) |
225 | resurrection_fails (int levelcaster, int leveldead) |