… | |
… | |
99 | {POTION, "potion", "potions", SK_ALCHEMY, 0}, |
99 | {POTION, "potion", "potions", SK_ALCHEMY, 0}, |
100 | {FOOD, "food", "food", SK_WOODSMAN, 0}, |
100 | {FOOD, "food", "food", SK_WOODSMAN, 0}, |
101 | {POISON, "poison", "poisons", SK_ALCHEMY, 0}, |
101 | {POISON, "poison", "poisons", SK_ALCHEMY, 0}, |
102 | {BOOK, "book", "books", SK_LITERACY, 0}, |
102 | {BOOK, "book", "books", SK_LITERACY, 0}, |
103 | {CLOCK, "clock", "clocks", 0, 0}, |
103 | {CLOCK, "clock", "clocks", 0, 0}, |
104 | {LIGHTNING, "lightning", "lightning", 0, 0}, |
|
|
105 | {ARROW, "arrow", "arrows", SK_BOWYER, 0}, |
104 | {ARROW, "arrow", "arrows", SK_BOWYER, 0}, |
106 | {BOW, "bow", "bows", SK_BOWYER, 0}, |
105 | {BOW, "bow", "bows", SK_BOWYER, 0}, |
107 | {WEAPON, "weapon", "weapons", SK_SMITHERY, 0}, |
106 | {WEAPON, "weapon", "weapons", SK_SMITHERY, 0}, |
108 | {ARMOUR, "armour", "armour", SK_SMITHERY, 0}, |
107 | {ARMOUR, "armour", "armour", SK_SMITHERY, 0}, |
109 | {PEDESTAL, "pedestal", "pedestals", 0, 0}, |
108 | {PEDESTAL, "pedestal", "pedestals", 0, 0}, |
… | |
… | |
129 | {AMULET, "amulet", "amulets", SK_JEWELER, 0}, |
128 | {AMULET, "amulet", "amulets", SK_JEWELER, 0}, |
130 | {PLAYERMOVER, "player mover", "player movers", 0, 0}, |
129 | {PLAYERMOVER, "player mover", "player movers", 0, 0}, |
131 | {TELEPORTER, "teleporter", "teleporters", 0, 0}, |
130 | {TELEPORTER, "teleporter", "teleporters", 0, 0}, |
132 | {CREATOR, "creator", "creators", 0, 0}, |
131 | {CREATOR, "creator", "creators", 0, 0}, |
133 | {SKILL, "skill", "skills", 0, 0}, |
132 | {SKILL, "skill", "skills", 0, 0}, |
134 | {EXPERIENCE, "experience", "experience", 0, 0}, |
|
|
135 | {EARTHWALL, "earthwall", "earthwalls", 0, 0}, |
133 | {EARTHWALL, "earthwall", "earthwalls", 0, 0}, |
136 | {GOLEM, "golem", "golems", 0, 0}, |
134 | {GOLEM, "golem", "golems", 0, 0}, |
137 | {THROWN_OBJ, "projectile", "projectiles", 0, 0}, |
135 | {THROWN_OBJ, "projectile", "projectiles", 0, 0}, |
138 | {BLINDNESS, "blindness", "blindness", 0, 0}, |
136 | {BLINDNESS, "blindness", "blindness", 0, 0}, |
139 | {GOD, "god", "gods", 0, 0}, |
137 | {GOD, "god", "gods", 0, 0}, |
… | |
… | |
668 | |
666 | |
669 | use_buf++; |
667 | use_buf++; |
670 | use_buf %= 5; |
668 | use_buf %= 5; |
671 | |
669 | |
672 | #ifdef NEW_MATERIAL_CODE |
670 | #ifdef NEW_MATERIAL_CODE |
673 | if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) |
671 | if ((op->is_armor () || op->is_weapon ()) && op->materialname) |
674 | { |
672 | { |
675 | mt = name_to_material (op->materialname); |
673 | mt = name_to_material (op->materialname); |
676 | if (mt) |
674 | if (mt) |
677 | { |
675 | { |
678 | safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF); |
676 | safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF); |
… | |
… | |
775 | return "(null)"; |
773 | return "(null)"; |
776 | |
774 | |
777 | if (!op->nrof && !op->weight && !op->title && !is_magical (op)) |
775 | if (!op->nrof && !op->weight && !op->title && !is_magical (op)) |
778 | return op->name; /* To speed things up (or make things slower?) */ |
776 | return op->name; /* To speed things up (or make things slower?) */ |
779 | |
777 | |
780 | if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) |
778 | if ((op->is_armor () || op->is_weapon ()) && op->materialname) |
781 | mt = name_to_material (op->materialname); |
779 | mt = name_to_material (op->materialname); |
782 | |
780 | |
783 | #ifdef NEW_MATERIAL_CODE |
781 | #ifdef NEW_MATERIAL_CODE |
784 | if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname && mt && |
782 | if ((op->is_armor () || op->is_weapon ()) && op->materialname && mt && |
785 | op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL)) |
783 | op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL)) |
786 | { |
784 | { |
787 | strcpy (buf, mt->description); |
785 | strcpy (buf, mt->description); |
788 | len = strlen (buf); |
786 | len = strlen (buf); |
789 | safe_strcat (buf, " ", &len, MAX_BUF); |
787 | safe_strcat (buf, " ", &len, MAX_BUF); |
… | |
… | |
1502 | LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name); |
1500 | LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name); |
1503 | #endif |
1501 | #endif |
1504 | return 0; |
1502 | return 0; |
1505 | } |
1503 | } |
1506 | |
1504 | |
1507 | |
|
|
1508 | /* |
1505 | /* |
1509 | * Supposed to fix face-values as well here, but later. |
1506 | * Supposed to fix face-values as well here, but later. |
1510 | */ |
1507 | */ |
1511 | |
|
|
1512 | void |
1508 | void |
1513 | identify (object *op) |
1509 | identify (object *op) |
1514 | { |
1510 | { |
1515 | object *pl; |
1511 | object *pl; |
1516 | |
1512 | |
… | |
… | |
1538 | /* If the object is on a map, make sure we update its face */ |
1534 | /* If the object is on a map, make sure we update its face */ |
1539 | if (op->map) |
1535 | if (op->map) |
1540 | update_object (op, UP_OBJ_FACE); |
1536 | update_object (op, UP_OBJ_FACE); |
1541 | else |
1537 | else |
1542 | { |
1538 | { |
1543 | pl = is_player_inv (op->env); |
1539 | pl = op->in_player (); |
1544 | if (pl) |
1540 | if (pl) |
1545 | /* A lot of the values can change from an update - might as well send |
1541 | /* A lot of the values can change from an update - might as well send |
1546 | * it all. |
1542 | * it all. |
1547 | */ |
1543 | */ |
1548 | esrv_send_item (pl, op); |
1544 | esrv_send_item (pl, op); |
1549 | } |
1545 | } |
1550 | } |
1546 | } |
|
|
1547 | |