aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2018-07-07 03:23:25 +0200
committerDaniel Schadt <kingdread@gmx.de>2018-07-07 03:23:25 +0200
commit22051473844bddb60c8c062f511fd4b1f90d48bd (patch)
tree8001a9ff97ae7d065c2e6c56cf5fe5a98d44e6b4 /src/main.rs
parent4ea1d4f3e5082925874a271d14cc143ebf80912f (diff)
downloadevtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.tar.gz
evtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.tar.bz2
evtclib-22051473844bddb60c8c062f511fd4b1f90d48bd.zip
base for mechanic tracking
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index c4f4e0a..81ab36c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -143,11 +143,16 @@ pub fn main() -> Result<(), evtclib::raw::parser::ParseError> {
let my_addr = me(&processed);
let mine = stats.agent_stats.get(&my_addr).expect("My stats not found");
- let my_damage = stats.damage_log.damage(|m| m.source == my_addr && processed.is_boss(m.target));
+ let my_damage = stats
+ .damage_log
+ .damage(|m| m.source == my_addr && processed.is_boss(m.target));
- let combat_time = (mine.exit_combat - mine.enter_combat) as f32/ 1000.;
+ let combat_time = (mine.exit_combat - mine.enter_combat) as f32 / 1000.;
println!("Damages: {:?}", stats.damage_log);
- println!("Combat time: {} ({} till {})", combat_time, mine.enter_combat, mine.exit_combat);
+ println!(
+ "Combat time: {} ({} till {})",
+ combat_time, mine.enter_combat, mine.exit_combat
+ );
println!("My boss dps: {:?}", my_damage.0 as f32 / combat_time);
for boon in evtclib::statistics::gamedata::BOONS {
@@ -157,6 +162,19 @@ pub fn main() -> Result<(), evtclib::raw::parser::ParseError> {
println!("{}: {}", boon.1, avg);
}
+ for agent in processed.players() {
+ println!("{:?}", agent.name());
+ for mechanic in evtclib::statistics::gamedata::get_mechanics(processed.boss_id()) {
+ println!(
+ "{}: {}",
+ mechanic.2,
+ stats
+ .mechanic_log
+ .count(|m, a| m == mechanic && a == *agent.addr())
+ );
+ }
+ }
+
//println!("NPCs: {:#?}", processed.npcs().collect::<Vec<_>>());
println!("Bosses: {:#?}", processed.boss_agents());