… | |
… | |
856 | * too long, making it difficult to read. This function deals |
856 | * too long, making it difficult to read. This function deals |
857 | * with describing the monsters & players abilities. It should only |
857 | * with describing the monsters & players abilities. It should only |
858 | * be called with monster & player objects. Returns a description |
858 | * be called with monster & player objects. Returns a description |
859 | * in a static buffer. |
859 | * in a static buffer. |
860 | */ |
860 | */ |
861 | |
|
|
862 | static char * |
861 | static char * |
863 | describe_monster (const object *op) |
862 | describe_monster (const object *op) |
864 | { |
863 | { |
865 | char buf[MAX_BUF]; |
864 | char buf[MAX_BUF]; |
866 | static char retbuf[VERY_BIG_BUF]; |
865 | static char retbuf[VERY_BIG_BUF]; |
… | |
… | |
992 | for (tmp = op->inv; tmp != NULL; tmp = tmp->below) |
991 | for (tmp = op->inv; tmp != NULL; tmp = tmp->below) |
993 | if (tmp->type == SKILL && !strcmp (tmp->name, "clawing")) |
992 | if (tmp->type == SKILL && !strcmp (tmp->name, "clawing")) |
994 | break; |
993 | break; |
995 | |
994 | |
996 | if (tmp && tmp->attacktype != 0) |
995 | if (tmp && tmp->attacktype != 0) |
997 | { |
|
|
998 | DESCRIBE_ABILITY (retbuf, tmp->attacktype, "Claws"); |
996 | { DESCRIBE_ABILITY (retbuf, tmp->attacktype, "Claws") } |
999 | } |
|
|
1000 | else |
997 | else |
1001 | { |
|
|
1002 | DESCRIBE_ABILITY (retbuf, op->attacktype, "Attacks"); |
998 | { DESCRIBE_ABILITY (retbuf, op->attacktype, "Attacks") } |
1003 | } |
|
|
1004 | } |
999 | } |
1005 | else |
1000 | else |
1006 | { |
|
|
1007 | DESCRIBE_ABILITY (retbuf, op->attacktype, "Attacks"); |
1001 | { DESCRIBE_ABILITY (retbuf, op->attacktype, "Attacks") } |
1008 | } |
1002 | |
1009 | DESCRIBE_PATH (retbuf, op->path_attuned, "Attuned"); |
1003 | DESCRIBE_PATH (retbuf, op->path_attuned, "Attuned"); |
1010 | DESCRIBE_PATH (retbuf, op->path_repelled, "Repelled"); |
1004 | DESCRIBE_PATH (retbuf, op->path_repelled, "Repelled"); |
1011 | DESCRIBE_PATH (retbuf, op->path_denied, "Denied"); |
1005 | DESCRIBE_PATH (retbuf, op->path_denied, "Denied"); |
|
|
1006 | |
1012 | for (i = 0; i < NROFATTACKS; i++) |
1007 | for (i = 0; i < NROFATTACKS; i++) |
1013 | { |
|
|
1014 | if (op->resist[i]) |
1008 | if (op->resist[i]) |
1015 | { |
1009 | { |
1016 | sprintf (buf, "(%s %+d)", resist_plus[i], op->resist[i]); |
1010 | sprintf (buf, "(%s %+d)", resist_plus[i], op->resist[i]); |
1017 | strcat (retbuf, buf); |
1011 | strcat (retbuf, buf); |
1018 | } |
1012 | } |
1019 | } |
1013 | |
1020 | return retbuf; |
1014 | return retbuf; |
1021 | } |
1015 | } |
1022 | |
1016 | |
1023 | |
1017 | |
1024 | /* |
1018 | /* |