From 8884114442792e4f5deab2584058a913d5035c94 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 25 Jun 2016 15:17:21 -0400 Subject: [PATCH] v0.4.1: improved the quality of drops from piranha rooms --- .../levels/painters/PoolPainter.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java index 77e4a61b9..3664fef64 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PoolPainter.java @@ -93,15 +93,17 @@ public class PoolPainter extends Painter { return prize; } - //1 floor set higher in probability - if (Random.Int(2) == 0){ - prize = Generator.randomWeapon((Dungeon.depth / 5)+1); - } else { - prize = Generator.randomArmor((Dungeon.depth / 5)+1); - } + //1 floor set higher in probability, never cursed + do { + if (Random.Int(2) == 0) { + prize = Generator.randomWeapon((Dungeon.depth / 5) + 1); + } else { + prize = Generator.randomArmor((Dungeon.depth / 5) + 1); + } + } while (prize.cursed); - //if not cursed, 50% chance for an extra update. - if (!prize.cursed && Random.Int(0) == 1){ + //33% chance for an extra update. + if (Random.Int(3) == 1){ prize.upgrade(); }