From 3811f0af15124323f3b00423e4c205f530388ef8 Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Sun, 25 Feb 2024 04:47:18 -0800 Subject: [PATCH] blue mage stats --- src/main.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 4a4b9c0..8bb7fbc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -80,9 +80,19 @@ fn display_stats(id: usize, stats: &[JobStats]) { .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_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 = 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})"); + + // 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) + ); }