v2.5.1: fixed cases where well water landmark entries hinted at secrets

This commit is contained in:
Evan Debenham
2024-09-12 18:35:33 -04:00
parent 5434557270
commit ef43f24583

View File

@@ -56,7 +56,6 @@ public abstract class WellWater extends Blob {
if (pos == Dungeon.hero.pos && affectHero( Dungeon.hero )) {
clear(pos);
if (volume <= 0 && landmark() != null) Notes.remove(landmark());
return true;
} else if ((heap = Dungeon.level.heaps.get( pos )) != null) {
@@ -79,7 +78,6 @@ public abstract class WellWater extends Blob {
heap.sprite.link();
clear(pos);
if (volume <= 0 && landmark() != null) Notes.remove(landmark());
return true;
@@ -119,6 +117,21 @@ public abstract class WellWater extends Blob {
Level.set( cell, Terrain.EMPTY_WELL );
GameScene.updateMap( cell );
if (water.landmark() != null) {
if (water.volume <= 0) {
Notes.remove(water.landmark());
} else {
boolean removing = true;
for (int i = 0; i < water.cur.length; i++){
if (water.cur[i] > 0 && Dungeon.level.visited[i]){
removing = false;
break;
}
}
if (removing) Notes.remove(water.landmark());
}
}
return;
}