diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java index 5f3946776..51ba05fb5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java @@ -31,7 +31,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion; import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; @@ -218,32 +220,28 @@ public class ScrollOfTransmutation extends InventoryScroll { } private Scroll changeScroll( Scroll s ) { - if (s instanceof ScrollOfUpgrade || s instanceof ScrollOfMagicalInfusion) { - + try { + if (s instanceof ExoticScroll) { + return ExoticScroll.exoToReg.get(s.getClass()).newInstance(); + } else { + return ExoticScroll.regToExo.get(s.getClass()).newInstance(); + } + } catch ( Exception e ){ + ShatteredPixelDungeon.reportException(e); return null; - - } else { - - Scroll n; - do { - n = (Scroll)Generator.random( Generator.Category.SCROLL ); - } while (n.getClass() == s.getClass()); - return n; } } private Potion changePotion( Potion p ) { - if (p instanceof PotionOfStrength || p instanceof PotionOfMight) { - + try { + if (p instanceof ExoticPotion) { + return ExoticPotion.exoToReg.get(p.getClass()).newInstance(); + } else { + return ExoticPotion.regToExo.get(p.getClass()).newInstance(); + } + } catch ( Exception e ){ + ShatteredPixelDungeon.reportException(e); return null; - - } else { - - Potion n; - do { - n = (Potion)Generator.random( Generator.Category.POTION ); - } while (n.getClass() == p.getClass()); - return n; } } diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties index 6158e37da..5f933f547 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties @@ -49,7 +49,7 @@ actors.buffs.amok.name=Amok actors.buffs.amok.desc=Amok causes a state of great rage and confusion in its target.\n\nWhen a creature is amoked, they will attack whatever is near them, whether they be friend or foe.\n\nTurns of amok remaining: %s. actors.buffs.artifactrecharge.name=Artifact Recharging -actors.buffs.artifactrecharge.desc=Energy is coursing through you, increasing the rate your equipped artiacts charge.\n\nEach artifact is affected a little differently, but they will all be less limited by their charge meter.\n\nTurns remaining: %s. +actors.buffs.artifactrecharge.desc=Energy is coursing through you, increasing the rate your equipped artifacts charge.\n\nEach artifact is affected a little differently, but they will all be less limited by their charge meter.\n\nTurns remaining: %s. actors.buffs.barkskin.name=Barkskin actors.buffs.barkskin.desc=Your skin is hardened, it feels rough and solid like bark.\n\nThe hardened skin increases your effective armor, allowing you to better defend against physical attack.\n\nYour armor is currently increased by: %d.\nTurns until barkskin weakens: %s.