Difference for server/attack.c from version 1.44 to 1.45


version 1.44 version 1.45
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_attack_c =   * static char *rcsid_attack_c =
  *   "$Id: attack.c,v 1.44 2001/10/14 07:57:14 gros Exp $";   *   "$Id: attack.c,v 1.45 2001/10/15 07:38:03 garbled Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 391
 
Line 391
  break;   break;
      }       }
     }      }
   
       /* bail out if a monster is casting spells */
       if (!(hitter->type == PLAYER ||
    (get_owner(hitter) != NULL && hitter->owner->type == PLAYER)))
         return;
   
       /* we have no good messages for godpower, and they are usually diseases.
          in addition, scale down magic considerably. */
       if ((type & AT_MAGIC && RANDOM()%6) || type & AT_GODPOWER)
         return;
   
     /* Did a player hurt another player?  Inform both! */      /* Did a player hurt another player?  Inform both! */
     if(op->type==PLAYER&&      /* only show half the player->player combat messages */
       if(op->type==PLAYER&& RANDOM()%2 &&
        (get_owner(hitter)==NULL?hitter->type:hitter->owner->type)==PLAYER) {         (get_owner(hitter)==NULL?hitter->type:hitter->owner->type)==PLAYER) {
  if(get_owner(hitter)!=NULL)   if(get_owner(hitter)!=NULL)
      sprintf(buf,"%s's %s %s you.",       sprintf(buf,"%s's %s %s you.",
Line 411
 
Line 423
  new_draw_info(NDI_BLACK, 0,op,buf);   new_draw_info(NDI_BLACK, 0,op,buf);
     } /* end of player hitting player */      } /* end of player hitting player */
   
     if(hitter->type==PLAYER) {      /* scale down these messages too */
       if(hitter->type==PLAYER && RANDOM()%3 == 0) {
  sprintf(buf,"You %s.",buf1);   sprintf(buf,"You %s.",buf1);
  if (dam != 0) {   if (dam != 0) {
      if (dam < 10)       if (dam < 10)
Line 422
 
Line 435
  play_sound_player_only(hitter->contr, SOUND_PLAYER_HITS3,0,0);   play_sound_player_only(hitter->contr, SOUND_PLAYER_HITS3,0,0);
  }   }
  new_draw_info(NDI_BLACK, 0, hitter, buf);   new_draw_info(NDI_BLACK, 0, hitter, buf);
     } else if(get_owner(hitter)!=NULL&&hitter->owner->type==PLAYER) {      } else if(get_owner(hitter)!=NULL&&hitter->owner->type==PLAYER &&
          RANDOM()%6 == 0) {
  sprintf(buf,"Your %s%s %s.", hitter->name, buf2, op->name);   sprintf(buf,"Your %s%s %s.", hitter->name, buf2, op->name);
  play_sound_map(op->map, op->x, op->y, SOUND_PLAYER_HITS4);   play_sound_map(op->map, op->x, op->y, SOUND_PLAYER_HITS4);
  new_draw_info(NDI_BLACK, 0, hitter->owner, buf);   new_draw_info(NDI_BLACK, 0, hitter->owner, buf);


Legend:
line(s) removed in v.1.44 
line(s) changed
 line(s) added in v.1.45

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