… | |
… | |
1570 | if (change->msg) |
1570 | if (change->msg) |
1571 | op->msg = change->msg; |
1571 | op->msg = change->msg; |
1572 | } |
1572 | } |
1573 | |
1573 | |
1574 | static int |
1574 | static int |
1575 | legal_artifact_combination (object *op, artifact * art) |
1575 | legal_artifact_combination (object *op, artifact *art) |
1576 | { |
1576 | { |
1577 | int neg, success = 0; |
1577 | int neg, success = 0; |
1578 | linked_char *tmp; |
1578 | linked_char *tmp; |
1579 | const char *name; |
1579 | const char *name; |
1580 | |
1580 | |
1581 | if (art->allowed == (linked_char *) NULL) |
1581 | if (!art->allowed) |
1582 | return 1; /* Ie, "all" */ |
1582 | return 1; /* Ie, "all" */ |
|
|
1583 | |
1583 | for (tmp = art->allowed; tmp; tmp = tmp->next) |
1584 | for (tmp = art->allowed; tmp; tmp = tmp->next) |
1584 | { |
1585 | { |
1585 | #ifdef TREASURE_VERBOSE |
1586 | #ifdef TREASURE_VERBOSE |
1586 | LOG (llevDebug, "legal_art: %s\n", &tmp->name); |
1587 | LOG (llevDebug, "legal_art: %s\n", &tmp->name); |
1587 | #endif |
1588 | #endif |
… | |
… | |
1598 | * everything is allowed except what we match |
1599 | * everything is allowed except what we match |
1599 | */ |
1600 | */ |
1600 | else if (neg) |
1601 | else if (neg) |
1601 | success = 1; |
1602 | success = 1; |
1602 | } |
1603 | } |
|
|
1604 | |
1603 | return success; |
1605 | return success; |
1604 | } |
1606 | } |
1605 | |
1607 | |
1606 | /* |
1608 | /* |
1607 | * Fixes the given object, giving it the abilities and titles |
1609 | * Fixes the given object, giving it the abilities and titles |