version 1.51 | | version 1.52 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.51 2001/10/31 10:21:09 garbled Exp $"; | | * "$Id: attack.c,v 1.52 2001/11/01 06:29:29 garbled Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
sprintf(buf1, "missed %s", op->name); | | sprintf(buf1, "missed %s", op->name); |
sprintf(buf2, " misses"); | | sprintf(buf2, " misses"); |
found++; | | found++; |
| | } else if ((hitter->type == DISEASE || hitter->type == SYMPTOM || |
| | (type & AT_POISON && IS_LIVE(op)) && !found) { |
| | for (i=0; i < MAXATTACKMESS && attack_mess[ATM_SUFFER][i].level != -1; |
| | i++) |
| | if (dam < attack_mess[ATM_SUFFER][i].level) { |
| | sprintf(buf1, "%s %s%s", attack_mess[ATM_SUFFER][i].buf1, |
| | op->name, attack_mess[ATM_SUFFER][i].buf2); |
| | sprintf(buf2, "%s", attack_mess[ATM_SUFFER][i].buf3); |
| | found++; |
| | break; |
| | } |
} else if (op->type == DOOR && !found) { | | } else if (op->type == DOOR && !found) { |
for (i=0; i < MAXATTACKMESS && attack_mess[ATM_DOOR][i].level != -1; | | for (i=0; i < MAXATTACKMESS && attack_mess[ATM_DOOR][i].level != -1; |
i++) | | i++) |
| | |
(get_owner(hitter) != NULL && hitter->owner->type == PLAYER))) | | (get_owner(hitter) != NULL && hitter->owner->type == PLAYER))) |
return; | | return; |
| | |
/* we have no good messages for godpower, and they are usually diseases. | | /* scale down magic considerably. */ |
in addition, scale down magic considerably. */ | | if (type & AT_MAGIC && rndm(0, 5) |
if ((type & AT_MAGIC && rndm(0, 5)) || type & AT_GODPOWER) | | |
return; | | return; |
| | |
/* Did a player hurt another player? Inform both! */ | | /* Did a player hurt another player? Inform both! */ |