diff options
Diffstat (limited to 'src/analyzers/raids')
-rw-r--r-- | src/analyzers/raids/w5.rs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/analyzers/raids/w5.rs b/src/analyzers/raids/w5.rs index b8c3f3c..b9668b7 100644 --- a/src/analyzers/raids/w5.rs +++ b/src/analyzers/raids/w5.rs @@ -1,11 +1,12 @@ //! Boss fight analyzers for Wing 5 (Hall of Chains) use crate::{ - analyzers::{helpers, Analyzer}, - Log, + analyzers::{helpers, Analyzer, Outcome}, + EventKind, Log, }; pub const DESMINA_BUFF_ID: u32 = 47414; pub const DESMINA_MS_THRESHOLD: u64 = 11_000; +pub const DESMINA_DEATH_BUFF: u32 = 895; /// Analyzer for the first fight of Wing 5, Soulless Horror (aka. Desmina). /// @@ -31,6 +32,21 @@ impl<'log> Analyzer for SoullessHorror<'log> { let tbb = helpers::time_between_buffs(self.log, DESMINA_BUFF_ID); tbb > 0 && tbb <= DESMINA_MS_THRESHOLD } + + fn outcome(&self) -> Option<Outcome> { + Outcome::from_bool(self.log.events().iter().any(|event| { + if let EventKind::BuffApplication { + buff_id, + destination_agent_addr, + .. + } = event.kind() + { + self.log.is_boss(*destination_agent_addr) && *buff_id == DESMINA_DEATH_BUFF + } else { + false + } + })) + } } pub const DHUUM_CM_HEALTH: u64 = 40_000_000; @@ -59,4 +75,8 @@ impl<'log> Analyzer for Dhuum<'log> { .map(|h| h >= DHUUM_CM_HEALTH) .unwrap_or(false) } + + fn outcome(&self) -> Option<Outcome> { + Outcome::from_bool(helpers::boss_is_dead(self.log)) + } } |