From 7d2e5e4646087898d66352aaa1cc74e5e7093315 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 2 May 2017 19:05:31 -0400 Subject: [PATCH] v0.6.0: limited the max size of the rat king room --- .../levels/rooms/special/RatKingRoom.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RatKingRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RatKingRoom.java index d05a4bd2a..9394bbc31 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RatKingRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RatKingRoom.java @@ -28,11 +28,25 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EmptyRoom; import com.watabou.utils.Random; public class RatKingRoom extends SpecialRoom { - - public void paint( Level level ) { + + @Override + public boolean canConnect(Room r) { + //never at the end of a connection room, or at the entrance + return r instanceof EmptyRoom && super.canConnect(r); + } + + //reduced max size to limit chest numbers. + // normally would gen with 8-28, this limits it to 8-16 + @Override + public int maxHeight() { return 7; } + public int maxWidth() { return 7; } + + public void paint(Level level ) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.EMPTY_SP );