From 0a7c660f2e678aaa2a0c2cb411dcd0275f2a212e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 25 Jan 2019 00:53:33 -0500 Subject: [PATCH] v0.7.2: reverted changes to magical infusion The change to magical infusion should happen but now isn't the best time for itm Catalysts are already enough of a balance change to alchemy. --- .../shatteredpixeldungeon/items/Recipe.java | 4 ++-- .../items/spells/MagicalInfusion.java | 20 +++++++++++-------- .../messages/items/items.properties | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java index 37a3c3eb3..0400abab9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java @@ -179,8 +179,6 @@ public abstract class Recipe { new Blandfruit.CookFruit(), new TippedDart.TipDart(), new Bomb.EnhanceBomb(), - new AlchemicalCatalyst.Recipe(), - new ArcaneCatalyst.Recipe(), new ElixirOfAquaticRejuvenation.Recipe(), new ElixirOfDragonsBlood.Recipe(), new ElixirOfIcyTouch.Recipe(), @@ -201,6 +199,8 @@ public abstract class Recipe { new PhaseShift.Recipe(), new ReclaimTrap.Recipe(), new Recycle.Recipe(), + new AlchemicalCatalyst.Recipe(), + new ArcaneCatalyst.Recipe(), new StewedMeat.twoMeat() }; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java index 139c2d3cb..034dc48c6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java @@ -27,6 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; +import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfEnchantment; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -36,19 +38,21 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; public class MagicalInfusion extends InventorySpell { { - mode = WndBag.Mode.UPGRADEABLE; + mode = WndBag.Mode.ENCHANTABLE; image = ItemSpriteSheet.MAGIC_INFUSE; } @Override protected void onItemSelected( Item item ) { - if (item instanceof Weapon && ((Weapon) item).enchantment != null) { + if (item instanceof SpiritBow){ + if (((SpiritBow) item).enchantment == null){ + ((Weapon)item).enchant(); + } + } else if (item instanceof Weapon) { ((Weapon) item).upgrade(true); - } else if (item instanceof Armor && ((Armor) item).glyph != null) { - ((Armor) item).upgrade(true); } else { - item.upgrade(); + ((Armor) item).upgrade(true); } GLog.p( Messages.get(this, "infuse", item.name()) ); @@ -62,16 +66,16 @@ public class MagicalInfusion extends InventorySpell { @Override public int price() { //prices of ingredients, divided by output quantity - return Math.round(quantity * ((50 + 40) / 1f)); + return Math.round(quantity * ((50 + 30) / 1f)); } public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe { { - inputs = new Class[]{ScrollOfUpgrade.class, ArcaneCatalyst.class}; + inputs = new Class[]{ScrollOfUpgrade.class, StoneOfEnchantment.class}; inQuantity = new int[]{1, 1}; - cost = 5; + cost = 3; output = MagicalInfusion.class; outQuantity = 1; diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index ed41cba04..f6fa6d18f 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -969,7 +969,7 @@ items.spells.spell.no_magic=You can't cast spells while magic immune. items.spells.magicalinfusion.name=magical infusion items.spells.magicalinfusion.inv_title=Infuse an item items.spells.magicalinfusion.infuse=Your %s is infused with arcane energy! -items.spells.magicalinfusion.desc=This spell posses the same magical power as a scroll of upgrade, but in a more stable form.\n\nIn addition to upgrading an item, it will also never erase an enchantment on a weapon or glyph on armor. +items.spells.magicalinfusion.desc=This spell will infuse a weapon or armor with powerful magical energy.\n\nIn addition to being upgraded, a weapon will gain a magical enchantment, or armor will be imbued with a magical glyph.\n\nIf the item already has an enchantment or glyph, it will not be erased by the upgrade. items.spells.magicalporter.name=magical porter items.spells.magicalporter.inv_title=Port an item