Difference for server/swamp.c from version 1.11 to 1.12


version 1.11 version 1.12
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_swamp_c =   * static char *rcsid_swamp_c =
  *   "$Id: swamp.c,v 1.11 2006/04/04 23:34:43 qal21 Exp $";   *   "$Id: swamp.c,v 1.12 2006/09/02 15:23:58 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 48
 
Line 48
 {  {
     object *above = op->above;      object *above = op->above;
     object *nabove;      object *nabove;
       int got_player = 0;
   
     while(above) {      while(above) {
  nabove = above->above;   nabove = above->above;
  if (above->type == PLAYER && !(above->move_type & MOVE_FLYING) && above->stats.hp >= 0 && !QUERY_FLAG(above,FLAG_WIZ)) {   if (above->type == PLAYER && !(above->move_type & MOVE_FLYING) && above->stats.hp >= 0 && !QUERY_FLAG(above,FLAG_WIZ)) {
               object *woodsman = find_obj_by_type_subtype(above, SKILL, SK_WOODSMAN);
               got_player = 1;
      if (op->stats.food < 1) {       if (op->stats.food < 1) {
  LOG (llevDebug, "move_deep_swamp(): player is here, but state is "                  LOG (llevDebug, "move_deep_swamp(): player is here, but state is %d\n", op->stats.food);
       "%d\n", op->stats.food);  
  op->stats.food = 1;   op->stats.food = 1;
      }       }
   
      switch(op->stats.food) {              if ( op->stats.food < 10 ) {
  case 1:  
      if (rndm(0, 2) == 0) {       if (rndm(0, 2) == 0) {
  new_draw_info_format(NDI_UNIQUE, 0,above,                       new_draw_info_format(NDI_UNIQUE, 0,above, "You are down to your waist in the wet %s.", op->name);
        "You are down to your waist in the wet %s.", op->name);                      op->stats.food = woodsman ? op->stats.food + 1 : 10;
  op->stats.food = 2;  
  above->speed_left -= op->move_slow_penalty;   above->speed_left -= op->move_slow_penalty;
      }       }
      break;              }
               else if ( op->stats.food < 20 ) {
  case 2:  
      if (rndm(0, 2) == 0) {       if (rndm(0, 2) == 0) {
  new_draw_info_format(NDI_UNIQUE | NDI_RED, 0,above,                      new_draw_info_format(NDI_UNIQUE | NDI_RED, 0,above, "You are down to your NECK in the dangerous %s.", op->name);
        "You are down to your NECK in the dangerous %s.", op->name);                      op->stats.food = woodsman ? op->stats.food + 1 : 20;
  op->stats.food = 3;  
  sprintf(above->contr->killer,"drowning in a %s", op->name);   sprintf(above->contr->killer,"drowning in a %s", op->name);
  above->stats.hp--;   above->stats.hp--;
  above->speed_left -= op->move_slow_penalty;   above->speed_left -= op->move_slow_penalty;
      }       }
      break;              }
               else
  case 3:  
      if (rndm(0, 4) == 0) {       if (rndm(0, 4) == 0) {
  object *woodsman = find_obj_by_type_subtype(above, SKILL, SK_WOODSMAN);  
   
  /* player is ready to drown - only woodsman skill can save him */  
  if (!woodsman) {  
      op->stats.food = 0;       op->stats.food = 0;
      new_draw_info_format(NDI_UNIQUE | NDI_ALL, 1, NULL,                      new_draw_info_format(NDI_UNIQUE | NDI_ALL, 1, NULL, "%s disappeared into a %s.",above->name, op->name);
  "%s disappeared into a %s.",above->name, op->name);  
      sprintf(above->contr->killer,"drowning in a %s", op->name);       sprintf(above->contr->killer,"drowning in a %s", op->name);
          
      above->stats.hp = -1;       above->stats.hp = -1;
      kill_player(above); /* player dies in the swamp */       kill_player(above); /* player dies in the swamp */
  }   }
  else {  
      op->stats.food = 2;  
      new_draw_info_format(NDI_UNIQUE, 0,above,   
    "You almost drowned in the %s! You survived due to your woodsman skill.", op->name);  
  }  
      }  
      break;  
      }  
  } else if (!QUERY_FLAG(above, FLAG_ALIVE) && !(above->move_type & MOVE_FLYING) &&    } else if (!QUERY_FLAG(above, FLAG_ALIVE) && !(above->move_type & MOVE_FLYING) &&
     !(QUERY_FLAG(above,FLAG_IS_FLOOR)) && !(QUERY_FLAG(above,FLAG_OVERLAY_FLOOR)) &&      !(QUERY_FLAG(above,FLAG_IS_FLOOR)) && !(QUERY_FLAG(above,FLAG_OVERLAY_FLOOR)) &&
     !(QUERY_FLAG(above, FLAG_NO_PICK))) {      !(QUERY_FLAG(above, FLAG_NO_PICK))) {
Line 108
 
Line 91
  }   }
  above = nabove;   above = nabove;
     }      }
       if ( !got_player )
           op->stats.food = 1;
 }  }


Legend:
line(s) removed in v.1.11 
line(s) changed
 line(s) added in v.1.12

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