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