version 1.3 | | version 1.4 |
---|
| | |
/* | | /* |
* static char *rcsid_egoitem_c = | | * static char *rcsid_egoitem_c = |
* "$Id: egoitem.c,v 1.3 2000/05/26 09:50:49 jec Exp $"; | | * "$Id: egoitem.c,v 1.4 2001/10/14 07:57:14 gros Exp $"; |
*/ | | */ |
| | |
| | |
| | |
#include <sproto.h> | | #include <sproto.h> |
#endif | | #endif |
| | |
| | /* GROS: I put this here, because no other file seemed quite good.*/ |
| | object *create_artifact(object *op, char *artifactname) |
| | { |
| | artifactlist *al; |
| | artifact *art; |
| | char *temptitle; |
| | al = find_artifactlist(op->type); |
| | if (al==NULL) |
| | return NULL; |
| | for (art=al->items; art!=NULL; art=art->next) |
| | { |
| | temptitle = (char *)(malloc(strlen(art->item->name) + 5)); |
| | strcpy(temptitle, " of "); |
| | strcat(temptitle, art->item->name); |
| | if (!strcmp (temptitle, artifactname)) |
| | { |
| | give_artifact_abilities(op, art->item); |
| | } |
| | |
| | free(temptitle); |
| | }; |
| | return NULL; |
| | } |
| | |
| | |
/* peterm: do_power_crystal | | /* peterm: do_power_crystal |