v0.4.0: fixed more bugs and typos

This commit is contained in:
Evan Debenham
2016-06-10 16:54:14 -04:00
committed by Evan Debenham
parent 39512b167e
commit 586e038dc4
4 changed files with 35 additions and 16 deletions
@@ -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;
@@ -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
@@ -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() {