v2.2.0: fixed some edge cases with combined ring descriptions
This commit is contained in:
@@ -912,7 +912,7 @@ items.rings.ringofevasion.desc=This ring quickens the wearer's reactions, making
|
||||
items.rings.ringofforce.name=ring of force
|
||||
items.rings.ringofforce.stats=When unarmed, at your current strength, this ring will deal _%1$d-%2$d damage._ With a weapon equipped, this ring will increase damage by _%3$d._
|
||||
items.rings.ringofforce.typical_stats=When unarmed, at your current strength, typically this ring will deal _%1$d-%2$d damage._ With a weapon equipped, typically this ring will increase damage by _%3$d._
|
||||
items.rings.ringofforce.combined_stats=Your equipped rings are combining their power, dealing a total of _%1$d-%2$d damage_ without a weapon, or _+%3$d damage_ with one.
|
||||
items.rings.ringofforce.combined_stats=Your equipped rings are combining their power, dealing a total of _%1$d-%2$d damage_ without a weapon, or increasing damage by _%3$d_ with one.
|
||||
items.rings.ringofforce.ability_name=brawler's stance
|
||||
items.rings.ringofforce.ability_desc=The Duelist can adopt a _brawler's stance_ with this ring. While in this stance the Duelist's regular attacks will use this ring even with a weapon equipped. The ring will also inherit the weapon's enchantment and augmentation. Each regular attack in this stance consumes 1/6 of a weapon charge.
|
||||
items.rings.ringofforce.desc=This ring enhances the force of the wearer's melee blows. This extra power is fairly weak when wielding weapons, but an unarmed attack will be made much stronger. A cursed ring will instead weaken the wearer's blows.
|
||||
|
||||
@@ -320,7 +320,8 @@ public class Ring extends KindofMisc {
|
||||
}
|
||||
return bonus;
|
||||
}
|
||||
|
||||
|
||||
//just used for ring descriptions
|
||||
public int soloBonus(){
|
||||
if (cursed){
|
||||
return Math.min( 0, Ring.this.level()-2 );
|
||||
@@ -329,6 +330,7 @@ public class Ring extends KindofMisc {
|
||||
}
|
||||
}
|
||||
|
||||
//just used for ring descriptions
|
||||
public int soloBuffedBonus(){
|
||||
if (cursed){
|
||||
return Math.min( 0, Ring.this.buffedLvl()-2 );
|
||||
@@ -337,6 +339,15 @@ public class Ring extends KindofMisc {
|
||||
}
|
||||
}
|
||||
|
||||
//just used for ring descriptions
|
||||
public static int combinedBuffedBonus(Char target, Class<?extends RingBuff> type){
|
||||
int bonus = 0;
|
||||
for (RingBuff buff : target.buffs(type)) {
|
||||
bonus += buff.buffedLvl();
|
||||
}
|
||||
return bonus;
|
||||
}
|
||||
|
||||
public class RingBuff extends Buff {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RingOfAccuracy extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.3f, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Accuracy.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Accuracy.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.3f, getBuffedBonus(Dungeon.hero, Accuracy.class)) - 1f)));
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.3f, combinedBuffedBonus(Dungeon.hero, Accuracy.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RingOfArcana extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.175f, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Arcana.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Arcana.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.175f, getBuffedBonus(Dungeon.hero, Arcana.class)) - 1f)));
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.175f, combinedBuffedBonus(Dungeon.hero, Arcana.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -48,9 +48,9 @@ public class RingOfElements extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.825f, soloBuffedBonus()))));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Resistance.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Resistance.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.825f, getBuffedBonus(Dungeon.hero, Resistance.class)))));
|
||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.825f, combinedBuffedBonus(Dungeon.hero, Resistance.class)))));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -39,9 +39,9 @@ public class RingOfEnergy extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.15f, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Energy.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Energy.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.15f, getBuffedBonus(Dungeon.hero, Energy.class)) - 1f)));
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.15f, combinedBuffedBonus(Dungeon.hero, Energy.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RingOfEvasion extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.125f, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Evasion.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Evasion.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.125f, getBuffedBonus(Dungeon.hero, Evasion.class)) - 1f)));
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.125f, combinedBuffedBonus(Dungeon.hero, Evasion.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -115,8 +115,8 @@ public class RingOfForce extends Ring {
|
||||
if (isIdentified()) {
|
||||
int level = soloBuffedBonus();
|
||||
String info = Messages.get(this, "stats", min(level, tier), max(level, tier), level);
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Force.class)){
|
||||
level = getBuffedBonus(Dungeon.hero, Force.class);
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Force.class)){
|
||||
level = combinedBuffedBonus(Dungeon.hero, Force.class);
|
||||
info += "\n\n" + Messages.get(this, "combined_stats", min(level, tier), max(level, tier), level);
|
||||
}
|
||||
return info;
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RingOfFuror extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.09051f, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Furor.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Furor.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.09051f, getBuffedBonus(Dungeon.hero, Furor.class)) - 1f)));
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.09051f, combinedBuffedBonus(Dungeon.hero, Furor.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RingOfHaste extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.2f, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Haste.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Haste.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.2f, getBuffedBonus(Dungeon.hero, Haste.class)) - 1f)));
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.2f, combinedBuffedBonus(Dungeon.hero, Haste.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -78,9 +78,9 @@ public class RingOfMight extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
soloBonus(), Messages.decimalFormat("#.##", 100f * (Math.pow(1.035, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Might.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Might.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
getBonus(Dungeon.hero, Might.class), Messages.decimalFormat("#.##", 100f * (Math.pow(1.035, getBuffedBonus(Dungeon.hero, Might.class)) - 1f)));
|
||||
getBonus(Dungeon.hero, Might.class), Messages.decimalFormat("#.##", 100f * (Math.pow(1.035, combinedBuffedBonus(Dungeon.hero, Might.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RingOfSharpshooting extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
soloBuffedBonus(), Messages.decimalFormat("#.##", 100f * (Math.pow(1.2, soloBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Aim.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Aim.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
getBuffedBonus(Dungeon.hero, Aim.class), Messages.decimalFormat("#.##", 100f * (Math.pow(1.2, getBonus(Dungeon.hero, Aim.class)) - 1f)));
|
||||
combinedBuffedBonus(Dungeon.hero, Aim.class), Messages.decimalFormat("#.##", 100f * (Math.pow(1.2, getBonus(Dungeon.hero, Aim.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RingOfTenacity extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.85f, soloBuffedBonus()))));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Tenacity.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Tenacity.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.85f, getBuffedBonus(Dungeon.hero, Tenacity.class)))));
|
||||
Messages.decimalFormat("#.##", 100f * (1f - Math.pow(0.85f, combinedBuffedBonus(Dungeon.hero, Tenacity.class)))));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
@@ -62,9 +62,9 @@ public class RingOfWealth extends Ring {
|
||||
if (isIdentified()){
|
||||
String info = Messages.get(this, "stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, soloBuffedBonus()) - 1f)));
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != getBuffedBonus(Dungeon.hero, Wealth.class)){
|
||||
if (isEquipped(Dungeon.hero) && soloBuffedBonus() != combinedBuffedBonus(Dungeon.hero, Wealth.class)){
|
||||
info += "\n\n" + Messages.get(this, "combined_stats",
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, getBuffedBonus(Dungeon.hero, Wealth.class)) - 1f)));
|
||||
Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, combinedBuffedBonus(Dungeon.hero, Wealth.class)) - 1f)));
|
||||
}
|
||||
return info;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user