1 /* the nethack cyborg! */
2 /* by proudft@ccnet.com */
12 char borg_line
[80] = {0};
15 void adjust_hp_list(void) {
16 static int hp_list
[HP_TRACK
] = {0};
19 for (l
=0;l
<HP_TRACK
-1;l
++) {
20 hp_list
[l
+1] = hp_list
[l
];
24 /* for (l=0;l<HP_TREND;l++) {
25 hp_diff += (hp_list[l] - u.uhpmax);
28 predicted_hp = u.uhp - hp_diff;*/
29 predicted_hp
= u
.uhp
- ((hp_list
[0] - u
.uhpmax
)*2);
32 char borg_input(void) {
35 delay_output(); // 150ms delay
39 if (predicted_hp
<= 0 || (u
.uhp
< u
.uhpmax
/ 8)) pline("Emergency!");
41 /* He's quite lame for now... */
43 if (c
== '5') c
= '.';
44 sprintf(borg_line
,"%c",c
);