v0.9.3: added text indicating charge use to class armors

This commit is contained in:
Evan Debenham
2021-05-31 21:32:28 -04:00
parent 050e5cec16
commit 79627f465e
2 changed files with 4 additions and 0 deletions

View File

@@ -97,6 +97,7 @@ items.armor.classarmor.ac_ability=CHOOSE ABILITY
items.armor.classarmor.no_ability=Your armor currently has no ability, you should choose one!
items.armor.classarmor.not_equipped=You need to be wearing this armor to use its special power!
items.armor.classarmor.low_charge=The armor does not have enough charge to use its special power!
items.armor.classarmor.charge_use=Using the ability right now will consume _%s_ charge.
items.armor.clotharmor.name=cloth armor
items.armor.clotharmor.desc=This lightweight armor offers basic protection.

View File

@@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndChooseAbility;
import com.watabou.utils.Bundle;
import java.text.DecimalFormat;
import java.util.ArrayList;
abstract public class ClassArmor extends Armor {
@@ -184,6 +185,8 @@ abstract public class ClassArmor extends Armor {
ArmorAbility ability = Dungeon.hero.armorAbility;
if (ability != null){
desc += "\n\n" + ability.shortDesc();
float chargeUse = ability.chargeUse(Dungeon.hero);
desc += " " + Messages.get(this, "charge_use", new DecimalFormat("#.##").format(chargeUse));
} else {
desc += "\n\n" + "_" + Messages.get(this, "no_ability") + "_";
}