Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disarm spell




	I took out some time to look at this; I don't think
	it will be much of a problem to fix. First off, the
	spell calls disarm_trap() (though dispel_rune()) 
	and *if ALLOW_SKILLS is not defined* then experience
	will be awarded for disarming the rune/trap via
	a the disarm spell. The spell function itself has

spell_util.c:    success = dispel_rune(op,dir,0);  /* 0 means no risk of detonating rune */

	a risk factor associated with it. Just change the 
	risk factor to a positive number (1?) and there will
	be a possibility of the trap detonating even when
	you use the spell. OR, you can go the other route,
	which is to remove the chance to gain exp when the 
	spell is used (and ALLOW_SKILLS *isnt* defined..)
	I include a patch for that case below...

						b.t.


*** rune.c.orig	Mon Dec 18 13:25:00 1995
--- rune.c	Mon Dec 18 13:25:49 1995
***************
*** 308,318 ****
              free_object(trap);
  #ifdef ALLOW_SKILLS 
              return trapworth;	
  #else
  	    if(!trap->owner) add_exp(disarmer,trapworth);
!             else if(trap->owner && trap->owner->type!=PLAYER)
  	      add_exp(disarmer,trapworth);
  	    return 1;
  #endif
          }
      else
--- 308,318 ----
              free_object(trap);
  #ifdef ALLOW_SKILLS 
              return trapworth;	
  #else
  	    if(!trap->owner) add_exp(disarmer,trapworth);
!             else if(trap->owner && trap->owner->type!=PLAYER && risk)
  	      add_exp(disarmer,trapworth);
  	    return 1;
  #endif
          }
      else