v3.3.0: doors previously locked by hero no longer persist during ascent
This commit is contained in:
@@ -57,6 +57,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
@@ -256,6 +258,13 @@ public class AscensionChallenge extends Buff {
|
||||
} else {
|
||||
stacks += 2f;
|
||||
|
||||
//doors locked by the hero are reset, to prevent blocking out enemies
|
||||
for (int i = 0; i < Dungeon.level.length(); i++){
|
||||
if (Dungeon.level.map[i] == Terrain.HERO_LKD_DR){
|
||||
Level.set(i, Terrain.DOOR, Dungeon.level);
|
||||
}
|
||||
}
|
||||
|
||||
//clears any existing mobs from the level and adds one initial one
|
||||
//this helps balance difficulty between levels with lots of mobs left, and ones with few
|
||||
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
|
||||
|
||||
Reference in New Issue
Block a user