v2.0.0: fixed softlocks caused by warden fadeleaf and boss levels
This commit is contained in:
@@ -249,8 +249,6 @@ public class CavesBossLevel extends Level {
|
||||
|
||||
@Override
|
||||
public void occupyCell(Char ch) {
|
||||
super.occupyCell(ch);
|
||||
|
||||
//seal the level when the hero moves near to a pylon, the level isn't already sealed, and the gate hasn't been destroyed
|
||||
int gatePos = pointToCell(new Point(gate.left, gate.top));
|
||||
if (ch == Dungeon.hero && !locked && solid[gatePos]){
|
||||
@@ -261,6 +259,8 @@ public class CavesBossLevel extends Level {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.occupyCell(ch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -294,15 +294,12 @@ public class CityBossLevel extends Level {
|
||||
|
||||
@Override
|
||||
public void occupyCell( Char ch ) {
|
||||
|
||||
super.occupyCell( ch );
|
||||
|
||||
if (map[bottomDoor] != Terrain.LOCKED_DOOR && map[topDoor] == Terrain.LOCKED_DOOR
|
||||
&& ch.pos < bottomDoor && ch == Dungeon.hero) {
|
||||
|
||||
seal();
|
||||
|
||||
}
|
||||
|
||||
super.occupyCell( ch );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -220,12 +220,12 @@ public class HallsBossLevel extends Level {
|
||||
|
||||
@Override
|
||||
public void occupyCell( Char ch ) {
|
||||
super.occupyCell( ch );
|
||||
|
||||
if (map[entrance()] == Terrain.ENTRANCE && map[exit()] != Terrain.EXIT
|
||||
&& ch == Dungeon.hero && Dungeon.level.distance(ch.pos, entrance()) >= 2) {
|
||||
seal();
|
||||
}
|
||||
|
||||
super.occupyCell( ch );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -547,8 +547,6 @@ public class PrisonBossLevel extends Level {
|
||||
|
||||
@Override
|
||||
public void occupyCell(Char ch) {
|
||||
super.occupyCell(ch);
|
||||
|
||||
if (ch == Dungeon.hero){
|
||||
switch (state){
|
||||
case START:
|
||||
@@ -564,6 +562,8 @@ public class PrisonBossLevel extends Level {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
super.occupyCell(ch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user