v0.4.0: adjusted some item names and descriptions

This commit is contained in:
Evan Debenham
2016-06-05 01:15:11 -04:00
parent 6172b46175
commit 7d97caa406
9 changed files with 34 additions and 94 deletions
@@ -154,9 +154,5 @@ public class DewVial extends Item {
public String status() {
return Messages.format( TXT_STATUS, volume, MAX_VOLUME );
}
@Override
public String toString() {
return super.toString() + " (" + status() + ")" ;
}
}
@@ -51,11 +51,9 @@ import java.util.Collections;
import java.util.Comparator;
public class Item implements Bundlable {
private static final String TXT_TO_STRING = "%s";
private static final String TXT_TO_STRING_LVL = "%s %+d";
private static final String TXT_TO_STRING_X = "%s x%d";
private static final String TXT_TO_STRING_LVL = "%s%+d";
private static final String TXT_TO_STRING_LVL_X = "%s%+d x%d";
protected static final float TIME_TO_THROW = 1.0f;
protected static final float TIME_TO_PICK_UP = 1.0f;
@@ -345,20 +343,17 @@ public class Item implements Bundlable {
@Override
public String toString() {
if (levelKnown && level != 0) {
if (quantity > 1) {
return Messages.format( TXT_TO_STRING_LVL_X, name(), level, quantity );
} else {
return Messages.format( TXT_TO_STRING_LVL, name(), level );
}
} else {
if (quantity > 1) {
return Messages.format( TXT_TO_STRING_X, name(), quantity );
} else {
return Messages.format( TXT_TO_STRING, name() );
}
}
String name = name();
if (levelKnown && level != 0)
name = Messages.format( TXT_TO_STRING_LVL, name, level );
if (quantity > 1)
name = Messages.format( TXT_TO_STRING_X, name, quantity );
return name;
}
public String name() {
@@ -254,11 +254,7 @@ public class Armor extends EquipableItem {
return damage;
}
@Override
public String toString() {
return levelKnown ? Messages.format( TXT_TO_STRING, super.toString(), STRReq() ) : super.toString();
}
@Override
public String name() {
@@ -270,7 +266,7 @@ public class Armor extends EquipableItem {
String info = desc();
if (levelKnown) {
info += "\n\n" + Messages.get(Armor.class, "curr_absorb", Math.max( DR(), 0 ));
info += "\n\n" + Messages.get(Armor.class, "curr_absorb", DR(), STRReq());
if (STRReq() > Dungeon.hero.STR()) {
info += "\n\n" + Messages.get(Armor.class, "too_heavy");
@@ -33,11 +33,6 @@ import com.watabou.utils.Random;
public class Artifact extends KindofMisc {
private static final String TXT_TO_STRING = "%s";
private static final String TXT_TO_STRING_CHARGE = "%s (%d/%d)";
private static final String TXT_TO_STRING_LVL = "%s%+d";
private static final String TXT_TO_STRING_LVL_CHARGE = "%s%+d (%d/%d)";
protected Buff passiveBuff;
protected Buff activeBuff;
@@ -139,24 +134,6 @@ public class Artifact extends KindofMisc {
}
}
@Override
public String toString() {
if (levelKnown && level()/levelCap != 0) {
if (chargeCap > 0) {
return Messages.format( TXT_TO_STRING_LVL_CHARGE, name(), visiblyUpgraded(), charge, chargeCap );
} else {
return Messages.format( TXT_TO_STRING_LVL, name(), visiblyUpgraded() );
}
} else {
if (chargeCap > 0) {
return Messages.format( TXT_TO_STRING_CHARGE, name(), charge, chargeCap );
} else {
return Messages.format( TXT_TO_STRING, name() );
}
}
}
@Override
public String status() {
@@ -160,19 +160,6 @@ public abstract class Wand extends Item {
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder( super.toString() );
String status = status();
if (status != null) {
sb.append( " (" + status + ")" );
}
return sb.toString();
}
@Override
public String info() {
@@ -193,11 +193,6 @@ abstract public class Weapon extends KindOfWeapon {
return super.upgrade();
}
@Override
public String toString() {
return levelKnown ? Messages.format( TXT_TO_STRING, super.toString(), STRReq() ) : super.toString();
}
@Override
public String name() {
return enchantment == null ? super.name() : enchantment.name( super.name() );
@@ -59,21 +59,14 @@ public class MeleeWeapon extends Weapon {
@Override
public String info() {
String name = name();
String info = desc();
info += "\n\n" + Messages.get(MeleeWeapon.class, "tier", tier);
if (levelKnown) {
int min = min();
int max = max();
float dmgfactor = (imbue == Imbue.LIGHT ? 0.7f : imbue == Imbue.HEAVY ? 1.5f : 1);
info += " " + Messages.get(Weapon.class, "avg_dmg", Math.round((min + (max - min) / 2)*dmgfactor));
info += "\n\n" + Messages.get(MeleeWeapon.class, "stats_known", tier, Math.round(min()*dmgfactor), Math.round(max()*dmgfactor), STRReq());
} else {
int min = min(0);
int max = max(0);
info += " " + Messages.get(MeleeWeapon.class, "unknown", (min + (max - min) / 2), STRReq(0));
info += "\n\n" + Messages.get(MeleeWeapon.class, "stats_unknown", tier, min(0), max(0), STRReq(0));
if (STRReq(0) > Dungeon.hero.STR()) {
info += " " + Messages.get(MeleeWeapon.class, "probably_too_heavy");
}
@@ -89,7 +82,8 @@ public class MeleeWeapon extends Weapon {
case NONE:
}
String stats_desc = Messages.get(this, "stats_desc");
//defense-granting weapons include the DR amount, otherwise the value is discarded.
String stats_desc = Messages.get(this, "stats_desc", defenceFactor(Dungeon.hero));
if (!stats_desc.equals("")) info+= "\n\n" + stats_desc;
if (levelKnown && STRReq() > Dungeon.hero.STR()) {
@@ -145,10 +145,10 @@ abstract public class MissileWeapon extends Weapon {
String info = desc();
info += "\n\n" + Messages.get( Weapon.class, "avg_dmg",(min() + (max() - min()) / 2));
info += "\n\n" + Messages.get( MissileWeapon.class, "stats", min(), max(), STRReq());
if (STRReq() > Dungeon.hero.STR()) {
info += Messages.get(Weapon.class, "too_heavy");
info += " " + Messages.get(Weapon.class, "too_heavy");
}
info += "\n\n" + Messages.get(MissileWeapon.class, "distance");