aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-04-20 20:45:09 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-04-20 20:45:09 +0200
commit9275cfc93869c47bfa5c99776f18e68a00789bd5 (patch)
treeba47eecadfdf4f7fd12f25c39f5e23bf5c7acd77 /src
parent2f225ba3d27351812307e0a426096738384b7b0d (diff)
downloadevtclib-9275cfc93869c47bfa5c99776f18e68a00789bd5.tar.gz
evtclib-9275cfc93869c47bfa5c99776f18e68a00789bd5.tar.bz2
evtclib-9275cfc93869c47bfa5c99776f18e68a00789bd5.zip
fix mai trin success detection for early failures
Diffstat (limited to 'src')
-rw-r--r--src/analyzers/strikes.rs7
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()