-
- /* Acquire standard fields */
- o_ptr->ac = k_ptr->ac;
- o_ptr->dd = k_ptr->dd;
- o_ptr->ds = k_ptr->ds;
-
- /* Acquire standard weight */
- o_ptr->weight = k_ptr->weight;
-
- /* Hack -- extract the "broken" flag */
- if (!o_ptr->pval < 0) o_ptr->ident |= (IDENT_BROKEN);
-
- /* Artifacts */
- if (o_ptr->name1)
- {
- artifact_type *a_ptr;
-
- /* Obtain the artifact info */
- a_ptr = &a_info[o_ptr->name1];
-
- /* Acquire new artifact "pval" */
- o_ptr->pval = a_ptr->pval;
-
- /* Acquire new artifact fields */
- o_ptr->ac = a_ptr->ac;
- o_ptr->dd = a_ptr->dd;
- o_ptr->ds = a_ptr->ds;
-
- /* Acquire new artifact weight */
- o_ptr->weight = a_ptr->weight;
-
- /* Hack -- extract the "broken" flag */
- if (!a_ptr->cost) o_ptr->ident |= (IDENT_BROKEN);
- }
-
- /* Ego items */
- if (o_ptr->name2)
- {
- ego_item_type *e_ptr;
-
- /* Obtain the ego-item info */
- e_ptr = &e_info[o_ptr->name2];
-
- o_ptr->dd = old_dd;
- o_ptr->ds = old_ds;
-
- if (o_ptr->name2 == EGO_DWARVEN)
- {
- o_ptr->ac += 5;
- o_ptr->weight = (2 * k_info[o_ptr->k_idx].weight / 3);
- }
-
- /* Hack -- extract the "broken" flag */
- if (!e_ptr->cost) o_ptr->ident |= (IDENT_BROKEN);
- }
-
- if (o_ptr->art_name) /* A random artifact */
- {
- o_ptr->dd = old_dd;
- o_ptr->ds = old_ds;
- }