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:
parent
124172b6ad
commit
f170949fe6
|
@ -264,6 +264,11 @@ public class Ghoul extends Mob {
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
ghoul.sprite.visible = Dungeon.level.heroFOV[ghoul.pos];
|
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){
|
if (!target.fieldOfView[ghoul.pos] && Dungeon.level.distance(ghoul.pos, target.pos) >= 4){
|
||||||
detach();
|
detach();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -238,7 +238,7 @@ public abstract class Recipe {
|
||||||
|
|
||||||
public static boolean usableInRecipe(Item item){
|
public static boolean usableInRecipe(Item item){
|
||||||
return !item.cursed
|
return !item.cursed
|
||||||
&& (!(item instanceof EquipableItem) || item instanceof Dart || item instanceof AlchemistsToolkit)
|
&& (!(item instanceof EquipableItem) || (item instanceof AlchemistsToolkit && item.isIdentified()))
|
||||||
&& !(item instanceof Wand);
|
&& !(item instanceof Wand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,11 @@ public class HallsLevel extends RegularLevel {
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
|
|
||||||
|
if (!Dungeon.level.water[pos]){
|
||||||
|
killAndErase();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (visible = (pos < Dungeon.level.heroFOV.length && Dungeon.level.heroFOV[pos])) {
|
if (visible = (pos < Dungeon.level.heroFOV.length && Dungeon.level.heroFOV[pos])) {
|
||||||
|
|
||||||
super.update();
|
super.update();
|
||||||
|
|
|
@ -213,7 +213,7 @@ public class NewCavesBossLevel extends Level {
|
||||||
boss.state = boss.WANDERING;
|
boss.state = boss.WANDERING;
|
||||||
do {
|
do {
|
||||||
boss.pos = pointToCell(Random.element(mainArena.getPoints()));
|
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 );
|
GameScene.add( boss );
|
||||||
|
|
||||||
set( entrance, Terrain.WALL );
|
set( entrance, Terrain.WALL );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user