version 1.25 | | version 1.26 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.25 2000/12/15 15:42:36 avogl Exp $"; | | * "$Id: attack.c,v 1.26 2000/12/19 06:54:52 peterm Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
if(RANDOM()%20+1>=material[i].save[number]-op->magic-op->resist[number]/100) | | if(RANDOM()%20+1>=material[i].save[number]-op->magic-op->resist[number]/100) |
saves++; | | saves++; |
/* if the attack is too weak */ | | /* if the attack is too weak */ |
if((20-material[i].save[type])/3 > originator->stats.dam) saves++; | | if((20-material[i].save[number])/3 > originator->stats.dam) saves++; |
} | | } |
} | | } |
if (saves==materials || materials==0) return 1; | | if (saves==materials || materials==0) return 1; |