From 87d9a23b70e43d658c502922288c1d53c5229121 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 13 Jan 2021 17:35:47 -0500 Subject: [PATCH] v0.9.1d: fixed errors with runic transference caused by v0.9.1c --- .../items/armor/Armor.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java index ca2b8954e..cbab2fbc2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java @@ -170,26 +170,28 @@ public class Armor extends EquipableItem { BrokenSeal.WarriorShield sealBuff = hero.buff(BrokenSeal.WarriorShield.class); if (sealBuff != null) sealBuff.setArmor(null); - if (seal.level() > 0){ + BrokenSeal detaching = seal; + seal = null; + + if (detaching.level() > 0){ degrade(); } - if (seal.getGlyph() != null){ + if (detaching.getGlyph() != null){ if (hero.hasTalent(Talent.RUNIC_TRANSFERENCE) - && (Arrays.asList(Glyph.common).contains(seal.getGlyph().getClass()) - || Arrays.asList(Glyph.uncommon).contains(seal.getGlyph().getClass()))){ + && (Arrays.asList(Glyph.common).contains(detaching.getGlyph().getClass()) + || Arrays.asList(Glyph.uncommon).contains(detaching.getGlyph().getClass()))){ inscribe(null); } else if (hero.pointsInTalent(Talent.RUNIC_TRANSFERENCE) == 2){ inscribe(null); } else { - seal.setGlyph(null); + detaching.setGlyph(null); } } GLog.i( Messages.get(Armor.class, "detach_seal") ); hero.sprite.operate(hero.pos); - if (!seal.collect()){ - Dungeon.level.drop(seal, hero.pos); + if (!detaching.collect()){ + Dungeon.level.drop(detaching, hero.pos); } - seal = null; } }