v0.6.2: nerfs to some new secret rooms

This commit is contained in:
Evan Debenham 2017-10-11 17:30:46 -04:00
parent 2739595320
commit 01846d1a02
5 changed files with 18 additions and 8 deletions

View File

@ -262,7 +262,7 @@ public class WandOfRegrowth extends Wand {
@Override
public void activate() {
int nDrops = Random.NormalIntRange(2, 8);
int nDrops = Random.NormalIntRange(3, 6);
ArrayList<Integer> candidates = new ArrayList<Integer>();
for (int i : PathFinder.NEIGHBOURS8){
@ -296,7 +296,7 @@ public class WandOfRegrowth extends Wand {
@Override
public void activate() {
int nSeeds = Random.NormalIntRange(1, 5);
int nSeeds = Random.NormalIntRange(2, 4);
ArrayList<Integer> candidates = new ArrayList<Integer>();
for (int i : PathFinder.NEIGHBOURS8){

View File

@ -70,10 +70,10 @@ public class SecretLaboratoryRoom extends SecretRoom {
Painter.set( level, pot, Terrain.ALCHEMY );
Alchemy alchemy = new Alchemy();
alchemy.seed( level, pot.x + level.width() * pot.y, Random.IntRange(40, 75) );
alchemy.seed( level, pot.x + level.width() * pot.y, Random.IntRange(30, 60) );
level.blobs.put( Alchemy.class, alchemy );
int n = Random.IntRange( 2, 4 );
int n = Random.IntRange( 2, 3 );
HashMap<Class<? extends Potion>, Float> chances = new HashMap<>(potionChances);
for (int i=0; i < n; i++) {
int pos;

View File

@ -82,7 +82,7 @@ public class SecretLibraryRoom extends SecretRoom {
}
entrance.set( Door.Type.HIDDEN );
int n = Random.IntRange( 2, 4 );
int n = Random.IntRange( 2, 3 );
HashMap<Class<? extends Scroll>, Float> chances = new HashMap<>(scrollChances);
for (int i=0; i < n; i++) {
int pos;

View File

@ -37,7 +37,7 @@ public abstract class SecretRoom extends SpecialRoom {
private static final ArrayList<Class<? extends SecretRoom>> ALL_SECRETS = new ArrayList<>( Arrays.asList(
SecretGardenRoom.class, SecretLaboratoryRoom.class, SecretLibraryRoom.class,
SecretLarderRoom.class, SecretTransmutationRoom.class, SecretRunestoneRoom.class,
SecretLarderRoom.class, SecretWellRoom.class, SecretRunestoneRoom.class,
SecretHoneypotRoom.class));
public static ArrayList<Class<? extends SecretRoom>> runSecrets = new ArrayList<>();

View File

@ -21,13 +21,20 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfAwareness;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfHealth;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfTransmutation;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WellWater;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
import com.watabou.utils.Point;
import com.watabou.utils.Random;
public class SecretTransmutationRoom extends SecretRoom {
public class SecretWellRoom extends SecretRoom {
private static final Class<?>[] WATERS =
{WaterOfAwareness.class, WaterOfHealth.class, WaterOfTransmutation.class};
@Override
public boolean canConnect(Point p) {
@ -55,7 +62,10 @@ public class SecretTransmutationRoom extends SecretRoom {
Painter.set( level, well, Terrain.WELL );
WaterOfTransmutation.seed(well.x + level.width() * well.y, 1, WaterOfTransmutation.class, level);
@SuppressWarnings("unchecked")
Class<? extends WellWater> waterClass = (Class<? extends WellWater>) Random.element( WATERS );
WellWater.seed(well.x + level.width() * well.y, 1, waterClass, level);
entrance().set( Door.Type.HIDDEN );
}