diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java index 9ca5896b8..b73fe4541 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Foliage.java @@ -21,6 +21,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; +import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Shadows; @@ -31,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.watabou.noosa.audio.Sample; public class Foliage extends Blob { @@ -65,7 +67,13 @@ public class Foliage extends Blob { Hero hero = Dungeon.hero; if (hero.isAlive() && hero.visibleEnemies() == 0 && cur[hero.pos] > 0) { - Buff.affect( hero, Shadows.class ).prolong(); + Shadows s = hero.buff(Shadows.class); + if (s == null){ + Buff.affect( hero, Shadows.class ).prolong(); + Sample.INSTANCE.play( Assets.Sounds.MELD ); + } else { + s.prolong(); + } } if (visible) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java index dd0afc669..a0fb47c3e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java @@ -56,7 +56,6 @@ public class Shadows extends Invisibility { @Override public boolean attachTo( Char target ) { if (super.attachTo( target )) { - Sample.INSTANCE.play( Assets.Sounds.MELD ); if (Dungeon.level != null) Dungeon.observe(); return true;