Difference for server/swamp.c from version 1.5 to 1.6


version 1.5 version 1.6
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_swamp_c =   * static char *rcsid_swamp_c =
  *   "$Id: swamp.c,v 1.5 2002/02/08 20:19:37 avogl Exp $";   *   "$Id: swamp.c,v 1.6 2003/09/13 05:02:13 mwedel Exp $";
  */   */
   
 #include <global.h>  #include <global.h>
Line 27
 
Line 27
   
   while(above) {    while(above) {
     nabove = above->above;      nabove = above->above;
     if (above->type == PLAYER &&    if (above->type == PLAYER && !QUERY_FLAG(above, FLAG_FLYING) && above->stats.hp >= 0) {
  !QUERY_FLAG(above, FLAG_FLYING) &&  
  above->stats.hp >= 0) {  
   
       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) {        switch(op->stats.food) {
  case 1:   case 1:
    if (rndm(0, 2) == 0) {     if (rndm(0, 2) == 0) {
      new_draw_info(NDI_UNIQUE, 0,above, "You are down to your waist in the wet swamp.");   new_draw_info(NDI_UNIQUE, 0,above,
          "You are down to your waist in the wet swamp.");
      op->stats.food = 2;       op->stats.food = 2;
      above->speed_left -= SLOW_PENALTY(op);       above->speed_left -= SLOW_PENALTY(op);
    }     }
    break;     break;
   
  case 2:   case 2:
    if (rndm(0, 2) == 0) {     if (rndm(0, 2) == 0) {
      new_draw_info(NDI_UNIQUE, 0,above, "You are down to your NECK in the dangerous swamp.");   new_draw_info(NDI_UNIQUE | NDI_RED, 0,above,
          "You are down to your NECK in the dangerous swamp.");
      op->stats.food = 3;       op->stats.food = 3;
      strcpy(above->contr->killer,"drowning in a swamp");       strcpy(above->contr->killer,"drowning in a swamp");
      above->stats.hp--;       above->stats.hp--;
      above->speed_left -= SLOW_PENALTY(op);       above->speed_left -= SLOW_PENALTY(op);
    }     }
    break;     break;
   
  case 3:   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 */       /* player is ready to drown - only woodsman skill can save him */
      if (rndm(0, 4) == 0 || !change_skill(above, lookup_skill_by_name("woodsman"))) {   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 swamp.",above->name);   "%s disappeared into a swamp.",above->name);
Line 67
 
Line 71
      }       }
      else {       else {
        op->stats.food = 2;         op->stats.food = 2;
        new_draw_info(NDI_UNIQUE, 0,above, "You almost drowned in the swamp! You");       new_draw_info(NDI_UNIQUE, 0,above,
        new_draw_info(NDI_UNIQUE, 0,above, "survived due to your woodsman skill.");     "You almost drowned in the swamp! You survived due to your woodsman skill.");
      }       }
    }     }
  break;   break;


Legend:
line(s) removed in v.1.5 
line(s) changed
 line(s) added in v.1.6

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