aboutsummaryrefslogtreecommitdiff
path: root/src/analyzers/raids/w3.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2021-11-22 23:10:17 +0100
committerDaniel Schadt <kingdread@gmx.de>2021-11-22 23:10:17 +0100
commitd4cd8c978c87d83945a0c2d57d17a0e9b047acd9 (patch)
tree7e0b9ef308d05e054086df82468b46653505bcfb /src/analyzers/raids/w3.rs
parent42068e86611240523ec1d03dd58c8ebcf3b9a385 (diff)
downloadevtclib-d4cd8c978c87d83945a0c2d57d17a0e9b047acd9.tar.gz
evtclib-d4cd8c978c87d83945a0c2d57d17a0e9b047acd9.tar.bz2
evtclib-d4cd8c978c87d83945a0c2d57d17a0e9b047acd9.zip
add Twisted Castle
There's not many useful things we can do with this log, other than providing a way for downstream applications to identify those logs.
Diffstat (limited to 'src/analyzers/raids/w3.rs')
-rw-r--r--src/analyzers/raids/w3.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/analyzers/raids/w3.rs b/src/analyzers/raids/w3.rs
index 16a3d13..e46457f 100644
--- a/src/analyzers/raids/w3.rs
+++ b/src/analyzers/raids/w3.rs
@@ -5,6 +5,36 @@ use crate::{
/// Analyzer for the final fight of Wing 3, Xera.
#[derive(Debug, Clone, Copy)]
+pub struct TwistedCastle<'log> {
+ log: &'log Log,
+}
+
+impl<'log> TwistedCastle<'log> {
+ /// Create a new [`TwistedCastle`] analyzer for the given log.
+ ///
+ /// **Do not** use this method unless you know what you are doing. Instead, rely on
+ /// [`Log::analyzer`]!
+ pub fn new(log: &'log Log) -> Self {
+ TwistedCastle { log }
+ }
+}
+
+impl<'log> Analyzer for TwistedCastle<'log> {
+ fn log(&self) -> &Log {
+ self.log
+ }
+
+ fn is_cm(&self) -> bool {
+ false
+ }
+
+ fn outcome(&self) -> Option<Outcome> {
+ Outcome::from_bool(self.log.was_rewarded())
+ }
+}
+
+/// Analyzer for the final fight of Wing 3, Xera.
+#[derive(Debug, Clone, Copy)]
pub struct Xera<'log> {
log: &'log Log,
}