diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java index f5e9fb763..1c81ac0c5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/Item.java @@ -52,8 +52,8 @@ import java.util.Comparator; public class Item implements Bundlable { - private static final String TXT_TO_STRING_LVL = "%s %+d"; - private static final String TXT_TO_STRING_X = "%s x%d"; + protected static final String TXT_TO_STRING_LVL = "%s %+d"; + protected static final String TXT_TO_STRING_X = "%s x%d"; protected static final float TIME_TO_THROW = 1.0f; protected static final float TIME_TO_PICK_UP = 1.0f; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java index c1ec178e6..f965b1f36 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/ClassArmor.java @@ -140,12 +140,21 @@ abstract public class ClassArmor extends Armor { @Override public int STRReq(int lvl) { lvl = Math.max(0, lvl); - return (7 + armorTier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2; + int effectiveTier = armorTier; + if (glyph != null) effectiveTier += glyph.tierSTRAdjust(); + effectiveTier = Math.max(0, effectiveTier); + + //strength req decreases at +1,+3,+6,+10,etc. + return (8 + effectiveTier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2; } @Override public int DR(){ - return armorTier * (2 + level() + (glyph == null ? 0 : 1)); + int effectiveTier = armorTier; + if (glyph != null) effectiveTier += glyph.tierDRAdjust(); + effectiveTier = Math.max(0, effectiveTier); + + return effectiveTier * (2 + level()); } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java index cbc16e403..76af3b0fc 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java @@ -134,6 +134,16 @@ public class Artifact extends KindofMisc { } } + @Override + public String toString() { + + if (levelKnown && level()/levelCap != 0) { + return Messages.format( TXT_TO_STRING_LVL, name(), visiblyUpgraded() ); + } else { + return name(); + } + } + @Override public String status() { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 3b8c97b89..b3afe94fc 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -1,6 +1,6 @@ ###armor curses items.armor.curses.antientropy.name=%s of anti-entropy -items.armor.curses.antientropy.desc=Anti-entropy curse works against the forces of the universe, pulling energy away from the attacker and into the wearer. This breifly freezes the attacker, but sets the wearer on fire! +items.armor.curses.antientropy.desc=Anti-entropy curse works against the forces of the universe, pulling energy away from the attacker and into the wearer. This briefly freezes the attacker, but sets the wearer on fire! items.armor.curses.displacement.name=%s of displacement items.armor.curses.displacement.desc=The curse of displacement attempts to move the wearer to safety when they are attacked. It is a bit too effective however, randomly teleporting the user around the level. @@ -9,7 +9,7 @@ items.armor.curses.metabolism.name=%s of metabolism items.armor.curses.metabolism.desc=The metabolism curse directly converts satiety into health when the wearer is injured, quickly causing starvation. items.armor.curses.stench.name=%s of stench -items.armor.curses.stench.desc=Armor cursed with stench will releaes clouds of noxious gas, which is hazardous to everything caught in the cloud. +items.armor.curses.stench.desc=Armor cursed with stench will release clouds of noxious gas, which is hazardous to everything caught in the cloud. @@ -18,7 +18,7 @@ items.armor.glyphs.affection.name=%s of affection items.armor.glyphs.affection.desc=This powerful glyph manipulates the mind of attackers, charming them temporarily. items.armor.glyphs.antimagic.name=%s of anti-magic -items.armor.glyphs.antimagic.desc=This powerful glyph allows armor to apply its defence to most magical attacks as well as phyical ones. +items.armor.glyphs.antimagic.desc=This powerful glyph allows armor to apply its defense to most magical attacks as well as physical ones. items.armor.glyphs.brimstone.name=%s of brimstone items.armor.glyphs.brimstone.desc=This glyph protects the wearer and their belongings from fire, with upgrades it even converts the heat into health. @@ -704,7 +704,7 @@ items.weapon.curses.annoying.msg_2=YEAH, GET THEM! items.weapon.curses.annoying.msg_3=HEY, LISTEN! items.weapon.curses.annoying.msg_4=ARE WE AT THE BOSS YET!? items.weapon.curses.annoying.msg_5=OUCH, DON'T SWING ME SO HARD! -items.weapon.curses.annoying.desc=Annoying weapons just want to help. unfortunatley that help comes in the form of a loud voice which attracts enemies. +items.weapon.curses.annoying.desc=Annoying weapons just want to help. unfortunately that help comes in the form of a loud voice which attracts enemies. items.weapon.curses.exhausting.name=exhausting %s items.weapon.curses.exhausting.desc=Exhausting weapons take great effort to use, and will periodically weaken the wearer as a result. @@ -748,10 +748,10 @@ items.weapon.enchantments.unstable.name=unstable %s items.weapon.enchantments.unstable.desc=This enchantment radiates chaotic energy, acting as a different enchantment with each hit. items.weapon.enchantments.vampiric.name=vampiric %s -items.weapon.enchantments.vampiric.desc=This poweful enchantment leeches life force from enemies with each blow, funneling it back into the wearer. +items.weapon.enchantments.vampiric.desc=This powerful enchantment leeches life force from enemies with each blow, funneling it back into the wearer. items.weapon.enchantments.venomous.name=venomous %s -items.weapon.enchantments.venomous.desc=Venemous weapons inflict enemies with deadly poison, which becomes more severe with each hit. +items.weapon.enchantments.venomous.desc=Venomous weapons inflict enemies with deadly poison, which becomes more severe with each hit. items.weapon.enchantments.vorpal.name=vorpal %s items.weapon.enchantments.vorpal.desc=Vorpal weapons are especially deadly, causing enemies to bleed when struck. @@ -760,7 +760,7 @@ items.weapon.enchantments.vorpal.desc=Vorpal weapons are especially deadly, caus ###melee weapons items.weapon.melee.assassinsblade.name=assassin's blade items.weapon.melee.assassinsblade.stats_desc=This weapon is stronger against unaware enemies. -items.weapon.melee.assassinsblade.desc=A small wavy blade made of obsideon, difficult to use despite being lightweight, but deady if it finds the right mark. +items.weapon.melee.assassinsblade.desc=A small wavy blade made of obsidian, difficult to use despite being lightweight, but deadly if it finds the right mark. items.weapon.melee.battleaxe.name=battle axe items.weapon.melee.battleaxe.stats_desc=This is a rather accurate weapon. @@ -772,11 +772,11 @@ items.weapon.melee.dagger.desc=A simple iron dagger with a worn wooden handle. items.weapon.melee.dirk.name=dirk items.weapon.melee.dirk.stats_desc=This weapon is stronger against unaware enemies. -items.weapon.melee.dirk.desc=A longer thrusting dagger, gives bit more steel to plung into foes. +items.weapon.melee.dirk.desc=A longer thrusting dagger, gives bit more steel to plunge into foes. items.weapon.melee.flail.name=flail items.weapon.melee.flail.stats_desc=This is a slightly slow weapon.\nThis is a rather inaccurate weapon. -items.weapon.melee.flail.desc=A spiked ball attached to a handle by a length of chain. Very unweildy, but devastating if it lands a solid hit. +items.weapon.melee.flail.desc=A spiked ball attached to a handle by a length of chain. Very unwieldy, but devastating if it lands a solid hit. items.weapon.melee.glaive.name=glaive items.weapon.melee.glaive.stats_desc=This is a rather slow weapon.\nThis weapon has extra reach. @@ -784,11 +784,11 @@ items.weapon.melee.glaive.desc=A massive polearm consisting of a sword blade on items.weapon.melee.greataxe.name=greataxe items.weapon.melee.greataxe.stats_desc=This weapon is incredibly heavy. -items.weapon.melee.greataxe.desc=Meant to be weilded over the shoulder, this titanic axe is a powerful as it is heavy. +items.weapon.melee.greataxe.desc=Meant to be wielded over the shoulder, this titanic axe is a powerful as it is heavy. items.weapon.melee.greatshield.name=greatshield items.weapon.melee.greatshield.stats_desc=This weapon blocks a tremendous amount of damage. -items.weapon.melee.greatshield.desc=More like a mobile wall than a shield, this giantic mass of metal aids defence, but doesn't leave much room for attacking. +items.weapon.melee.greatshield.desc=More like a mobile wall than a shield, this gigantic mass of metal aids defense, but doesn't leave much room for attacking. items.weapon.melee.greatsword.name=greatsword items.weapon.melee.greatsword.desc=This towering blade inflicts heavy damage by investing its heft into every swing. @@ -844,7 +844,7 @@ items.weapon.melee.runicblade.desc=A mysterious weapon from a distant land, with items.weapon.melee.sai.name=sai items.weapon.melee.sai.stats_desc=This is a very fast weapon.\nThis weapon blocks some damage. -items.weapon.melee.sai.desc=Two thin blades meant to be weilded in one hand each. Excellent for parrying and swift cuts alike. +items.weapon.melee.sai.desc=Two thin blades meant to be wielded in one hand each. Excellent for parrying and swift cuts alike. items.weapon.melee.scimitar.name=scimitar items.weapon.melee.scimitar.stats_desc=This is a rather fast weapon.