Fog of war: unexplored is black, fades ease into it with no stepped rim (t17)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -25,7 +25,8 @@ function fogLook(cx, cy) {
|
||||
if (x < 0 || y < 0 || x >= W || y >= H) break;
|
||||
const ph = PH[mat[y * W + x]];
|
||||
if (hit < 0 && (ph === PH_SOLID || ph === PH_POWDER)) hit = d;
|
||||
const v = Math.min(255, (48 - d) * 255 / 16, hit < 0 ? 255 : (8 - d + hit) * 255 / 8);
|
||||
// into rock, sight fades out over 8 grains from however bright it arrived
|
||||
const v = Math.min(255, (48 - d) * 255 / 16) * (hit < 0 ? 1 : (8 - d + hit) / 8);
|
||||
if (v <= 0) break;
|
||||
fogMark(x, y, v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user