blue mage stats

This commit is contained in:
Zynh0722 2024-02-25 04:47:18 -08:00
parent ca0bbd45d2
commit 3811f0af15

View file

@ -80,9 +80,19 @@ fn display_stats(id: usize, stats: &[JobStats]) {
.filter(|j| matches!(j.role, Role::Dps(DpsRole::Magic))); .filter(|j| matches!(j.role, Role::Dps(DpsRole::Magic)));
let magic_stats_no_blue = magic_stats.clone().filter(|j| !j.is_blue_mage); let magic_stats_no_blue = magic_stats.clone().filter(|j| !j.is_blue_mage);
let magic_earned = magic_stats.fold(0usize, |acc, j| acc + j.level - j.starting_level); let magic_earned = magic_stats
.clone()
.fold(0usize, |acc, j| acc + j.level - j.starting_level);
let magic_earned_no_blue = let magic_earned_no_blue =
magic_stats_no_blue.fold(0usize, |acc, j| acc + j.level - j.starting_level); magic_stats_no_blue.fold(0usize, |acc, j| acc + j.level - j.starting_level);
println!("Dps - Magic (w/o BLU)\t{magic_earned} ({magic_earned_no_blue})"); println!("Dps - Magic (w/o BLU)\t{magic_earned} ({magic_earned_no_blue})");
// print the amount of blue mage levels earned
println!(
"Dps - Blue Mage\t\t{}",
magic_stats
.filter(|j| j.is_blue_mage)
.fold(0, |acc, j| acc + j.level - j.starting_level)
);
} }