Difference for server/monster.c from version 1.21 to 1.22


version 1.21 version 1.22
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_monster_c =   * static char *rcsid_monster_c =
  *    "$Id: monster.c,v 1.21 2001/05/23 06:14:41 mwedel Exp $";   *    "$Id: monster.c,v 1.22 2001/05/29 04:41:53 mwedel Exp $";
  */   */
   
 /*  /*
Line 320
 
Line 320
      if(QUERY_FLAG(op,FLAG_READY_HORN)&&!(RANDOM()%5))       if(QUERY_FLAG(op,FLAG_READY_HORN)&&!(RANDOM()%5))
  if(monster_use_horn(op,part,enemy,dir))   if(monster_use_horn(op,part,enemy,dir))
      return 0;       return 0;
 #ifdef ALLOW_SKILLS  
      if(QUERY_FLAG(op,FLAG_READY_SKILL)&&!(RANDOM()%3))       if(QUERY_FLAG(op,FLAG_READY_SKILL)&&!(RANDOM()%3))
  if(monster_use_skill(op,part,enemy,dir))   if(monster_use_skill(op,part,enemy,dir))
      return 0;       return 0;
 #endif  
      if(QUERY_FLAG(op,FLAG_READY_BOW)&&!(RANDOM()%2))       if(QUERY_FLAG(op,FLAG_READY_BOW)&&!(RANDOM()%2))
  if(monster_use_bow(op,part,enemy,dir))   if(monster_use_bow(op,part,enemy,dir))
      return 0;       return 0;
Line 416
 
Line 414
  if(QUERY_FLAG(op,FLAG_RUN_AWAY)) {   if(QUERY_FLAG(op,FLAG_RUN_AWAY)) {
      signed char tmp = (signed char)((float)part->stats.wc*(float)2);       signed char tmp = (signed char)((float)part->stats.wc*(float)2);
      part->stats.wc+=tmp;       part->stats.wc+=tmp;
 #ifdef ALLOW_SKILLS  
      (void)skill_attack(enemy,part,0,NULL);       (void)skill_attack(enemy,part,0,NULL);
 #else  
      (void)attack_ob(enemy,part);  
 #endif  
      part->stats.wc-=tmp;       part->stats.wc-=tmp;
  } else   } else
 #ifdef ALLOW_SKILLS  
      (void)skill_attack(enemy,part,0,NULL);       (void)skill_attack(enemy,part,0,NULL);
 #else  
      (void) attack_ob(enemy,part);  
 #endif  
     } /* if monster is in attack range */      } /* if monster is in attack range */
   
     if(QUERY_FLAG(part,FLAG_FREED))    /* Might be freed by ghost-attack or hit-back */      if(QUERY_FLAG(part,FLAG_FREED))    /* Might be freed by ghost-attack or hit-back */
Line 541
 
Line 531
   return cast_spell(part,part,dir,sp_typ,ability, spellNormal,NULL);    return cast_spell(part,part,dir,sp_typ,ability, spellNormal,NULL);
 }  }
   
 #ifdef ALLOW_SKILLS  
 /* monster_use_skill()-implemented 95-04-28 to allow monster skill use.  /* monster_use_skill()-implemented 95-04-28 to allow monster skill use.
  * Note that monsters do not need the skills SK_MELEE_WEAPON and   * Note that monsters do not need the skills SK_MELEE_WEAPON and
  * SK_MISSILE_WEAPON to make those respective attacks, if we    * SK_MISSILE_WEAPON to make those respective attacks, if we
Line 586
 
Line 575
   return do_skill(head,dir,NULL);    return do_skill(head,dir,NULL);
 }  }
   
 #endif   
   
 /* For the future: Move this function together with case 3: in fire() */  /* For the future: Move this function together with case 3: in fire() */
   
Line 968
 
Line 956
             check_good_armour(mon,item);              check_good_armour(mon,item);
       break;        break;
     case SKILL:      case SKILL:
 #ifdef ALLOW_SKILLS  
       if((flag=QUERY_FLAG(mon,FLAG_CAN_USE_SKILL))) {        if((flag=QUERY_FLAG(mon,FLAG_CAN_USE_SKILL))) {
         if(!QUERY_FLAG(item,FLAG_APPLIED)) manual_apply(mon,item,0);          if(!QUERY_FLAG(item,FLAG_APPLIED)) manual_apply(mon,item,0);
         if (item->type==SKILL&&present_in_ob(SKILL,mon)!=NULL)          if (item->type==SKILL&&present_in_ob(SKILL,mon)!=NULL)
    SET_FLAG(mon, FLAG_READY_SKILL);     SET_FLAG(mon, FLAG_READY_SKILL);
       }        }
 #endif  
       break;        break;
     case RING:      case RING:
       flag=QUERY_FLAG(mon,FLAG_USE_RING);        flag=QUERY_FLAG(mon,FLAG_USE_RING);


Legend:
line(s) removed in v.1.21 
line(s) changed
 line(s) added in v.1.22

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