diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-07-23 17:33:15 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-07-23 17:33:15 +0200 |
commit | d64ead757122e713d2cbb133d5fe683537cfcf6c (patch) | |
tree | 91ae2a2c6d8bd24961c1f8b576f38d5878053ba0 /src | |
parent | c6c2f4fa92dc94d0710586e3ba96b31dcb125f91 (diff) | |
download | evtclib-d64ead757122e713d2cbb133d5fe683537cfcf6c.tar.gz evtclib-d64ead757122e713d2cbb133d5fe683537cfcf6c.tar.bz2 evtclib-d64ead757122e713d2cbb133d5fe683537cfcf6c.zip |
implement Analyzer::outcome for fractals
Diffstat (limited to 'src')
-rw-r--r-- | src/analyzers/fractals.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/analyzers/fractals.rs b/src/analyzers/fractals.rs index dd010ac..e3ebfc5 100644 --- a/src/analyzers/fractals.rs +++ b/src/analyzers/fractals.rs @@ -1,6 +1,6 @@ //! Analyzers for (challenge mote) fractal encounters. use crate::{ - analyzers::{helpers, Analyzer}, + analyzers::{helpers, Analyzer, Outcome}, Log, }; @@ -30,6 +30,10 @@ impl<'log> Analyzer for Skorvald<'log> { .map(|h| h >= SKORVALD_CM_HEALTH) .unwrap_or(false) } + + fn outcome(&self) -> Option<Outcome> { + Outcome::from_bool(self.log.was_rewarded() || helpers::boss_is_dead(self.log)) + } } #[derive(Debug, Clone, Copy)] @@ -51,4 +55,8 @@ impl<'log> Analyzer for GenericFractal<'log> { fn is_cm(&self) -> bool { true } + + fn outcome(&self) -> Option<Outcome> { + Outcome::from_bool(self.log.was_rewarded() || helpers::boss_is_dead(self.log)) + } } |