From c3fab95dfe73d3baf86f5a613c1f4224150778bd Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 9 Sep 2022 10:49:52 -0400 Subject: [PATCH] v1.4.0: reverted unintentionally committed debug code in distortion trap --- .../levels/traps/DistortionTrap.java | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java index 6fc7378fe..6f903f9c3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java @@ -100,8 +100,42 @@ public class DistortionTrap extends Trap{ for (Integer point : respawnPoints) { summoned++; Mob mob; - mob = new Piranha(); - + switch (summoned){ + case 1: + if (Dungeon.depth != 5 && Random.Int(100) == 0){ + mob = new RatKing(); + break; + } + case 3: case 5 : default: + int floor; + do { + floor = Random.Int(25); + } while( Dungeon.bossLevel(floor)); + mob = Reflection.newInstance(Bestiary.getMobRotation(floor).get(0)); + break; + case 2: + switch (Random.Int(4)){ + case 0: default: + Wraith.spawnAt(point); + continue; //wraiths spawn themselves, no need to do more + case 1: + //yes it's intended that these are likely to die right away + mob = new Piranha(); + break; + case 2: + mob = Mimic.spawnAt(point, new ArrayList<>()); + ((Mimic)mob).stopHiding(); + mob.alignment = Char.Alignment.ENEMY; + break; + case 3: + mob = Statue.random(); + break; + } + break; + case 4: + mob = Reflection.newInstance(Random.element(RARE)); + break; + } if (Char.hasProp(mob, Char.Property.LARGE) && !Dungeon.level.openSpace[point]){ continue; @@ -124,6 +158,7 @@ public class DistortionTrap extends Trap{ t.activate(); } ScrollOfTeleportation.appear(mob, mob.pos); + Dungeon.level.occupyCell(mob); } }