version 1.32 | | version 1.33 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.32 2001/02/23 21:05:11 avogl Exp $"; | | * "$Id: attack.c,v 1.33 2001/03/12 23:10:15 avogl Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
#endif | | #endif |
| | |
if (magic) { | | if (magic) { |
dam = dam * (100-op->resist[ATNR_MAGIC])/100; | | /* basically: dam = dam*(100-op->resist[attacknum])/100; |
/* Don't do this - many attacktype are effects that don't | | * in case 0>dam>1, we try to "simulate" a float value-effect */ |
* do damage, like deathstrike & confusion. | | dam = dam*(100-op->resist[ATNR_MAGIC]); |
*/ | | if (dam >= 100) |
/* if (dam == 0) return 0;*/ | | dam /= 100; |
| | else |
| | dam = (dam > (RANDOM()%100)) ? 1 : 0; |
} | | } |
| | |
/* AT_CHAOS here is a weapon or monster. Spells are handled by hit_map | | /* AT_CHAOS here is a weapon or monster. Spells are handled by hit_map |