v2.2.0: improved the consistency of gold from secret mine rooms
This commit is contained in:
+11
-7
@@ -25,16 +25,15 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom;
|
||||||
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
public class MineSecretRoom extends SecretRoom {
|
public class MineSecretRoom extends SecretRoom {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int minWidth() { return 6; }
|
public int maxWidth() { return 7; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int minHeight() {
|
public int maxHeight() { return 7; }
|
||||||
return 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint(Level level) {
|
public void paint(Level level) {
|
||||||
@@ -43,8 +42,13 @@ public class MineSecretRoom extends SecretRoom {
|
|||||||
|
|
||||||
entrance().set( Door.Type.HIDDEN );
|
entrance().set( Door.Type.HIDDEN );
|
||||||
|
|
||||||
//TODO refine this
|
int goldAmount = Random.NormalIntRange(4, 7);
|
||||||
Painter.fill( level, this, 2, Terrain.WALL_DECO );
|
|
||||||
Painter.fill( level, this, 3, Terrain.WALL );
|
//TODO maybe add per-quest decorations here?
|
||||||
|
|
||||||
|
for (int i = 0; i < goldAmount; i++){
|
||||||
|
Painter.set(level, random(1), Terrain.WALL_DECO);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user