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.34 by root, Mon Sep 29 06:32:09 2008 UTC vs.
Revision 1.35 by root, Mon Sep 29 10:20:49 2008 UTC

218 if (op->inv && op->inv->type == DISEASE) 218 if (op->inv && op->inv->type == DISEASE)
219 { 219 {
220 object *disease = op->inv; 220 object *disease = op->inv;
221 221
222 infect_object (victim, disease, 1); 222 infect_object (victim, disease, 1);
223 disease->destroy (); 223 disease->destroy (true);
224 } 224 }
225 } 225 }
226 else 226 else
227 hit_map (op, 0, op->attacktype, 1); 227 hit_map (op, 0, op->attacktype, 1);
228} 228}
279 // creatures know who to attack. 279 // creatures know who to attack.
280 280
281 /* Only if it is a spell do we proceed here */ 281 /* Only if it is a spell do we proceed here */
282 if ((trap->inv && trap->inv->type == SPELL) || (trap->other_arch && trap->other_arch->type == SPELL)) 282 if ((trap->inv && trap->inv->type == SPELL) || (trap->other_arch && trap->other_arch->type == SPELL))
283 { 283 {
284
285 if (trap->destroyed ()) 284 if (trap->destroyed ())
286 return; 285 return;
287 286
288 // breaks summon golem spells, which, for inexplicable reasons, 287 // breaks summon golem spells, which, for inexplicable reasons,
289 // do not work like summon golem spells at all but still require 288 // do not work like summon golem spells at all but still require
298 else 297 else
299 { 298 {
300 object *spell = arch_to_object (trap->other_arch); 299 object *spell = arch_to_object (trap->other_arch);
301 300
302 cast_spell (env, trap, trap->direction, spell, NULL); 301 cast_spell (env, trap, trap->direction, spell, NULL);
303 spell->destroy (); 302 spell->destroy (true);
304 } 303 }
305 } 304 }
306 } 305 }
307 else 306 else
308 { 307 {
356 * if you fail, no point on that. I suppose we could do a level 355 * if you fail, no point on that. I suppose we could do a level
357 * comparison so low level players can't erase high level players runes. 356 * comparison so low level players can't erase high level players runes.
358 */ 357 */
359 if (tmp->type == SIGN && !strcmp (tmp->arch->archname, "rune_mark")) 358 if (tmp->type == SIGN && !strcmp (tmp->arch->archname, "rune_mark"))
360 { 359 {
361 tmp->destroy (); 360 tmp->destroy (true);
362 new_draw_info (NDI_UNIQUE, 0, op, "You wipe out the rune of marking!"); 361 new_draw_info (NDI_UNIQUE, 0, op, "You wipe out the rune of marking!");
363 return 1; 362 return 1;
364 } 363 }
365 364
366 /* now search tmp's inventory for traps 365 /* now search tmp's inventory for traps
433 / skill->level; 432 / skill->level;
434 433
435 if (!(random_roll (0, (MAX (2, MIN (20, trap->level - skill->level + 5 - disarmer->stats.Dex / 2)) - 1), disarmer, PREFER_LOW))) 434 if (!(random_roll (0, (MAX (2, MIN (20, trap->level - skill->level + 5 - disarmer->stats.Dex / 2)) - 1), disarmer, PREFER_LOW)))
436 { 435 {
437 new_draw_info_format (NDI_UNIQUE, 0, disarmer, "You successfully disarm the %s!", &trap->name); 436 new_draw_info_format (NDI_UNIQUE, 0, disarmer, "You successfully disarm the %s!", &trap->name);
438 trap->destroy (1); 437 trap->destroy (true);
439 438
440 /* If it is your own trap, (or any players trap), don't you don't 439 /* If it is your own trap, (or any players trap), don't you don't
441 * get exp for it. 440 * get exp for it.
442 */ 441 */
443 if (trap->owner && trap->owner->type != PLAYER && risk) 442 if (trap->owner && trap->owner->type != PLAYER && risk)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines