v0.2.4a: corrected errors with floors 26 and 27+
This commit is contained in:
parent
6c127894df
commit
4ec2e9deb7
|
@ -63,9 +63,9 @@ public class DeadEndLevel extends Level {
|
||||||
entrance = SIZE * WIDTH + SIZE / 2 + 1;
|
entrance = SIZE * WIDTH + SIZE / 2 + 1;
|
||||||
map[entrance] = Terrain.ENTRANCE;
|
map[entrance] = Terrain.ENTRANCE;
|
||||||
|
|
||||||
exit = (SIZE / 2 + 1) * (WIDTH + 1);
|
map[(SIZE / 2 + 1) * (WIDTH + 1)] = Terrain.SIGN;
|
||||||
|
|
||||||
map[exit] = Terrain.SIGN;
|
exit = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ public class DeadEndLevel extends Level {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int randomRespawnCell() {
|
public int randomRespawnCell() {
|
||||||
return -1;
|
return entrance-WIDTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import com.watabou.noosa.Scene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||||
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
public class LastLevel extends Level {
|
public class LastLevel extends Level {
|
||||||
|
@ -160,4 +161,16 @@ public class LastLevel extends Level {
|
||||||
super.addVisuals( scene );
|
super.addVisuals( scene );
|
||||||
HallsLevel.addVisuals( this, scene );
|
HallsLevel.addVisuals( this, scene );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restoreFromBundle(Bundle bundle) {
|
||||||
|
super.restoreFromBundle(bundle);
|
||||||
|
for (int i=0; i < LENGTH; i++) {
|
||||||
|
int flags = Terrain.flags[map[i]];
|
||||||
|
if ((flags & Terrain.PIT) != 0){
|
||||||
|
passable[i] = avoid[i] = false;
|
||||||
|
solid[i] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user