v0.7.1: corrected inconsistencies with ring description logic
This commit is contained in:
parent
0ea97b0149
commit
5157b83394
|
@ -155,7 +155,7 @@ public class Ring extends KindofMisc {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String info(){
|
||||||
|
|
||||||
String desc = isKnown() ? super.desc() : Messages.get(this, "unknown_desc");
|
String desc = isKnown() ? super.desc() : Messages.get(this, "unknown_desc");
|
||||||
|
|
||||||
|
@ -170,9 +170,17 @@ public class Ring extends KindofMisc {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isKnown()) {
|
||||||
|
desc += "\n\n" + statsInfo();
|
||||||
|
}
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String statsInfo(){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item upgrade() {
|
public Item upgrade() {
|
||||||
super.upgrade();
|
super.upgrade();
|
||||||
|
|
|
@ -28,17 +28,13 @@ import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class RingOfAccuracy extends Ring {
|
public class RingOfAccuracy extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.3f, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.3f, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(30f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(30f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -46,17 +46,13 @@ import java.util.HashSet;
|
||||||
|
|
||||||
public class RingOfElements extends Ring {
|
public class RingOfElements extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (1f - Math.pow(0.875f, soloBonus()))));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (1f - Math.pow(0.875f, soloBonus()))));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(12.5f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(12.5f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -28,17 +28,13 @@ import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class RingOfEnergy extends Ring {
|
public class RingOfEnergy extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.2f, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.2f, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(20f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(20f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -28,17 +28,13 @@ import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class RingOfEvasion extends Ring {
|
public class RingOfEvasion extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.15f, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.15f, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(15f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(15f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -78,18 +78,14 @@ public class RingOfForce extends Ring {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String statsInfo() {
|
||||||
String desc = super.desc();
|
|
||||||
if (isKnown()) {
|
|
||||||
float tier = tier(Dungeon.hero.STR());
|
float tier = tier(Dungeon.hero.STR());
|
||||||
if (isIdentified()) {
|
if (isIdentified()) {
|
||||||
desc += "\n\n" + Messages.get(this, "stats", min(soloBonus(), tier), max(soloBonus(), tier));
|
return Messages.get(this, "stats", min(soloBonus(), tier), max(soloBonus(), tier));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", min(1, tier), max(1, tier));
|
return Messages.get(this, "typical_stats", min(1, tier), max(1, tier));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Force extends RingBuff {
|
public class Force extends RingBuff {
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,17 +28,13 @@ import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class RingOfFuror extends Ring {
|
public class RingOfFuror extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.105f, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.105f, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(10.5f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(10.5f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -28,17 +28,13 @@ import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class RingOfHaste extends Ring {
|
public class RingOfHaste extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.2f, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.2f, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(20f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(20f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -70,17 +70,13 @@ public class RingOfMight extends Ring {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", soloBonus(), new DecimalFormat("#.##").format(100f * (Math.pow(1.035, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", soloBonus(), new DecimalFormat("#.##").format(100f * (Math.pow(1.035, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", 1, new DecimalFormat("#.##").format(3.5f));
|
return Messages.get(this, "typical_stats", 1, new DecimalFormat("#.##").format(3.5f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -28,17 +28,13 @@ import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class RingOfSharpshooting extends Ring {
|
public class RingOfSharpshooting extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", soloBonus(), new DecimalFormat("#.##").format(100f * (Math.pow(1.2, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", soloBonus(), new DecimalFormat("#.##").format(100f * (Math.pow(1.2, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", 1, new DecimalFormat("#.##").format(20f));
|
return Messages.get(this, "typical_stats", 1, new DecimalFormat("#.##").format(20f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -28,17 +28,13 @@ import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class RingOfTenacity extends Ring {
|
public class RingOfTenacity extends Ring {
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (1f - Math.pow(0.85f, soloBonus()))));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (1f - Math.pow(0.85f, soloBonus()))));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(15f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(15f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
|
@ -38,17 +38,13 @@ public class RingOfWealth extends Ring {
|
||||||
|
|
||||||
private float triesToDrop = 0;
|
private float triesToDrop = 0;
|
||||||
|
|
||||||
public String info() {
|
public String statsInfo() {
|
||||||
String desc = desc();
|
|
||||||
if (isKnown()){
|
|
||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
desc += "\n\n" + Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.15f, soloBonus()) - 1f)));
|
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.15f, soloBonus()) - 1f)));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(15f));
|
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(15f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RingBuff buff( ) {
|
protected RingBuff buff( ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user