v0.3.1: adjusted how special floors handle random respawn cell logic.
This commit is contained in:
parent
f4c93c369c
commit
c3513b5870
|
@ -215,7 +215,11 @@ public class CavesBossLevel extends Level {
|
|||
|
||||
@Override
|
||||
public int randomRespawnCell() {
|
||||
return -1;
|
||||
int cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
while (!passable[cell]){
|
||||
cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -169,7 +169,11 @@ public class CityBossLevel extends Level {
|
|||
|
||||
@Override
|
||||
public int randomRespawnCell() {
|
||||
return -1;
|
||||
int cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
while (!passable[cell]){
|
||||
cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels;
|
|||
import java.util.Arrays;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class DeadEndLevel extends Level {
|
||||
|
@ -88,6 +89,10 @@ public class DeadEndLevel extends Level {
|
|||
protected void createMobs() {
|
||||
}
|
||||
|
||||
public Actor respawner() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createItems() {
|
||||
}
|
||||
|
|
|
@ -159,7 +159,11 @@ public class HallsBossLevel extends Level {
|
|||
|
||||
@Override
|
||||
public int randomRespawnCell() {
|
||||
return -1;
|
||||
int cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
while (!passable[cell]){
|
||||
cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.watabou.noosa.Scene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||
|
@ -119,6 +120,10 @@ public class LastLevel extends Level {
|
|||
protected void createMobs() {
|
||||
}
|
||||
|
||||
public Actor respawner() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createItems() {
|
||||
drop( new Amulet(), pedestal );
|
||||
|
@ -126,7 +131,11 @@ public class LastLevel extends Level {
|
|||
|
||||
@Override
|
||||
public int randomRespawnCell() {
|
||||
return -1;
|
||||
int cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
while (!passable[cell]){
|
||||
cell = entrance + NEIGHBOURS8[Random.Int(8)];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -176,7 +176,7 @@ public class LastShopLevel extends RegularLevel {
|
|||
|
||||
@Override
|
||||
public int randomRespawnCell() {
|
||||
return -1;
|
||||
return roomEntrance.random();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -357,7 +357,7 @@ public class PrisonBossLevel extends RegularLevel {
|
|||
|
||||
@Override
|
||||
public int randomRespawnCell() {
|
||||
return -1;
|
||||
return roomEntrance.random();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -237,7 +237,7 @@ public class SewerBossLevel extends RegularLevel {
|
|||
|
||||
@Override
|
||||
public int randomRespawnCell() {
|
||||
return -1;
|
||||
return roomEntrance.random();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user