| 1 |
Description: Fix typos in the borg code |
| 2 |
Author: Chris Carr <[email protected]> |
| 3 |
Forwarded: not yet |
| 4 |
Last-Update: 2023-09-17 |
| 5 |
--- a/src/borg/borg1.c |
| 6 |
+++ b/src/borg/borg1.c |
| 7 |
@@ -470,7 +470,7 @@ |
| 8 |
int morgy_panel_x; |
| 9 |
|
| 10 |
int borg_target_y; |
| 11 |
|
| 12 |
+int borg_target_x; /* Current targeted location */ |
| 13 |
|
| 14 |
int c_x; /* Current location (X) */ |
| 15 |
int c_y; /* Current location (Y) */ |
| 16 |
--- a/src/borg/borg1.h |
| 17 |
+++ b/src/borg/borg1.h |
| 18 |
@@ -1362,7 +1362,7 @@ |
| 19 |
extern int morgy_panel_x; |
| 20 |
|
| 21 |
extern int borg_target_y; |
| 22 |
|
| 23 |
+extern int borg_target_x; /* Current targeted location */ |
| 24 |
|
| 25 |
extern int c_x; /* Current location (X) */ |
| 26 |
extern int c_y; /* Current location (Y) */ |
| 27 |
--- a/src/borg/borg3.c |
| 28 |
+++ b/src/borg/borg3.c |
| 29 |
@@ -2850,7 +2850,7 @@ |
| 30 |
const struct class_spell* cspell = spell_by_index(player, spell_num); |
| 31 |
if (strcmp(cspell->name, borg_spell_ratings[spell_num].name)) |
| 32 |
{ |
| 33 |
|
| 34 |
+ borg_note(format("**STARTUP FAILURE** spell definition mismatch. <%s> not the same as <%s>", cspell->name, borg_spell_ratings[spell_num].name)); |
| 35 |
borg_init_failure = true; |
| 36 |
return; |
| 37 |
} |
| 38 |
--- a/src/borg/borg6.c |
| 39 |
+++ b/src/borg/borg6.c |
| 40 |
@@ -3571,7 +3571,7 @@ |
| 41 |
/* Note if ignorig messages */ |
| 42 |
if (borg_dont_react) |
| 43 |
{ |
| 44 |
|
| 45 |
+ borg_note("# Borg ignoring messages."); |
| 46 |
} |
| 47 |
|
| 48 |
/* Look around */ |
| 49 |
@@ -4455,7 +4455,7 @@ |
| 50 |
*/ |
| 51 |
if (k > b_k) continue; |
| 52 |
|
| 53 |
|
| 54 |
+ /* Record the danger of this preferred grid */ |
| 55 |
g_k = k; |
| 56 |
|
| 57 |
/* Check the freedom there */ |
| 58 |
@@ -5226,7 +5226,7 @@ |
| 59 |
struct monster_race* r_ptr; |
| 60 |
borg_kill* kill; |
| 61 |
|
| 62 |
|
| 63 |
+ borg_note(format("# Perhaps wall near targeted location (%d,%d)", y, x)); |
| 64 |
|
| 65 |
/* Determine "path" */ |
| 66 |
n_x = c_x; |
| 67 |
@@ -6277,7 +6277,7 @@ |
| 68 |
/* Bounds Check */ |
| 69 |
if (dist && !square_in_bounds_fully(cave, loc(x, y))) break; |
| 70 |
|
| 71 |
|
| 72 |
+ /* Get the grid of the targeted monster */ |
| 73 |
ag = &borg_grids[y2][x2]; |
| 74 |
kill = &borg_kills[ag->kill]; |
| 75 |
r_ptr = &r_info[kill->r_idx]; |
| 76 |
--- a/src/borg/borg8.c |
| 77 |
+++ b/src/borg/borg8.c |
| 78 |
@@ -2768,7 +2768,7 @@ |
| 79 |
if (shop_num != goal_shop) |
| 80 |
borg_note(format("# Currently in store '%d' would prefer '%d'.", shop_num + 1, goal_shop + 1)); |
| 81 |
else |
| 82 |
|
| 83 |
+ borg_note(format("# Currently in preferred store '%d'.", goal_shop + 1)); |
| 84 |
|
| 85 |
|
| 86 |
/* Try to sell stuff */ |
| 87 |
--- a/src/borg/borg9.c |
| 88 |
+++ b/src/borg/borg9.c |
| 89 |
@@ -851,7 +851,7 @@ |
| 90 |
/* Flush our key-buffer */ |
| 91 |
borg_flush(); |
| 92 |
|
| 93 |
|
| 94 |
+ /* If we were casting a targeted spell and failed */ |
| 95 |
/* it does not mean we can't target that location */ |
| 96 |
successful_target = 0; |
| 97 |
|
| 98 |
@@ -3762,7 +3762,7 @@ |
| 99 |
depth_num >= z_info->max_depth || |
| 100 |
item_num >= (z_info->k_max + z_info->k_max + z_info->a_max + BI_MAX)) |
| 101 |
{ |
| 102 |
|
| 103 |
+ borg_note("Malformed item requirement in borg.txt: value out of range"); |
| 104 |
return false; |
| 105 |
} |
| 106 |
/* The class 999 is for all classes */ |
| 107 |
@@ -3796,12 +3796,12 @@ |
| 108 |
|
| 109 |
if (-1000 == (class_num = borg_getval(&string, "_CLASS"))) |
| 110 |
{ |
| 111 |
|
| 112 |
+ borg_note("Malformed item requirement in borg.txt"); |
| 113 |
return false; |
| 114 |
} |
| 115 |
if (-1000 == (depth_num = borg_getval(&string, "_DEPTH"))) |
| 116 |
{ |
| 117 |
|
| 118 |
+ borg_note("Malformed item requirement in borg.txt"); |
| 119 |
return false; |
| 120 |
} |
| 121 |
if (-1000 != (item_num = borg_getval(&string, "_FORMULA"))) |
| 122 |
@@ -3839,7 +3839,7 @@ |
| 123 |
return add_required_item(class_num, depth_num, item_num, number_items); |
| 124 |
} |
| 125 |
} |
| 126 |
|
| 127 |
+ borg_note("Malformed item requirement in borg.txt"); |
| 128 |
return false; |
| 129 |
} |
| 130 |
|
| 131 |
@@ -6087,7 +6087,7 @@ |
| 132 |
case 'f': |
| 133 |
case 'F': |
| 134 |
{ |
| 135 |
|
| 136 |
+ msg("Command No Longer Useful"); |
| 137 |
break; |
| 138 |
} |
| 139 |
} |
| 140 |
@@ -6243,7 +6243,7 @@ |
| 141 |
break; |
| 142 |
} |
| 143 |
|
| 144 |
|
| 145 |
+ /* Display Feature of a targeted grid */ |
| 146 |
case 'G': |
| 147 |
{ |
| 148 |
int y = 1; |
| 149 |
@@ -6333,7 +6333,7 @@ |
| 150 |
} |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
+ /* Display Info of a targeted grid */ |
| 155 |
case 'I': |
| 156 |
{ |
| 157 |
int i; |