diff options
author | Daniel Schadt <kingdread@gmx.de> | 2022-04-20 20:45:09 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2022-04-20 20:45:09 +0200 |
commit | 9275cfc93869c47bfa5c99776f18e68a00789bd5 (patch) | |
tree | ba47eecadfdf4f7fd12f25c39f5e23bf5c7acd77 /src/analyzers/strikes.rs | |
parent | 2f225ba3d27351812307e0a426096738384b7b0d (diff) | |
download | evtclib-9275cfc93869c47bfa5c99776f18e68a00789bd5.tar.gz evtclib-9275cfc93869c47bfa5c99776f18e68a00789bd5.tar.bz2 evtclib-9275cfc93869c47bfa5c99776f18e68a00789bd5.zip |
fix mai trin success detection for early failures
Diffstat (limited to 'src/analyzers/strikes.rs')
-rw-r--r-- | src/analyzers/strikes.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/analyzers/strikes.rs b/src/analyzers/strikes.rs index 420a674..bc994e4 100644 --- a/src/analyzers/strikes.rs +++ b/src/analyzers/strikes.rs @@ -86,7 +86,12 @@ impl<'log> Analyzer for CaptainMaiTrin<'log> { let scarlet = self.log.characters().find(|npc| { npc.id() == Self::ECHO_OF_SCARLET_BRIAR || npc.id() == Self::ECHO_OF_SCARLET_BRIAR_CM - })?; + }); + // If the log ends before Scarlet even spawns, then it for sure is a failure. + let scarlet = match scarlet { + Some(s) => s, + None => return Some(Outcome::Failure), + }; let mai = self .log .characters() |