v0.9.3: added text indicating charge use to class armors
This commit is contained in:
@@ -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.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.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.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.name=cloth armor
|
||||||
items.armor.clotharmor.desc=This lightweight armor offers basic protection.
|
items.armor.clotharmor.desc=This lightweight armor offers basic protection.
|
||||||
|
|||||||
+3
@@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndChooseAbility;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndChooseAbility;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
abstract public class ClassArmor extends Armor {
|
abstract public class ClassArmor extends Armor {
|
||||||
@@ -184,6 +185,8 @@ abstract public class ClassArmor extends Armor {
|
|||||||
ArmorAbility ability = Dungeon.hero.armorAbility;
|
ArmorAbility ability = Dungeon.hero.armorAbility;
|
||||||
if (ability != null){
|
if (ability != null){
|
||||||
desc += "\n\n" + ability.shortDesc();
|
desc += "\n\n" + ability.shortDesc();
|
||||||
|
float chargeUse = ability.chargeUse(Dungeon.hero);
|
||||||
|
desc += " " + Messages.get(this, "charge_use", new DecimalFormat("#.##").format(chargeUse));
|
||||||
} else {
|
} else {
|
||||||
desc += "\n\n" + "_" + Messages.get(this, "no_ability") + "_";
|
desc += "\n\n" + "_" + Messages.get(this, "no_ability") + "_";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user