Fixed display of some stats in dary and changelog entry.

This commit is contained in:
Sam 2021-12-28 16:19:49 -05:00
parent e662946130
commit aaa33c6834
2 changed files with 12 additions and 5 deletions

View File

@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Piercing damage now ignores an amount of protection equal to damage value
- Slashing damage now reduces target's energy by an amount equal to damage dealt to target post-mitigation
- Crushing damage now does poise damage to a target equal to the amount mitigated by armor
- UI to select abilities and assign to hotbar
### Changed

View File

@ -1295,7 +1295,7 @@ impl<'a> Widget for Diary<'a> {
},
"Crit-Power" => {
let critpwr = combat::compute_crit_mult(Some(self.inventory));
format!("x{}", critpwr)
format!("x{:.2}", critpwr)
},
"Energy Reward" => {
let energy_rew =
@ -1308,9 +1308,11 @@ impl<'a> Widget for Diary<'a> {
},
"Weapon Power" => match (main_weap_stats, off_weap_stats) {
(Some(m_stats), Some(o_stats)) => {
format!("{} {}", m_stats.power, o_stats.power)
format!("{} {}", m_stats.power * 10.0, o_stats.power * 10.0)
},
(Some(stats), None) | (None, Some(stats)) => {
format!("{}", stats.power * 10.0)
},
(Some(stats), None) | (None, Some(stats)) => format!("{}", stats.power),
_ => String::new(),
},
"Weapon Speed" => {
@ -1329,10 +1331,14 @@ impl<'a> Widget for Diary<'a> {
},
"Weapon Poise" => match (main_weap_stats, off_weap_stats) {
(Some(m_stats), Some(o_stats)) => {
format!("{} {}", m_stats.effect_power, o_stats.effect_power)
format!(
"{} {}",
m_stats.effect_power * 10.0,
o_stats.effect_power * 10.0
)
},
(Some(stats), None) | (None, Some(stats)) => {
format!("{}", stats.effect_power)
format!("{}", stats.effect_power * 10.0)
},
_ => String::new(),
},