ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/rune.C
(Generate patch)

Comparing deliantra/server/server/rune.C (file contents):
Revision 1.5 by root, Thu Sep 14 22:34:04 2006 UTC vs.
Revision 1.6 by root, Thu Sep 14 23:13:49 2006 UTC

216void 216void
217rune_attack (object *op, object *victim) 217rune_attack (object *op, object *victim)
218{ 218{
219 if (victim) 219 if (victim)
220 { 220 {
221 tag_t tag = victim->count;
222
223 hit_player (victim, op->stats.dam, op, op->attacktype, 1); 221 hit_player (victim, op->stats.dam, op, op->attacktype, 1);
224 if (was_destroyed (victim, tag)) 222
223 if (victim->destroyed ())
225 return; 224 return;
225
226 /* if there's a disease in the needle, put it in the player */ 226 /* if there's a disease in the needle, put it in the player */
227 if (HAS_RANDOM_ITEMS (op)) 227 if (HAS_RANDOM_ITEMS (op))
228 create_treasure (op->randomitems, op, 0, (victim->map ? victim->map->difficulty : 1), 0); 228 create_treasure (op->randomitems, op, 0, (victim->map ? victim->map->difficulty : 1), 0);
229
229 if (op->inv && op->inv->type == DISEASE) 230 if (op->inv && op->inv->type == DISEASE)
230 { 231 {
231 object *disease = op->inv; 232 object *disease = op->inv;
232 233
233 infect_object (victim, disease, 1); 234 infect_object (victim, disease, 1);
245 */ 246 */
246void 247void
247spring_trap (object *trap, object *victim) 248spring_trap (object *trap, object *victim)
248{ 249{
249 object *env; 250 object *env;
250 tag_t trap_tag = trap->count;
251 rv_vector rv; 251 rv_vector rv;
252 int i; 252 int i;
253 253
254 /* Prevent recursion */ 254 /* Prevent recursion */
255 if (trap->stats.hp <= 0) 255 if (trap->stats.hp <= 0)
287 287
288 /* Only if it is a spell do we proceed here */ 288 /* Only if it is a spell do we proceed here */
289 if ((trap->inv && trap->inv->type == SPELL) || (trap->other_arch && trap->other_arch->clone.type == SPELL)) 289 if ((trap->inv && trap->inv->type == SPELL) || (trap->other_arch && trap->other_arch->clone.type == SPELL))
290 { 290 {
291 291
292 if (was_destroyed (trap, trap_tag)) 292 if (trap->destroyed ())
293 return; 293 return;
294 294
295 // breaks summon golem spells, which, for inexplicable reasons, 295 // breaks summon golem spells, which, for inexplicable reasons,
296 // do not work like summon golem spells at all but still require 296 // do not work like summon golem spells at all but still require
297 // direction "0" to work at all. 297 // direction "0" to work at all.
312 } 312 }
313 } 313 }
314 else 314 else
315 { 315 {
316 rune_attack (trap, victim); 316 rune_attack (trap, victim);
317 if (was_destroyed (trap, trap_tag)) 317 if (trap->destroyed ())
318 return; 318 return;
319 } 319 }
320 320
321 if (trap->stats.hp <= 0) 321 if (trap->stats.hp <= 0)
322 { 322 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines