version 1.3 | | version 1.4 |
---|
| | |
/* | | /* |
* static char *rcsid_swamp_c = | | * static char *rcsid_swamp_c = |
* "$Id: swamp.c,v 1.3 2000/05/26 09:50:49 jec Exp $"; | | * "$Id: swamp.c,v 1.4 2001/10/15 21:12:08 garbled Exp $"; |
*/ | | */ |
| | |
#include <global.h> | | #include <global.h> |
| | |
} | | } |
switch(op->stats.food) { | | switch(op->stats.food) { |
case 1: | | case 1: |
if (RANDOM()%3 == 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 (RANDOM()%3 == 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, 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"); |
| | |
} | | } |
break; | | break; |
case 3: | | case 3: |
if (RANDOM()%5 == 0) { | | if (rndm(0, 4) == 0) { |
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); |
| | |
break; | | break; |
} | | } |
} else if (!QUERY_FLAG(above, FLAG_ALIVE)) { | | } else if (!QUERY_FLAG(above, FLAG_ALIVE)) { |
if (RANDOM()%3 == 0) decrease_ob(above); | | if (rndm(0, 2) == 0) decrease_ob(above); |
} | | } |
above = nabove; | | above = nabove; |
} | | } |