Code:
struct object *obj;
Code:
/* Analyze equipment */ for (i = 0; i < p->body.count; i++) { int index = 0; struct object *obj = slot_object(p, i); struct curse_data *curse = obj ? obj->curses : NULL; while (obj) {
Code:
/* Apply combat bonuses */ state->ac += obj->ac; if (!known_only || obj->known->to_a) state->to_a += obj->to_a; if (!slot_type_is(p, i, EQUIP_WEAPON) && !slot_type_is(p, i, EQUIP_BOW)) { if (!known_only || obj->known->to_h) { state->to_h += obj->to_h; } if (!known_only || obj->known->to_d) { state->to_d += obj->to_d; } }
Code:
/* Move to any unprocessed curse object */ if (curse) { index++; obj = NULL; while (index < z_info->curse_max) { if (curse[index].power) { obj = curses[index].obj; break; } else { index++; } } } else { obj = NULL; }
Heaviness curse is a nice idea, BTW, I will probably steal it back from you

Leave a comment: