V0.2.1 : Unblessed Ankh will now only reset a boss level when the level is locked.
This commit is contained in:
parent
dd2ddf6f81
commit
0e0faecc25
|
@ -218,6 +218,7 @@ public class CavesBossLevel extends Level {
|
|||
if (!enteredArena && outsideEntraceRoom( cell ) && hero == Dungeon.hero) {
|
||||
|
||||
enteredArena = true;
|
||||
locked = true;
|
||||
|
||||
Mob boss = Bestiary.mob( Dungeon.depth );
|
||||
boss.state = Mob.State.HUNTING;
|
||||
|
@ -245,6 +246,7 @@ public class CavesBossLevel extends Level {
|
|||
if (!keyDropped && item instanceof SkeletonKey) {
|
||||
|
||||
keyDropped = true;
|
||||
locked = false;
|
||||
|
||||
CellEmitter.get( arenaDoor ).start( Speck.factory( Speck.ROCK ), 0.07f, 10 );
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ public class CityBossLevel extends Level {
|
|||
if (!enteredArena && outsideEntraceRoom( cell ) && hero == Dungeon.hero) {
|
||||
|
||||
enteredArena = true;
|
||||
locked = true;
|
||||
|
||||
Mob boss = Bestiary.mob( Dungeon.depth );
|
||||
boss.state = Mob.State.HUNTING;
|
||||
|
@ -199,6 +200,7 @@ public class CityBossLevel extends Level {
|
|||
if (!keyDropped && item instanceof SkeletonKey) {
|
||||
|
||||
keyDropped = true;
|
||||
locked = false;
|
||||
|
||||
set( arenaDoor, Terrain.DOOR );
|
||||
GameScene.updateMap( arenaDoor );
|
||||
|
|
|
@ -167,6 +167,7 @@ public class HallsBossLevel extends Level {
|
|||
if (!enteredArena && hero == Dungeon.hero && cell != entrance) {
|
||||
|
||||
enteredArena = true;
|
||||
locked = true;
|
||||
|
||||
for (int i=ROOM_LEFT-1; i <= ROOM_RIGHT + 1; i++) {
|
||||
doMagic( (ROOM_TOP - 1) * WIDTH + i );
|
||||
|
@ -205,6 +206,7 @@ public class HallsBossLevel extends Level {
|
|||
|
||||
if (!keyDropped && item instanceof SkeletonKey) {
|
||||
keyDropped = true;
|
||||
locked = false;
|
||||
|
||||
entrance = stairs;
|
||||
set( entrance, Terrain.ENTRANCE );
|
||||
|
|
|
@ -133,6 +133,9 @@ public abstract class Level implements Bundlable {
|
|||
public int entrance;
|
||||
public int exit;
|
||||
|
||||
//when a boss level has become locked.
|
||||
public boolean locked = false;
|
||||
|
||||
public HashSet<Mob> mobs;
|
||||
public SparseArray<Heap> heaps;
|
||||
public HashMap<Class<? extends Blob>,Blob> blobs;
|
||||
|
@ -151,6 +154,7 @@ public abstract class Level implements Bundlable {
|
|||
private static final String MAPPED = "mapped";
|
||||
private static final String ENTRANCE = "entrance";
|
||||
private static final String EXIT = "exit";
|
||||
private static final String LOCKED = "locked";
|
||||
private static final String HEAPS = "heaps";
|
||||
private static final String PLANTS = "plants";
|
||||
private static final String MOBS = "mobs";
|
||||
|
@ -257,6 +261,8 @@ public abstract class Level implements Bundlable {
|
|||
entrance = bundle.getInt( ENTRANCE );
|
||||
exit = bundle.getInt( EXIT );
|
||||
|
||||
locked = bundle.getBoolean( LOCKED );
|
||||
|
||||
weakFloorCreated = false;
|
||||
|
||||
adjustMapSize();
|
||||
|
@ -308,6 +314,7 @@ public abstract class Level implements Bundlable {
|
|||
bundle.put( MAPPED, mapped );
|
||||
bundle.put( ENTRANCE, entrance );
|
||||
bundle.put( EXIT, exit );
|
||||
bundle.put( LOCKED, locked );
|
||||
bundle.put( HEAPS, heaps.values() );
|
||||
bundle.put( PLANTS, plants.values() );
|
||||
bundle.put( MOBS, mobs );
|
||||
|
|
|
@ -309,6 +309,7 @@ public class PrisonBossLevel extends RegularLevel {
|
|||
if (ch == Dungeon.hero && !enteredArena && roomExit.inside( cell )) {
|
||||
|
||||
enteredArena = true;
|
||||
locked = true;
|
||||
|
||||
int pos;
|
||||
do {
|
||||
|
@ -326,6 +327,7 @@ public class PrisonBossLevel extends RegularLevel {
|
|||
set( arenaDoor, Terrain.LOCKED_DOOR );
|
||||
GameScene.updateMap( arenaDoor );
|
||||
Dungeon.observe();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,6 +337,7 @@ public class PrisonBossLevel extends RegularLevel {
|
|||
if (!keyDropped && item instanceof SkeletonKey) {
|
||||
|
||||
keyDropped = true;
|
||||
locked = false;
|
||||
|
||||
set( arenaDoor, Terrain.DOOR );
|
||||
GameScene.updateMap( arenaDoor );
|
||||
|
|
|
@ -233,6 +233,8 @@ public class SewerBossLevel extends RegularLevel {
|
|||
public void seal() {
|
||||
if (entrance != 0) {
|
||||
|
||||
locked = true;
|
||||
|
||||
set( entrance, Terrain.WATER_TILES );
|
||||
GameScene.updateMap( entrance );
|
||||
GameScene.ripple( entrance );
|
||||
|
@ -245,11 +247,14 @@ public class SewerBossLevel extends RegularLevel {
|
|||
public void unseal() {
|
||||
if (stairs != 0) {
|
||||
|
||||
locked = false;
|
||||
|
||||
entrance = stairs;
|
||||
stairs = 0;
|
||||
|
||||
set( entrance, Terrain.ENTRANCE );
|
||||
GameScene.updateMap( entrance );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user