v3.3.0: some slight vault room improvements:
- items can no longer be cursed - added music - removed scroll of magic mapping and random walls from entrance - fixed a crash bug
This commit is contained in:
@@ -32,12 +32,15 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.LevelTransition;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.features.LevelTransition;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EmptyRoom;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.RegionDecoLineRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.RegionDecoLineRoom;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.SegmentedRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.SegmentedRoom;
|
||||||
|
import com.watabou.noosa.audio.Music;
|
||||||
import com.watabou.utils.Point;
|
import com.watabou.utils.Point;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
import com.watabou.utils.Rect;
|
import com.watabou.utils.Rect;
|
||||||
@@ -51,6 +54,11 @@ public class VaultLevel extends Level { //for now
|
|||||||
color2 = 0xf2f2f2;
|
color2 = 0xf2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playLevelMusic() {
|
||||||
|
Music.INSTANCE.playTracks(CityLevel.CITY_TRACK_LIST, CityLevel.CITY_TRACK_CHANCES, false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String tilesTex() {
|
public String tilesTex() {
|
||||||
return Assets.Environment.TILES_CITY;
|
return Assets.Environment.TILES_CITY;
|
||||||
@@ -84,12 +92,16 @@ public class VaultLevel extends Level { //for now
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Room r = new SegmentedRoom();
|
|
||||||
r.set(1+8*x, 1+8*y, 9+8*x, 9+8*y);
|
|
||||||
rooms.add(r);
|
|
||||||
|
|
||||||
if (x == 0 && y == 3){
|
if (x == 0 && y == 3){
|
||||||
|
Room r = new EmptyRoom();
|
||||||
|
r.set(1+8*x, 1+8*y, 9+8*x, 9+8*y);
|
||||||
|
rooms.add(r);
|
||||||
entryRoom = r;
|
entryRoom = r;
|
||||||
|
} else {
|
||||||
|
Room r = new SegmentedRoom();
|
||||||
|
r.set(1+8*x, 1+8*y, 9+8*x, 9+8*y);
|
||||||
|
rooms.add(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,7 +115,7 @@ public class VaultLevel extends Level { //for now
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (Room n : rooms){
|
for (Room n : rooms){
|
||||||
for (Room p : rooms){
|
for (Room p : n.neigbours){
|
||||||
if (p.height() > 10){
|
if (p.height() > 10){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -155,7 +167,7 @@ public class VaultLevel extends Level { //for now
|
|||||||
Painter.fill(this, n.right-1, n.top+1, 1, 14, Terrain.REGION_DECO_ALT);
|
Painter.fill(this, n.right-1, n.top+1, 1, 14, Terrain.REGION_DECO_ALT);
|
||||||
}
|
}
|
||||||
for (Point door : n.connected.values()){
|
for (Point door : n.connected.values()){
|
||||||
Level.set(pointToCell(door), Terrain.DOOR, this);
|
Painter.set(this, door, Terrain.DOOR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +178,6 @@ public class VaultLevel extends Level { //for now
|
|||||||
Dungeon.depth,
|
Dungeon.depth,
|
||||||
0,
|
0,
|
||||||
LevelTransition.Type.BRANCH_EXIT));
|
LevelTransition.Type.BRANCH_EXIT));
|
||||||
drop(new ScrollOfMagicMapping(), pointToCell(entryRoom.random()));
|
|
||||||
|
|
||||||
rooms.remove(entryRoom);
|
rooms.remove(entryRoom);
|
||||||
rooms.remove(finalRoom);
|
rooms.remove(finalRoom);
|
||||||
@@ -182,6 +193,14 @@ public class VaultLevel extends Level { //for now
|
|||||||
do {
|
do {
|
||||||
pos = pointToCell(n.random());
|
pos = pointToCell(n.random());
|
||||||
} while (map[pos] != Terrain.EMPTY);
|
} while (map[pos] != Terrain.EMPTY);
|
||||||
|
if (item.cursed){
|
||||||
|
item.cursed = false;
|
||||||
|
if (item instanceof MeleeWeapon && ((MeleeWeapon) item).hasCurseEnchant()){
|
||||||
|
((MeleeWeapon) item).enchant(null);
|
||||||
|
} else if (item instanceof Armor && ((Armor) item).hasCurseGlyph()){
|
||||||
|
((Armor) item).inscribe(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
item.identify();
|
item.identify();
|
||||||
drop(item, pos);
|
drop(item, pos);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user