v0.7.3: bugfixes:

- fixed prismatic images not properly dieing when falling into chasms
- fixed secret room distributions being skewed towards later floors
This commit is contained in:
Evan Debenham 2019-05-04 14:20:27 -04:00
parent 39ffe663f4
commit d030edbec7
2 changed files with 8 additions and 3 deletions

View File

@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.PrismaticSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.PrismaticSprite;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
@ -106,10 +107,14 @@ public class PrismaticImage extends NPC {
@Override @Override
public void die(Object cause) { public void die(Object cause) {
if (deathTimer == -1) { if (deathTimer == -1) {
if (cause == Chasm.class){
super.die( cause );
} else {
deathTimer = 5; deathTimer = 5;
sprite.add(CharSprite.State.PARALYSED); sprite.add(CharSprite.State.PARALYSED);
} }
} }
}
private static final String HEROID = "hero_id"; private static final String HEROID = "hero_id";
private static final String TIMER = "timer"; private static final String TIMER = "timer";

View File

@ -82,7 +82,7 @@ public abstract class SecretRoom extends SpecialRoom {
if (floorsLeft == 0) { if (floorsLeft == 0) {
secrets = regionSecretsThisRun[region]; secrets = regionSecretsThisRun[region];
} else { } else {
secrets = regionSecretsThisRun[region] / floorsLeft; secrets = regionSecretsThisRun[region] / (float)floorsLeft;
if (Random.Float() < secrets % 1f){ if (Random.Float() < secrets % 1f){
secrets = (float)Math.ceil(secrets); secrets = (float)Math.ceil(secrets);
} else { } else {