v2.3.0: fixed errors/inconsistencies with combined ring descs
This commit is contained in:
@@ -340,10 +340,25 @@ public class Ring extends KindofMisc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//just used for ring descriptions
|
//just used for ring descriptions
|
||||||
public static int combinedBuffedBonus(Char target, Class<?extends RingBuff> type){
|
public int combinedBonus(Hero hero){
|
||||||
int bonus = 0;
|
int bonus = 0;
|
||||||
for (RingBuff buff : target.buffs(type)) {
|
if (hero.belongings.ring() != null && hero.belongings.ring().getClass() == getClass()){
|
||||||
bonus += buff.buffedLvl();
|
bonus += hero.belongings.ring().soloBonus();
|
||||||
|
}
|
||||||
|
if (hero.belongings.misc() != null && hero.belongings.misc().getClass() == getClass()){
|
||||||
|
bonus += ((Ring)hero.belongings.misc()).soloBonus();
|
||||||
|
}
|
||||||
|
return bonus;
|
||||||
|
}
|
||||||
|
|
||||||
|
//just used for ring descriptions
|
||||||
|
public int combinedBuffedBonus(Hero hero){
|
||||||
|
int bonus = 0;
|
||||||
|
if (hero.belongings.ring() != null && hero.belongings.ring().getClass() == getClass()){
|
||||||
|
bonus += hero.belongings.ring().soloBuffedBonus();
|
||||||
|
}
|
||||||
|
if (hero.belongings.misc() != null && hero.belongings.misc().getClass() == getClass()){
|
||||||
|
bonus += ((Ring)hero.belongings.misc()).soloBuffedBonus();
|
||||||
}
|
}
|
||||||
return bonus;
|
return bonus;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -36,9 +36,9 @@ public class RingOfAccuracy extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.3f, soloBuffedBonus()) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.3f, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Accuracy.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.3f, combinedBuffedBonus(Dungeon.hero, Accuracy.class)) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.3f, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -36,9 +36,9 @@ public class RingOfArcana extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.175f, soloBuffedBonus()) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.175f, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Arcana.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.175f, combinedBuffedBonus(Dungeon.hero, Arcana.class)) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.175f, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -48,9 +48,9 @@ public class RingOfElements extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.825f, soloBuffedBonus()))));
|
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.825f, soloBuffedBonus()))));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Resistance.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.825f, combinedBuffedBonus(Dungeon.hero, Resistance.class)))));
|
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.825f, combinedBuffedBonus(Dungeon.hero)))));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -39,9 +39,9 @@ public class RingOfEnergy extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.15f, soloBuffedBonus()) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.15f, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Energy.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.15f, combinedBuffedBonus(Dungeon.hero, Energy.class)) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.15f, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -36,9 +36,9 @@ public class RingOfEvasion extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.125f, soloBuffedBonus()) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.125f, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Evasion.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.125f, combinedBuffedBonus(Dungeon.hero, Evasion.class)) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.125f, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -115,8 +115,8 @@ public class RingOfForce extends Ring {
|
|||||||
if (isIdentified()) {
|
if (isIdentified()) {
|
||||||
int level = soloBuffedBonus();
|
int level = soloBuffedBonus();
|
||||||
String info = Messages.get(this, "stats", min(level, tier), max(level, tier), level);
|
String info = Messages.get(this, "stats", min(level, tier), max(level, tier), level);
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Force.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
level = combinedBuffedBonus(Dungeon.hero, Force.class);
|
level = combinedBuffedBonus(Dungeon.hero);
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats", min(level, tier), max(level, tier), level);
|
info += "\n\n" + Messages.get(this, "combined_stats", min(level, tier), max(level, tier), level);
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
|
|||||||
+2
-2
@@ -36,9 +36,9 @@ public class RingOfFuror extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.09051f, soloBuffedBonus()) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.09051f, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Furor.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.09051f, combinedBuffedBonus(Dungeon.hero, Furor.class)) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.09051f, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -36,9 +36,9 @@ public class RingOfHaste extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.2f, soloBuffedBonus()) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.2f, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Haste.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.2f, combinedBuffedBonus(Dungeon.hero, Haste.class)) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.2f, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -78,9 +78,9 @@ public class RingOfMight extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
soloBonus(), Messages.decimalFormat("#.##", 100f * (Math.pow(1.035, soloBuffedBonus()) - 1f)));
|
soloBonus(), Messages.decimalFormat("#.##", 100f * (Math.pow(1.035, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Might.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
getBonus(Dungeon.hero, Might.class), Messages.decimalFormat("#.##", 100f * (Math.pow(1.035, combinedBuffedBonus(Dungeon.hero, Might.class)) - 1f)));
|
getBonus(Dungeon.hero, Might.class), Messages.decimalFormat("#.##", 100f * (Math.pow(1.035, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -36,9 +36,9 @@ public class RingOfSharpshooting extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
soloBuffedBonus(), Messages.decimalFormat("#.##", 100f * (Math.pow(1.2, soloBonus()) - 1f)));
|
soloBuffedBonus(), Messages.decimalFormat("#.##", 100f * (Math.pow(1.2, soloBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Aim.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
combinedBuffedBonus(Dungeon.hero, Aim.class), Messages.decimalFormat("#.##", 100f * (Math.pow(1.2, getBonus(Dungeon.hero, Aim.class)) - 1f)));
|
combinedBuffedBonus(Dungeon.hero), Messages.decimalFormat("#.##", 100f * (Math.pow(1.2, combinedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -36,9 +36,9 @@ public class RingOfTenacity extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.85f, soloBuffedBonus()))));
|
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.85f, soloBuffedBonus()))));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Tenacity.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.85f, combinedBuffedBonus(Dungeon.hero, Tenacity.class)))));
|
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.85f, combinedBuffedBonus(Dungeon.hero)))));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -62,9 +62,9 @@ public class RingOfWealth extends Ring {
|
|||||||
if (isIdentified()){
|
if (isIdentified()){
|
||||||
String info = Messages.get(this, "stats",
|
String info = Messages.get(this, "stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, soloBuffedBonus()) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, soloBuffedBonus()) - 1f)));
|
||||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Wealth.class)){
|
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero)){
|
||||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, combinedBuffedBonus(Dungeon.hero, Wealth.class)) - 1f)));
|
Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, combinedBuffedBonus(Dungeon.hero)) - 1f)));
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user