Difference for server/attack.c from version 1.124 to 1.125


version 1.124 version 1.125
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_attack_c =   * static char *rcsid_attack_c =
  *   "$Id: attack.c,v 1.124 2006/05/03 00:51:52 qal21 Exp $";   *   "$Id: attack.c,v 1.125 2006/05/05 09:26:34 ryo_saeba Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 43
 
Line 43
   
 /*#define ATTACK_DEBUG*/  /*#define ATTACK_DEBUG*/
   
   static void slow_player(object *op, object *hitter, int dam);
   static void deathstrike_player(object *op, object *hitter, int *dam);
   static int adj_attackroll(object *hitter, object *target);
   static int is_aimed_missile(object *op);
   static int did_make_save_item(object *op, int type, object *originator);
   static void poison_player(object *op, object *hitter, int dam);
   
 /**  /**
  * Cancels object *op.  Cancellation basically means an object loses   * Cancels object *op.  Cancellation basically means an object loses
  * its magical benefits.   * its magical benefits.
  */   */
 void cancellation(object *op)  static void cancellation(object *op)
 {  {
     object *tmp;      object *tmp;
   
Line 82
 
Line 89
  * any further action (like destroying the item).   * any further action (like destroying the item).
  */   */
   
 int did_make_save_item(object *op, int type, object *originator) {  static int did_make_save_item(object *op, int type, object *originator) {
     int i, roll, saves=0, attacks=0, number;      int i, roll, saves=0, attacks=0, number;
     materialtype_t *mt;      materialtype_t *mt;
   
Line 376
 
Line 383
     return 0;      return 0;
 }  }
   
 void attack_message(int dam, int type, object *op, object *hitter) {  static void attack_message(int dam, int type, object *op, object *hitter) {
   char buf[MAX_BUF], buf1[MAX_BUF], buf2[MAX_BUF];    char buf[MAX_BUF], buf1[MAX_BUF], buf2[MAX_BUF];
   int i, found=0;    int i, found=0;
   mapstruct *map;    mapstruct *map;
Line 976
 
Line 983
 }  }
   
   
 void tear_down_wall(object *op)  static void tear_down_wall(object *op)
 {  {
     int perc=0;      int perc=0;
   
Line 1019
 
Line 1026
     }      }
 }  }
   
 void scare_creature(object *target, object *hitter)  static void scare_creature(object *target, object *hitter)
 {  {
     object *owner = get_owner(hitter);      object *owner = get_owner(hitter);
   
Line 1038
 
Line 1045
  * Note - changed for PR code - we now pass the attack number and not   * Note - changed for PR code - we now pass the attack number and not
  * the attacktype.  Makes it easier for the PR code.  */   * the attacktype.  Makes it easier for the PR code.  */
   
 int hit_player_attacktype(object *op, object *hitter, int dam,   static int hit_player_attacktype(object *op, object *hitter, int dam,
  uint32 attacknum, int magic) {   uint32 attacknum, int magic) {
      
     int doesnt_slay = 1;      int doesnt_slay = 1;
Line 1347
 
Line 1354
  * a bit - I think it should be functionally equivalant.   * a bit - I think it should be functionally equivalant.
  * MSW 2002-07-17   * MSW 2002-07-17
  */   */
 int kill_object(object *op,int dam, object *hitter, int type)  static int kill_object(object *op,int dam, object *hitter, int type)
 {  {
     char buf[MAX_BUF];      char buf[MAX_BUF];
     const char *skill;      const char *skill;
Line 1906
 
Line 1913
 }  }
   
   
 void poison_player(object *op, object *hitter, int dam)  static void poison_player(object *op, object *hitter, int dam)
 {  {
     archetype *at = find_archetype("poisoning");      archetype *at = find_archetype("poisoning");
     object *tmp=present_arch_in_ob(at,op);      object *tmp=present_arch_in_ob(at,op);
Line 1960
 
Line 1967
  tmp->stats.food++;   tmp->stats.food++;
 }  }
   
 void slow_player(object *op,object *hitter,int dam)  static void slow_player(object *op,object *hitter,int dam)
 {    archetype *at = find_archetype("slowness");  {    archetype *at = find_archetype("slowness");
     object *tmp;      object *tmp;
     if(at == NULL) {      if(at == NULL) {
Line 2074
 
Line 2081
  * Attempts to kill 'op'.  hitter is the attack object, dam is   * Attempts to kill 'op'.  hitter is the attack object, dam is
  * the computed damaged.   * the computed damaged.
  */   */
 void deathstrike_player(object *op, object *hitter, int *dam)   static void deathstrike_player(object *op, object *hitter, int *dam)
 {  {
     /*  The intention of a death attack is to kill outright things      /*  The intention of a death attack is to kill outright things
     **  that are a lot weaker than the attacker, have a chance of killing      **  that are a lot weaker than the attacker, have a chance of killing
Line 2156
 
Line 2163
   
 /** adj_attackroll() - adjustments to attacks by various conditions */  /** adj_attackroll() - adjustments to attacks by various conditions */
   
 int adj_attackroll (object *hitter, object *target) {  static int adj_attackroll (object *hitter, object *target) {
   object *attacker = hitter;    object *attacker = hitter;
   int adjust=0;    int adjust=0;
   
Line 2226
 
Line 2233
   
   
 /** determine if the object is an 'aimed' missile */  /** determine if the object is an 'aimed' missile */
 int is_aimed_missile ( object *op) {  static int is_aimed_missile ( object *op) {
   
     /* I broke what used to be one big if into a few nested      /* I broke what used to be one big if into a few nested
      * ones so that figuring out the logic is at least possible.       * ones so that figuring out the logic is at least possible.


Legend:
line(s) removed in v.1.124 
line(s) changed
 line(s) added in v.1.125

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