Difference for server/rune.c from version 1.38 to 1.39


version 1.38 version 1.39
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_rune_c =   * static char *rcsid_rune_c =
  *   "$Id: rune.c,v 1.38 2004/06/18 07:45:29 mwedel Exp $";   *   "$Id: rune.c,v 1.39 2004/09/14 19:59:08 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 168
 
Line 168
     rune->direction :     direction it will cast a spell in      rune->direction :     direction it will cast a spell in
     rune->dam     :     damage the rune will do if it doesn't cast spells      rune->dam     :     damage the rune will do if it doesn't cast spells
     rune->attacktype:     type of damage it does, if not casting spells      rune->attacktype:     type of damage it does, if not casting spells
     rune->slaying   :       string description of the spell in the rune      rune->other_arch:       spell in the rune
       rune->Cha       :       how hidden the rune is
       rune->maxhp     :       number of spells the rune casts
 */  */
   
 void move_rune(object *op) {  void move_rune(object *op) {
Line 221
 
Line 222
     object *env;      object *env;
     tag_t trap_tag = trap->count;      tag_t trap_tag = trap->count;
     rv_vector rv;      rv_vector rv;
       int i;
   
     /* Prevent recursion */      /* Prevent recursion */
     if (trap->stats.hp <= 0)      if (trap->stats.hp <= 0)
Line 268
 
Line 269
  if (was_destroyed (trap, trap_tag))   if (was_destroyed (trap, trap_tag))
      return;       return;
   
    for(i = 0; i < MAX(1, trap->stats.maxhp); i++) {
  if (trap->inv)   if (trap->inv)
      cast_spell(trap,trap,trap->direction,trap->inv,NULL);       cast_spell(trap,trap,trap->direction,trap->inv,NULL);
  else {   else {
Line 275
 
Line 277
      cast_spell(trap,trap,trap->direction,spell,NULL);       cast_spell(trap,trap,trap->direction,spell,NULL);
      free_object(spell);       free_object(spell);
  }   }
    }
     } else {      } else {
  rune_attack(trap,victim);    rune_attack(trap,victim);
  if (was_destroyed (trap, trap_tag))   if (was_destroyed (trap, trap_tag))
Line 426
 
Line 429
      * a peak probability at difficulty        * a peak probability at difficulty
      */       */
   
     trap->level = MAX(1, rndm(0, difficulty-1) + rndm(0, difficulty-1));      trap->level = rndm(0, difficulty-1) + rndm(0, difficulty-1);
       if(trap->level < 1)
    trap->level = 1;
   
     /* set the hiddenness of the trap, similar formula to above */      /* set the hiddenness of the trap, similar formula to above */
     trap->stats.Cha = rndm(0, 19) + rndm(0, difficulty-1) + rndm(0, difficulty-1);      trap->stats.Cha = rndm(0, 19) + rndm(0, difficulty-1) + rndm(0, difficulty-1);
Line 442
 
Line 447
      trap->stats.dam+=rndm(0, 4);       trap->stats.dam+=rndm(0, 4);
          
  /*  the poison trap special case */   /*  the poison trap special case */
  if(trap->attacktype & AT_POISON)   if(trap->attacktype & AT_POISON) {
      trap->stats.dam = MAX(1, rndm(0, difficulty-1));         trap->stats.dam = rndm(0, difficulty-1);
        if(trap->stats.dam < 1)
    trap->stats.dam = 1;
    }
   
  /*  so we get an appropriate amnt of exp for AT_DEATH traps */   /*  so we get an appropriate amnt of exp for AT_DEATH traps */
  if(trap->attacktype & AT_DEATH) trap->stats.dam = 127;   if(trap->attacktype & AT_DEATH) trap->stats.dam = 127;


Legend:
line(s) removed in v.1.38 
line(s) changed
 line(s) added in v.1.39

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:43