1 diff -urd nethack-3.4.3/src/botl.c nh343hpm/src/botl.c
2 --- nethack-3.4.3/src/botl.c 2003-12-08 01:39:13.000000000 +0200
3 +++ nh343hpm/src/botl.c 2004-07-13 17:19:08.163414760 +0300
5 /* NetHack may be freely redistributed. See license for details. */
8 +#if defined(HPMON) && defined(TEXTCOLOR)
15 extern const char *hu_stat[]; /* defined in eat.c */
21 + int hpcolor, hpattr;
23 int cap = near_capacity();
25 hp = Upolyd ? u.mh : u.uhp;
28 (void) describe_level(newbot2);
29 Sprintf(nb = eos(newbot2),
31 + "%c:%-2ld HP:", oc_syms[COIN_CLASS],
39 "%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", oc_syms[COIN_CLASS],
45 hp, hpmax, u.uen, u.uenmax, u.uac);
48 + curs(WIN_STATUS, 1, 1);
49 + putstr(WIN_STATUS, 0, newbot2);
51 + Sprintf(nb = eos(newbot2), "%d(%d)", hp, hpmax);
53 + if (iflags.use_color) {
54 + curs(WIN_STATUS, 1, 1);
58 + } else if(hp > (hpmax*2/3)) {
59 + hpcolor = CLR_GREEN;
60 + } else if(hp <= (hpmax/3)) {
65 + hpcolor = CLR_YELLOW;
67 + if (hpcolor != NO_COLOR)
68 + term_start_color(hpcolor);
69 + if(hpattr!=ATR_NONE)term_start_attr(hpattr);
70 + putstr(WIN_STATUS, hpattr, newbot2);
71 + if(hpattr!=ATR_NONE)term_end_attr(hpattr);
72 + if (hpcolor != NO_COLOR)
75 +#endif /* TEXTCOLOR */
76 + Sprintf(nb = eos(newbot2), " Pw:%d(%d) AC:%-2d",
77 + u.uen, u.uenmax, u.uac);
81 Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel);