v0.9.1d: fixed errors with runic transference caused by v0.9.1c

This commit is contained in:
Evan Debenham
2021-01-13 17:35:47 -05:00
parent 6cf2942519
commit 87d9a23b70
@@ -170,26 +170,28 @@ public class Armor extends EquipableItem {
BrokenSeal.WarriorShield sealBuff = hero.buff(BrokenSeal.WarriorShield.class); BrokenSeal.WarriorShield sealBuff = hero.buff(BrokenSeal.WarriorShield.class);
if (sealBuff != null) sealBuff.setArmor(null); if (sealBuff != null) sealBuff.setArmor(null);
if (seal.level() > 0){ BrokenSeal detaching = seal;
seal = null;
if (detaching.level() > 0){
degrade(); degrade();
} }
if (seal.getGlyph() != null){ if (detaching.getGlyph() != null){
if (hero.hasTalent(Talent.RUNIC_TRANSFERENCE) if (hero.hasTalent(Talent.RUNIC_TRANSFERENCE)
&& (Arrays.asList(Glyph.common).contains(seal.getGlyph().getClass()) && (Arrays.asList(Glyph.common).contains(detaching.getGlyph().getClass())
|| Arrays.asList(Glyph.uncommon).contains(seal.getGlyph().getClass()))){ || Arrays.asList(Glyph.uncommon).contains(detaching.getGlyph().getClass()))){
inscribe(null); inscribe(null);
} else if (hero.pointsInTalent(Talent.RUNIC_TRANSFERENCE) == 2){ } else if (hero.pointsInTalent(Talent.RUNIC_TRANSFERENCE) == 2){
inscribe(null); inscribe(null);
} else { } else {
seal.setGlyph(null); detaching.setGlyph(null);
} }
} }
GLog.i( Messages.get(Armor.class, "detach_seal") ); GLog.i( Messages.get(Armor.class, "detach_seal") );
hero.sprite.operate(hero.pos); hero.sprite.operate(hero.pos);
if (!seal.collect()){ if (!detaching.collect()){
Dungeon.level.drop(seal, hero.pos); Dungeon.level.drop(detaching, hero.pos);
} }
seal = null;
} }
} }