version 1.20 | | version 1.21 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.20 2000/11/08 20:17:41 avogl Exp $"; | | * "$Id: player.c,v 1.21 2000/11/09 07:25:09 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
void move_player_attack(object *op, int dir) | | void move_player_attack(object *op, int dir) |
{ | | { |
object *tmp, *tmp2; | | object *tmp; |
int nx=freearr_x[dir]+op->x,ny=freearr_y[dir]+op->y; | | int nx=freearr_x[dir]+op->x,ny=freearr_y[dir]+op->y; |
| | |
| | |
| | |
} | | } |
| | |
if (lose_this_stat) { | | if (lose_this_stat) { |
| | this_stat = get_attr_value(&(dep->stats), i); |
| | /* We could try to do something clever like find another |
| | * stat to reduce if this fails. But chances are, if |
| | * stats have been depleted to -50, all are pretty low |
| | * and should be roughly the same, so it shouldn't make a |
| | * difference. |
| | */ |
| | if (this_stat>=-50) { |
change_attr_value(&(dep->stats), i, -1); | | change_attr_value(&(dep->stats), i, -1); |
SET_FLAG(dep, FLAG_APPLIED); | | SET_FLAG(dep, FLAG_APPLIED); |
new_draw_info(NDI_UNIQUE, 0,op, lose_msg[i]); | | new_draw_info(NDI_UNIQUE, 0,op, lose_msg[i]); |
| | |
} | | } |
} | | } |
} | | } |
| | } |
/* If no stat lost, tell the player. */ | | /* If no stat lost, tell the player. */ |
if (!lost_a_stat) | | if (!lost_a_stat) |
{ | | { |