diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java index 1940bb143..17dfaf3b2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java @@ -105,10 +105,8 @@ public class Warlock extends Mob implements Callback { if (hit( this, enemy, true )) { //TODO would be nice for this to work on ghost/statues too if (enemy == Dungeon.hero && Random.Int( 2 ) == 0) { - if (enemy.buff( Degrade.class ) == null){ - Sample.INSTANCE.play( Assets.Sounds.DEBUFF ); - } Buff.prolong( enemy, Degrade.class, Degrade.DURATION ); + Sample.INSTANCE.play( Assets.Sounds.DEBUFF ); } int dmg = Random.NormalIntRange( 12, 18 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java index c4ac1fdef..a0ffcaedc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java @@ -179,11 +179,11 @@ public class RingOfWealth extends Ring { if (roll < (0.6f - 0.04f * level)) { latestDropTier = 1; return genLowValueConsumable(); - //30% chance + 2% per level. Starting from +15: 60%-2%*lvl + //30% chance + 2% per level. Starting from +15: 60%-2%*(lvl-15) } else if (roll < (0.9f - 0.02f * level)) { latestDropTier = 2; return genMidValueConsumable(); - //10% chance + 2% per level. Starting from +15: 40%+2%*lvl + //10% chance + 2% per level. Starting from +15: 40%+2%*(lvl-15) } else { latestDropTier = 3; return genHighValueConsumable(); @@ -227,11 +227,11 @@ public class RingOfWealth extends Ring { private static Item genHighValueConsumable(){ switch (Random.Int(4)){ case 0: default: - Item i = genLowValueConsumable(); + Item i = genMidValueConsumable(); if (i instanceof Bomb){ return new Bomb.DoubleBomb(); } else { - return i.quantity(i.quantity() * 2); + return i.quantity(i.quantity()*2); } case 1: return new StoneOfEnchantment(); @@ -249,13 +249,13 @@ public class RingOfWealth extends Ring { switch (Random.Int(5)){ default: case 0: case 1: Weapon w = Generator.randomWeapon(floorset); - if (!w.hasGoodEnchant() && Random.Int(10-level) == 0) w.enchant(); + if (!w.hasGoodEnchant() && Random.Int(10) < level) w.enchant(); else if (w.hasCurseEnchant()) w.enchant(null); result = w; break; case 2: Armor a = Generator.randomArmor(floorset); - if (!a.hasGoodGlyph() && Random.Int(10-level) == 0) a.inscribe(); + if (!a.hasGoodGlyph() && Random.Int(10) < level) a.inscribe(); else if (a.hasCurseGlyph()) a.inscribe(null); result = a; break; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java index 2eb39e4e6..575b2792e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java @@ -68,7 +68,7 @@ public class WandOfWarding extends Wand { return false; } } else { - if ((currentWardEnergy + 2) > maxWardEnergy){ + if ((currentWardEnergy + 1) > maxWardEnergy){ GLog.w( Messages.get(this, "no_more_wards")); return false; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RunestoneRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RunestoneRoom.java index 0c2e864cf..02b7fdafe 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RunestoneRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RunestoneRoom.java @@ -55,7 +55,7 @@ public class RunestoneRoom extends SpecialRoom { for (int i = 0; i < n; i++) { do { dropPos = level.pointToCell(random()); - } while (level.map[dropPos] != Terrain.EMPTY); + } while (level.map[dropPos] != Terrain.EMPTY || level.heaps.get( dropPos ) != null); level.drop(prize(level), dropPos); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java index 2ee11557d..cf0874cf7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSprite.java @@ -307,6 +307,10 @@ public class ItemSprite extends MovieClip { visible = (heap == null || heap.seen); + if (emitter != null){ + emitter.visible = visible; + } + if (dropInterval > 0){ shadowOffset -= speed.y * Game.elapsed * 0.8f;