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

View File

@ -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;
}
}