v0.8.0: fixed the following bugs:

- crashes when ghoul life link is attached to a ghoul which hasn't acted yet
- darts and unidentified toolkit being usable in alchemy window
- lava vfx persisting when lava is removed
- rare freeze bugs if a sniper enters DM-300's arena with magical sight
This commit is contained in:
Evan Debenham 2020-03-13 23:32:16 -04:00
parent 124172b6ad
commit f170949fe6
4 changed files with 12 additions and 2 deletions

View File

@ -264,6 +264,11 @@ public class Ghoul extends Mob {
public boolean act() {
ghoul.sprite.visible = Dungeon.level.heroFOV[ghoul.pos];
if (target.fieldOfView == null){
target.fieldOfView = new boolean[Dungeon.level.length()];
Dungeon.level.updateFieldOfView( target, target.fieldOfView );
}
if (!target.fieldOfView[ghoul.pos] && Dungeon.level.distance(ghoul.pos, target.pos) >= 4){
detach();
return true;

View File

@ -238,7 +238,7 @@ public abstract class Recipe {
public static boolean usableInRecipe(Item item){
return !item.cursed
&& (!(item instanceof EquipableItem) || item instanceof Dart || item instanceof AlchemistsToolkit)
&& (!(item instanceof EquipableItem) || (item instanceof AlchemistsToolkit && item.isIdentified()))
&& !(item instanceof Wand);
}
}

View File

@ -197,6 +197,11 @@ public class HallsLevel extends RegularLevel {
@Override
public void update() {
if (!Dungeon.level.water[pos]){
killAndErase();
return;
}
if (visible = (pos < Dungeon.level.heroFOV.length && Dungeon.level.heroFOV[pos])) {
super.update();

View File

@ -213,7 +213,7 @@ public class NewCavesBossLevel extends Level {
boss.state = boss.WANDERING;
do {
boss.pos = pointToCell(Random.element(mainArena.getPoints()));
} while (!openSpace[boss.pos] || map[boss.pos] == Terrain.EMPTY_SP || heroFOV[boss.pos]);
} while (!openSpace[boss.pos] || map[boss.pos] == Terrain.EMPTY_SP);
GameScene.add( boss );
set( entrance, Terrain.WALL );