int building_owner(int where) { assert(loc_depth(where) == LOC_build); return first_character(where); }
char * display_owner(int who) { if (first_character(who) <= 0) return ""; return ", owner:"; }
static int province_owner(int where) { int prov = province(where); int city; int castle; city = city_here(prov); castle = subloc_here(prov, sub_castle); if (castle == 0 && city) castle = subloc_here(city, sub_castle); if (castle) return first_character(castle); return 0; }
static char * liner_desc_loc(int n) { char buf[LEN]; sprintf(buf, "%s%s%s", box_name_kind(n), safe_haven_s(n), incomplete_string(n)); if (loc_depth(n) == LOC_province && rp_loc(n) && province_admin(n)) { if (rp_loc(n)->control.nobles) { strcat(buf, sout(", entrance fee %s per noble", gold_s(rp_loc(n)->control.nobles))); }; if (rp_loc(n)->control.weight) { strcat(buf, sout(", entrance fee %s per 1000 weight", gold_s(rp_loc(n)->control.weight))); }; if (rp_loc(n)->control.men) { strcat(buf, sout(", entrance fee %s per 100 men", gold_s(rp_loc(n)->control.men))); }; }; if (rp_subloc(n) && first_character(n)) { if (rp_subloc(n)->control.nobles) { strcat(buf, sout(", entrance fee %s per noble", gold_s(rp_subloc(n)->control.nobles))); }; if (rp_subloc(n)->control.weight) { strcat(buf, sout(", entrance fee %s per 1000 weight", gold_s(rp_subloc(n)->control.weight))); }; if (rp_subloc(n)->control.men) { strcat(buf, sout(", entrance fee %s per 100 men", gold_s(rp_subloc(n)->control.men))); }; }; if (loc_depth(n) == LOC_province && rp_loc(n) && province_admin(n)) { if (rp_loc(n)->control.closed) { strcat(buf, sout(", border closed")); }; }; if (rp_subloc(n) && first_character(n)) { if (rp_subloc(n)->control.closed) { strcat(buf, sout(", closed")); }; }; if (entrance_size(n)) { strcat(buf, sout(", entrance size: %d", entrance_size(n))); }; if (loc_depth(n) == LOC_build) { if (loc_defense(n)) strcat(buf, sout(", defense~%d", loc_defense(n))); if (get_effect(n, ef_improve_fort, 0, 0)) strcat(buf, sout(", magical defense~%d", get_effect(n, ef_improve_fort, 0, 0))); if (loc_moat(n)) strcat(buf, ", with moat"); if (loc_damage(n)) strcat(buf, sout(", %d%%~damaged", (100 * loc_damage(n)) / loc_hp(n))); } if (show_display_string) { char *s = banner(n); if (s && *s) strcat(buf, sout(", \"%s\"", s)); } if (loc_hidden(n)) strcat(buf, ", hidden"); if (subkind(n) == sub_mine_shaft) { struct entity_mine *mi = get_mine_info(n); if (mine_depth(n)) strcat(buf, sout(", depth~%d feet", (mine_depth(n) * 100) + 100)); if (mi) switch (mi->shoring[mine_depth(n)]) { case WOODEN_SHORING: strcat(buf, sout(", wooden shoring")); break; case IRON_SHORING: strcat(buf, sout(", iron shoring")); break; case NO_SHORING: default: strcat(buf, sout(", no shoring")); break; }; }; if (loc_depth(n) == LOC_subloc) { if (subkind(n) == sub_hades_pit) strcat(buf, ", 28 days"); else if (subkind(n) != sub_mine_shaft && subkind(n) != sub_mine_shaft_notdone) strcat(buf, ", 1 day"); } return sout("%s", buf); }