From 3f960088d05cd2026454bd892fba3767cf580902 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 31 Jan 2022 18:29:14 -0500 Subject: [PATCH] v1.2.0: fixed dragon's breath not being consumed in stacks of 2+ --- .../items/potions/exotic/PotionOfDragonsBreath.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java index c7f57667e..535bca9df 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java @@ -74,17 +74,17 @@ public class PotionOfDragonsBreath extends ExoticPotion { private CellSelector.Listener targeter = new CellSelector.Listener() { - private boolean showingWindow = false; + private boolean optionSelected = false; @Override public void onSelect(final Integer cell) { - if (showingWindow){ + if (optionSelected){ return; } if (cell == null && identifiedByUse){ - showingWindow = true; + optionSelected = true; GameScene.show( new WndOptions(new ItemSprite(PotionOfDragonsBreath.this), Messages.titleCase(name()), Messages.get(ExoticPotion.class, "warning"), @@ -92,7 +92,7 @@ public class PotionOfDragonsBreath extends ExoticPotion { Messages.get(ExoticPotion.class, "no") ) { @Override protected void onSelect( int index ) { - showingWindow = false; + optionSelected = false; switch (index) { case 0: curUser.spendAndNext(1f); @@ -108,6 +108,7 @@ public class PotionOfDragonsBreath extends ExoticPotion { } else if (cell == null && !anonymous){ curItem.collect( curUser.belongings.backpack ); } else if (cell != null) { + optionSelected = true; identifiedByUse = false; curUser.busy(); Sample.INSTANCE.play( Assets.Sounds.DRINK );