bow:: geometric crossbow can now hit monsters on the edge of vision

This commit is contained in:
Zeno Rogue 2023-12-27 10:50:01 +01:00
parent dbc51d2f94
commit c5a4cc2255
1 changed files with 4 additions and 1 deletions

View File

@ -190,7 +190,10 @@ EX vector<int> create_dirseq_geometric() {
if(GDIM == 3) y = hypot(U0[1], U0[2]); else y = abs(U0[1]) + (U0[1] > 0 ? 1e-6 : 0);
if(y < best_y) { best_y = y; best_i = i; }
}
if(best_i < 0) break;
if(best_i < 0) {
dirseq.push_back(NODIR);
break;
}
at = at + best_i;
int bonus = bolt_score(at + wstep);
best_score_res += bonus;