diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index ac1864f84..cc9d04b38 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -104,13 +104,13 @@ items.armor.clotharmor.desc=This lightweight armor offers basic protection. items.armor.huntressarmor.name=hero's cloak items.armor.huntressarmor.no_enemies=No enemies in sight -items.armor.huntressarmor.desc=While wearing this cloak, the Huntress can perform a special ability: +items.armor.huntressarmor.desc=While wearing this cloak, the Huntress can perform a special ability. items.armor.leatherarmor.name=leather armor items.armor.leatherarmor.desc=Armor made from tanned monster hide. Not as light as cloth armor but provides better protection. items.armor.magearmor.name=hero's robe -items.armor.magearmor.desc=While wearing this gorgeous robe, the Mage can perform a special ability: +items.armor.magearmor.desc=While wearing this gorgeous robe, the Mage can perform a special ability. items.armor.mailarmor.name=mail armor items.armor.mailarmor.desc=Interlocking metal links make for a tough but flexible suit of armor. @@ -119,13 +119,13 @@ items.armor.platearmor.name=plate armor items.armor.platearmor.desc=Enormous plates of metal are joined together into a suit that provides unmatched protection to any adventurer strong enough to bear its staggering weight. items.armor.roguearmor.name=hero's garb -items.armor.roguearmor.desc=When wearing this dark garb, the Rogue can perform a special ability: +items.armor.roguearmor.desc=When wearing this dark garb, the Rogue can perform a special ability. items.armor.scalearmor.name=scale armor items.armor.scalearmor.desc=The metal scales sewn onto a leather vest create a flexible, yet protective armor. items.armor.warriorarmor.name=hero's armor -items.armor.warriorarmor.desc=While this armor looks heavy, it allows the Warrior to perform a special ability: +items.armor.warriorarmor.desc=While this armor looks heavy, it allows the Warrior to perform a special ability. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java index 5dde3f5ea..361b67dfe 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTileSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndChooseAbility; import com.watabou.utils.Bundle; @@ -184,13 +185,15 @@ abstract public class ClassArmor extends Armor { public String desc() { String desc = super.desc(); - ArmorAbility ability = Dungeon.hero.armorAbility; - if (ability != null){ - desc += "\n\n" + ability.shortDesc(); - float chargeUse = ability.chargeUse(Dungeon.hero); - desc += " " + Messages.get(this, "charge_use", new DecimalFormat("#.##").format(chargeUse)); - } else { - desc += "\n\n" + "_" + Messages.get(this, "no_ability") + "_"; + if (Dungeon.hero.belongings.contains(this)) { + ArmorAbility ability = Dungeon.hero.armorAbility; + if (ability != null) { + desc += "\n\n" + ability.shortDesc(); + float chargeUse = ability.chargeUse(Dungeon.hero); + desc += " " + Messages.get(this, "charge_use", new DecimalFormat("#.##").format(chargeUse)); + } else { + desc += "\n\n" + "_" + Messages.get(this, "no_ability") + "_"; + } } return desc;