version 1.10 | | version 1.11 |
---|
| | |
/* | | /* |
* static char *rcsid_swamp_c = | | * static char *rcsid_swamp_c = |
* "$Id: swamp.c,v 1.10 2006/02/15 07:51:09 mwedel Exp $"; | | * "$Id: swamp.c,v 1.11 2006/04/04 23:34:43 qal21 Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
void walk_on_deep_swamp (object *op, object *victim) | | void walk_on_deep_swamp (object *op, object *victim) |
{ | | { |
if (victim->type == PLAYER && victim->stats.hp >= 0 && !(victim->move_type & MOVE_FLYING)) { | | if (victim->type == PLAYER && victim->stats.hp >= 0 && !(victim->move_type & MOVE_FLYING)) { |
new_draw_info (NDI_UNIQUE, 0, victim, "You are down to your knees in the swamp."); | | new_draw_info_format(NDI_UNIQUE, 0, victim, "You are down to your knees in the %s.", op->name); |
op->stats.food = 1; | | op->stats.food = 1; |
victim->speed_left -= op->move_slow_penalty; | | victim->speed_left -= op->move_slow_penalty; |
} | | } |
| | |
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, | | new_draw_info_format(NDI_UNIQUE, 0,above, |
"You are down to your waist in the wet swamp."); | | "You are down to your waist in the wet %s.", op->name); |
op->stats.food = 2; | | op->stats.food = 2; |
above->speed_left -= op->move_slow_penalty; | | above->speed_left -= op->move_slow_penalty; |
} | | } |
| | |
| | |
case 2: | | case 2: |
if (rndm(0, 2) == 0) { | | if (rndm(0, 2) == 0) { |
new_draw_info(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 swamp."); | | "You are down to your NECK in the dangerous %s.", op->name); |
op->stats.food = 3; | | op->stats.food = 3; |
strcpy(above->contr->killer,"drowning in a swamp"); | | 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; |
} | | } |
| | |
if (!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 %s.",above->name, op->name); |
strcpy(above->contr->killer,"drowning in a swamp"); | | 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 { | | else { |
op->stats.food = 2; | | op->stats.food = 2; |
new_draw_info(NDI_UNIQUE, 0,above, | | new_draw_info_format(NDI_UNIQUE, 0,above, |
"You almost drowned in the swamp! You survived due to your woodsman skill."); | | "You almost drowned in the %s! You survived due to your woodsman skill.", op->name); |
} | | } |
} | | } |
break; | | break; |