version 1.154 | | version 1.155 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.154 2004/12/29 08:45:08 mwedel Exp $"; | | * "$Id: player.c,v 1.155 2005/01/12 08:04:01 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
betterby = (arrow->magic + arrow->stats.dam) * 2; | | betterby = (arrow->magic + arrow->stats.dam) * 2; |
} | | } |
} else { | | } else { |
for (attacknum=0; attacknum < NROFATTACKS; | | for (attacknum=0; attacknum < NROFATTACKS; attacknum++) { |
attacknum++, attacktype = 1<<attacknum) | | attacktype = 1<<attacknum; |
if (arrow->attacktype & attacktype) | | if ((arrow->attacktype & attacktype) && (target->arch->clone.resist[attacknum]) < 0) |
if (target->arch->clone.resist[attacknum] < 0) | | |
if (((arrow->magic + arrow->stats.dam)*(100-target->arch->clone.resist[attacknum])/100) > betterby) { | | if (((arrow->magic + arrow->stats.dam)*(100-target->arch->clone.resist[attacknum])/100) > betterby) { |
tmp = arrow; | | tmp = arrow; |
betterby = (arrow->magic + arrow->stats.dam)*(100-target->arch->clone.resist[attacknum])/100; | | betterby = (arrow->magic + arrow->stats.dam)*(100-target->arch->clone.resist[attacknum])/100; |
} | | } |
| | } |
if ((2 + arrow->magic + arrow->stats.dam) > betterby) { | | if ((2 + arrow->magic + arrow->stats.dam) > betterby) { |
tmp = arrow; | | tmp = arrow; |
betterby = 2 + arrow->magic + arrow->stats.dam; | | betterby = 2 + arrow->magic + arrow->stats.dam; |
| | |
| | |
/*add_exp(op, (op->stats.exp * -0.20)); */ | | /*add_exp(op, (op->stats.exp * -0.20)); */ |
apply_death_exp_penalty(op); | | apply_death_exp_penalty(op); |
if(op->stats.food < 0) op->stats.food = 900; | | if(op->stats.food < 100) op->stats.food = 900; |
op->stats.hp = op->stats.maxhp; | | op->stats.hp = op->stats.maxhp; |
| | op->stats.sp = MAX(op->stats.sp, op->stats.maxsp); |
| | op->stats.grace = MAX(op->stats.grace, op->stats.maxgrace); |
| | |
/* | | /* |
* Check to see if the player is in a shop. IF so, then check to see if | | * Check to see if the player is in a shop. IF so, then check to see if |