Difference for server/skills.c from version 1.40 to 1.41


version 1.40 version 1.41
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_skills_c =   * static char *rcsid_skills_c =
  *   "$Id: skills.c,v 1.40 2003/06/26 11:27:43 gros Exp $";   *   "$Id: skills.c,v 1.41 2003/09/04 06:25:32 temitchell Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 368
 
Line 368
     if (number < ((dex + bonus) - difficulty)) {       if (number < ((dex + bonus) - difficulty)) {
       remove_door(door);        remove_door(door);
       success = 1;        success = 1;
     } else if (door->inv && door->inv->type==RUNE) {  /* set off any traps? */       } else if (door->inv && (door->inv->type==RUNE || door->inv->type==TRAP)) {  /* set off any traps? */
  spring_trap(door->inv,pl);           spring_trap(door->inv,pl);       
     }       }
     return success;      return success;
Line 894
 
Line 894
 int find_traps (object *pl) {    int find_traps (object *pl) { 
    object *tmp,*tmp2;     object *tmp,*tmp2;
    int i,expsum=0;     int i,expsum=0;
   /*First we search all around us for runes and traps, which are    /*First we search all around us for runes and traps*/
     all type RUNE */  
    for(i=0;i<9;i++) {      for(i=0;i<9;i++) {
         /*  Check everything in the square for trapness */          /*  Check everything in the square for trapness */
         if(out_of_map(pl->map,pl->x + freearr_x[i],pl->y + freearr_y[i])) continue;          if(out_of_map(pl->map,pl->x + freearr_x[i],pl->y + freearr_y[i])) continue;
Line 906
 
Line 905
                 of these objects' inventory */                  of these objects' inventory */
   
             for(tmp2=tmp->inv;tmp2!=NULL;tmp2=tmp2->below)              for(tmp2=tmp->inv;tmp2!=NULL;tmp2=tmp2->below)
                 if(tmp2->type==RUNE)                    if(tmp2->type==RUNE || tmp2->type==TRAP) 
    if(trap_see(pl,tmp2)) {      if(trap_see(pl,tmp2)) {
  trap_show(tmp2,tmp);    trap_show(tmp2,tmp);
   if(tmp2->stats.Cha>1) {     if(tmp2->stats.Cha>1) {
Line 919
 
Line 918
      tmp2->stats.Cha = 1; /* unhide the trap */        tmp2->stats.Cha = 1; /* unhide the trap */
  }   }
    }     }
             if(tmp->type==RUNE)                if(tmp->type==RUNE || tmp->type==TRAP) 
    if(trap_see(pl,tmp)) {      if(trap_see(pl,tmp)) {
  trap_show(tmp,tmp);    trap_show(tmp,tmp);
   if(tmp->stats.Cha>1) {    if(tmp->stats.Cha>1) {
Line 1336
 
Line 1335
        * of these objects' inventory */         * of these objects' inventory */
   
       for(tmp2=tmp->inv;tmp2!=NULL;tmp2=tmp2->below)        for(tmp2=tmp->inv;tmp2!=NULL;tmp2=tmp2->below)
          if(tmp2->type==RUNE&&tmp2->stats.Cha<=1) {           if((tmp2->type==RUNE || tmp2->type==TRAP)&&tmp2->stats.Cha<=1) {
               trap_show(tmp2,tmp);                trap_show(tmp2,tmp);
               if(trap_disarm(op,tmp2,1) && (!tmp2->owner || tmp2->owner->type!=PLAYER))                if(trap_disarm(op,tmp2,1) && (!tmp2->owner || tmp2->owner->type!=PLAYER))
     success += calc_skill_exp(op,tmp2);      success += calc_skill_exp(op,tmp2);
          }           }
   
       if(tmp->type==RUNE&&tmp->stats.Cha<=1) {        if((tmp->type==RUNE || tmp->type==TRAP)&&tmp->stats.Cha<=1) {
          trap_show(tmp,tmp);           trap_show(tmp,tmp);
          if (trap_disarm(op,tmp,1) && (!tmp->owner || tmp->owner->type!=PLAYER))           if (trap_disarm(op,tmp,1) && (!tmp->owner || tmp->owner->type!=PLAYER))
     success += calc_skill_exp(op,tmp);      success += calc_skill_exp(op,tmp);
Line 1720
 
Line 1719
     move_arrow(throw_ob);      move_arrow(throw_ob);
     return 1;      return 1;
 }  }
   


Legend:
line(s) removed in v.1.40 
line(s) changed
 line(s) added in v.1.41

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