diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index cc6611029..62dbd7ffc 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -748,7 +748,7 @@ items.potions.brews.shockingbrew.name=shocking brew items.potions.brews.shockingbrew.desc=When shattered, this brew will unleash an electrical storm in a wide area around the location it breaks at. items.potions.brews.unstablebrew.name=unstable brew -items.potions.brews.unstablebrew.desc=This magical brew glows with shifting colors of the rainbow.\n\nWhen drank or thrown it will trigger the effect of a random potion. The potion effect will be more likely to be suitable to how the brew is used. +items.potions.brews.unstablebrew.desc=This magical brew glows with shifting colors of the rainbow.\n\nWhen drank or thrown it will trigger the effect of a random potion. The potion effect will always be beneficial if it is drank, and will always be harmful if it is thrown. ###elixirs items.potions.elixirs.elixirofarcanearmor.name=elixir of arcane armor @@ -1248,7 +1248,7 @@ items.spells.telekineticgrab.no_target=There's nothing to grab there. items.spells.telekineticgrab.desc=This spell allows the caster to remotely grab all items at a location, or all thrown weapons stuck to an enemy!\n\nIt can't be used to grab items that someone else owns, or to grab containers like chests. items.spells.unstablespell.name=unstable spell -items.spells.unstablespell.desc=This small black square crystal has shifting runic symbols on each of its surfaces.\n\nWhen activated, it will trigger the effect of a random scroll. The scroll effect will be more or less likely to be combat-focused depending on whether there are enemies in your field of view. +items.spells.unstablespell.desc=This small black square crystal has shifting runic symbols on each of its surfaces.\n\nWhen activated, it will trigger the effect of a random scroll. The scroll effect will always be combat focused if there are enemies in your field of view, and will always be non-combat focused otherwise. items.spells.wildenergy.name=wild energy items.spells.wildenergy.desc=This spell contains some of the cursed energy which powered DM-300. When cast, it will recharge your wands and worn artifacts, while also triggering a random cursed wand effect. You are able to choose a direction for this cursed magic to shoot in, however. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/brews/UnstableBrew.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/brews/UnstableBrew.java index 8554f6fd1..71b76c95f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/brews/UnstableBrew.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/brews/UnstableBrew.java @@ -88,8 +88,8 @@ public class UnstableBrew extends Brew { Potion p = Reflection.newInstance(Random.chances(potionChances)); - //reroll the potion once if it wasn't a good potion to drink - if (mustThrowPots.contains(p.getClass())){ + //reroll the potion if it wasn't a good potion to drink + while (mustThrowPots.contains(p.getClass())){ p = Reflection.newInstance(Random.chances(potionChances)); } @@ -105,8 +105,8 @@ public class UnstableBrew extends Brew { public void shatter(int cell) { Potion p = Reflection.newInstance(Random.chances(potionChances)); - //reroll the potion once if it wasn't a good potion to throw - if (!mustThrowPots.contains(p.getClass()) && !canThrowPots.contains(p.getClass())){ + //reroll the potion if it wasn't a good potion to throw + while (!mustThrowPots.contains(p.getClass()) && !canThrowPots.contains(p.getClass())){ p = Reflection.newInstance(Random.chances(potionChances)); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java index 1da404daf..dae483050 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java @@ -98,14 +98,15 @@ public class UnstableSpell extends Spell { Scroll s = Reflection.newInstance(Random.chances(scrollChances)); - boolean enemy = hero.visibleEnemies() != 0; - - //reroll the scroll once if there is an enemy and it is a non-combat scroll - // or if there is no enemy and it is a combat scroll - if (enemy && nonCombatScrolls.contains(s.getClass())){ - s = Reflection.newInstance(Random.chances(scrollChances)); - } else if (!enemy && combatScrolls.contains(s.getClass())){ - s = Reflection.newInstance(Random.chances(scrollChances)); + //reroll the scroll until it is relevant for the situation (whether there are visible enemies) + if (hero.visibleEnemies() == 0){ + while (combatScrolls.contains(s.getClass())){ + s = Reflection.newInstance(Random.chances(scrollChances)); + } + } else { + while (nonCombatScrolls.contains(s.getClass())){ + s = Reflection.newInstance(Random.chances(scrollChances)); + } } s.anonymize();