v0.3.2: rebalanced inter-floor warping effects

This commit is contained in:
Evan Debenham 2015-09-30 15:49:01 -04:00
parent 79010c0246
commit 4ae94fe7a8
2 changed files with 10 additions and 2 deletions

View File

@ -323,6 +323,11 @@ public class CursedWand {
case 2: case 2:
if (Dungeon.depth > 1 && !Dungeon.bossLevel()) { if (Dungeon.depth > 1 && !Dungeon.bossLevel()) {
//each depth has 1 more weight than the previous depth.
float[] depths = new float[Dungeon.depth-1];
for (int i = 1; i < Dungeon.depth; i++) depths[i-1] = i;
int depth = 1+Random.chances(depths);
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class); Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
if (buff != null) buff.detach(); if (buff != null) buff.detach();
@ -330,7 +335,7 @@ public class CursedWand {
if (mob instanceof DriedRose.GhostHero) mob.destroy(); if (mob instanceof DriedRose.GhostHero) mob.destroy();
InterlevelScene.mode = InterlevelScene.Mode.RETURN; InterlevelScene.mode = InterlevelScene.Mode.RETURN;
InterlevelScene.returnDepth = Random.Int(Dungeon.depth-1)+1; InterlevelScene.returnDepth = depth;
InterlevelScene.returnPos = -1; InterlevelScene.returnPos = -1;
Game.switchScene(InterlevelScene.class); Game.switchScene(InterlevelScene.class);

View File

@ -55,7 +55,10 @@ public class WarpingTrap extends Trap {
if (Dungeon.depth > 1 && !Dungeon.bossLevel()) { if (Dungeon.depth > 1 && !Dungeon.bossLevel()) {
int depth = Random.Int(Dungeon.depth - 1)+1; //each depth has 1 more weight than the previous depth.
float[] depths = new float[Dungeon.depth-1];
for (int i = 1; i < Dungeon.depth; i++) depths[i-1] = i;
int depth = 1+Random.chances(depths);
Heap heap = Dungeon.level.heaps.get(pos); Heap heap = Dungeon.level.heaps.get(pos);
if (heap != null) { if (heap != null) {