From 840727c6743c6af914568f7ad4a1098ae81e58e4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 13 Oct 2020 18:28:19 -0400 Subject: [PATCH] v0.9.0b: adjusted equip logic to prevent more cases of swap prompt --- .../items/KindofMisc.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java index 2dab1c713..8c20323c1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/KindofMisc.java @@ -43,11 +43,25 @@ public abstract class KindofMisc extends EquipableItem { if ( this instanceof Artifact && hero.belongings.artifact != null && hero.belongings.misc != null){ - equipFull = true; + + //see if we can re-arrange items first + if (hero.belongings.misc instanceof Ring && hero.belongings.ring == null){ + hero.belongings.ring = (Ring) hero.belongings.misc; + hero.belongings.misc = null; + } else { + equipFull = true; + } } else if (this instanceof Ring && hero.belongings.misc != null && hero.belongings.ring != null){ - equipFull = true; + + //see if we can re-arrange items first + if (hero.belongings.misc instanceof Artifact && hero.belongings.artifact == null){ + hero.belongings.artifact = (Artifact) hero.belongings.misc; + hero.belongings.misc = null; + } else { + equipFull = true; + } } if (equipFull) {