v2.2.0: reverted scroll of transmutation change re: potions and scrolls

This commit is contained in:
Evan Debenham
2023-09-13 11:13:50 -04:00
parent 07ddf1413b
commit 2a60fd7de5
2 changed files with 11 additions and 21 deletions

View File

@@ -1035,7 +1035,7 @@ items.scrolls.scrolloftransmutation.name=scroll of transmutation
items.scrolls.scrolloftransmutation.inv_title=Transmute an item
items.scrolls.scrolloftransmutation.nothing=Nothing interesting happens.
items.scrolls.scrolloftransmutation.morph=Your item morphs into something different!
items.scrolls.scrolloftransmutation.desc=This scroll contains powerful transmutation magic. When used on an eligible item it will transform it into a different item of the same type. The magic will even preserve upgrades, enchantments, and glyphs.
items.scrolls.scrolloftransmutation.desc=This scroll contains powerful transmutation magic. When used on an eligible item it will transform it into a different item of the same type. The magic will even preserve upgrades, enchantments, and glyphs. Scrolls and potions will be transmuted into their exotic equivalent, and vice-versa.
items.scrolls.scrollofupgrade.name=scroll of upgrade
items.scrolls.scrollofupgrade.inv_title=Upgrade an item

View File

@@ -321,29 +321,19 @@ public class ScrollOfTransmutation extends InventoryScroll {
}
private static Scroll changeScroll( Scroll s ) {
Scroll n;
do {
n = (Scroll)Generator.randomUsingDefaults( Generator.Category.SCROLL );
if (s instanceof ExoticScroll){
n = Reflection.newInstance(ExoticScroll.regToExo.get(n.getClass()));
}
} while (n.getClass() == s.getClass());
return n;
if (s instanceof ExoticScroll) {
return Reflection.newInstance(ExoticScroll.exoToReg.get(s.getClass()));
} else {
return Reflection.newInstance(ExoticScroll.regToExo.get(s.getClass()));
}
}
private static Potion changePotion( Potion p ) {
Potion n;
do {
n = (Potion)Generator.randomUsingDefaults( Generator.Category.POTION );
if (p instanceof ExoticPotion){
n = Reflection.newInstance(ExoticPotion.regToExo.get(n.getClass()));
}
} while (n.getClass() == p.getClass());
return n;
if (p instanceof ExoticPotion) {
return Reflection.newInstance(ExoticPotion.exoToReg.get(p.getClass()));
} else {
return Reflection.newInstance(ExoticPotion.regToExo.get(p.getClass()));
}
}
@Override