v0.7.0: adjusted transmutation behaviour when used on scrolls/potions
This commit is contained in:
parent
f11a2727bc
commit
a4cb2cd891
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user