diff options
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/gamedata.rs | 18 | ||||
-rw-r--r-- | src/statistics/trackers.rs | 36 |
2 files changed, 49 insertions, 5 deletions
diff --git a/src/statistics/gamedata.rs b/src/statistics/gamedata.rs index 80f269e..6f370d0 100644 --- a/src/statistics/gamedata.rs +++ b/src/statistics/gamedata.rs @@ -6,6 +6,8 @@ use super::boon::{BoonQueue, BoonType}; #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum Boss { ValeGuardian = 0x3C4E, + Gorseval = 0x3C45, + Sabetha = 0x3C0F, /// Xera ID for phase 1. /// @@ -140,9 +142,23 @@ macro_rules! mechanics { /// A slice of all mechanics that we know about. pub static MECHANICS: &[Mechanic] = mechanics! { + // Wing 1 Boss::ValeGuardian => [ - "Unstable Magic Spike" => Trigger::SkillOnPlayer(31860), + // Teleport: + "Unstable Magic Spike" => Trigger::SkillOnPlayer(31392), ], + Boss::Gorseval => [ + // Slam + "Spectral Impact" => Trigger::SkillOnPlayer(31875), + // Egg + "Ghastly Prison" => Trigger::BoonPlayer(31623), + ], + Boss::Sabetha => [ + // Took the launch pad + "Shell-Shocked" => Trigger::BoonPlayer(34108), + ], + + // Wing 4 Boss::Samarog => [ "Prisoner Sweep" => Trigger::SkillOnPlayer(38168), "Shockwave" => Trigger::SkillOnPlayer(37996), diff --git a/src/statistics/trackers.rs b/src/statistics/trackers.rs index d8a9656..66a7bf8 100644 --- a/src/statistics/trackers.rs +++ b/src/statistics/trackers.rs @@ -395,14 +395,42 @@ impl Tracker for MechanicTracker { .. }, Trigger::SkillOnPlayer(trigger_id), - ) if skill_id == trigger_id - && self.is_boss(*source_agent_addr) - && *result != CbtResult::Evade - && *result != CbtResult::Block => + ) + if skill_id == trigger_id + && self.is_boss(*source_agent_addr) + && *result != CbtResult::Evade + && *result != CbtResult::Absorb + && *result != CbtResult::Block => { self.log .increase(event.time, mechanic, *destination_agent_addr); } + + ( + EventKind::BuffApplication { + destination_agent_addr, + buff_id, + .. + }, + Trigger::BoonPlayer(trigger_id), + ) + if buff_id == trigger_id => + { + // Some buff applications are registered multiple times. So + // instead of counting those quick successions separately + // (and thus having a wrong count), we check if this + // mechanic has already been logged "shortly before" (10 millisecons). + if self + .log + .count_between(event.time - 10, event.time + 1, |m, w| { + &m == mechanic && w == *destination_agent_addr + }) + == 0 + { + self.log + .increase(event.time, mechanic, *destination_agent_addr); + } + } _ => (), } } |