Skip to content

Commit

Permalink
fixed tide/lava help counters
Browse files Browse the repository at this point in the history
  • Loading branch information
zenorogue committed Feb 24, 2024
1 parent f291bbb commit fa9c2da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,9 @@ EX void describeMouseover() {
out += " (" + its(c->landparam)+")";
else {
calcTidalPhase();
bool b = c->landparam >= tide[(turncount-1) % tidalsize];
bool b = c->landparam >= tide[turncount % tidalsize];
int t = 1;
for(; t < 1000 && b == (c->landparam >= tide[(turncount+t-1) % tidalsize]); t++) ;
for(; t < 1000 && b == (c->landparam >= tide[(turncount+t) % tidalsize]); t++) ;
if(b)
out += " (" + turnstring(t) + XLAT(" to surface") + ")";
else
Expand All @@ -894,7 +894,7 @@ EX void describeMouseover() {
}
#if CAP_FIELD
else if(c->land == laVolcano) {
int id = lavatide(c, -1)/4;
int id = lavatide(c, 0)/4;
if(id < 96/4)
out += " (" + turnstring(96/4-id) + XLAT(" to go cold") + ")";
else
Expand Down

0 comments on commit fa9c2da

Please sign in to comment.