aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/event.rs4
-rw-r--r--src/raw/types.rs4
-rw-r--r--src/statistics/gamedata.rs18
-rw-r--r--src/statistics/trackers.rs36
4 files changed, 54 insertions, 8 deletions
diff --git a/src/event.rs b/src/event.rs
index 0e83660..4d25a9f 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -200,7 +200,9 @@ impl Event {
reward_type: raw_event.value,
},
// XXX: implement proper handling of those events!
- CbtStateChange::BuffInitial | CbtStateChange::Position | CbtStateChange::Velocity => return None,
+ CbtStateChange::BuffInitial | CbtStateChange::Position | CbtStateChange::Velocity => {
+ return None
+ }
CbtStateChange::None => if let Some(kind) = check_activation(raw_event) {
kind
diff --git a/src/raw/types.rs b/src/raw/types.rs
index f131eb1..2453350 100644
--- a/src/raw/types.rs
+++ b/src/raw/types.rs
@@ -127,9 +127,9 @@ pub enum CbtStateChange {
/// buff==18)
BuffInitial,
/// src_agent changed, cast float* p = (float*)&dst_agent, access as x/y/z (float[3])
- Position,
+ Position,
/// src_agent changed, cast float* v = (float*)&dst_agent, access as x/y/z (float[3])
- Velocity,
+ Velocity,
}
/// Combat buff remove type
diff --git a/src/statistics/gamedata.rs b/src/statistics/gamedata.rs
index 80f269e..6f370d0 100644
--- a/src/statistics/gamedata.rs
+++ b/src/statistics/gamedata.rs
@@ -6,6 +6,8 @@ use super::boon::{BoonQueue, BoonType};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Boss {
ValeGuardian = 0x3C4E,
+ Gorseval = 0x3C45,
+ Sabetha = 0x3C0F,
/// Xera ID for phase 1.
///
@@ -140,9 +142,23 @@ macro_rules! mechanics {
/// A slice of all mechanics that we know about.
pub static MECHANICS: &[Mechanic] = mechanics! {
+ // Wing 1
Boss::ValeGuardian => [
- "Unstable Magic Spike" => Trigger::SkillOnPlayer(31860),
+ // Teleport:
+ "Unstable Magic Spike" => Trigger::SkillOnPlayer(31392),
],
+ Boss::Gorseval => [
+ // Slam
+ "Spectral Impact" => Trigger::SkillOnPlayer(31875),
+ // Egg
+ "Ghastly Prison" => Trigger::BoonPlayer(31623),
+ ],
+ Boss::Sabetha => [
+ // Took the launch pad
+ "Shell-Shocked" => Trigger::BoonPlayer(34108),
+ ],
+
+ // Wing 4
Boss::Samarog => [
"Prisoner Sweep" => Trigger::SkillOnPlayer(38168),
"Shockwave" => Trigger::SkillOnPlayer(37996),
diff --git a/src/statistics/trackers.rs b/src/statistics/trackers.rs
index d8a9656..66a7bf8 100644
--- a/src/statistics/trackers.rs
+++ b/src/statistics/trackers.rs
@@ -395,14 +395,42 @@ impl Tracker for MechanicTracker {
..
},
Trigger::SkillOnPlayer(trigger_id),
- ) if skill_id == trigger_id
- && self.is_boss(*source_agent_addr)
- && *result != CbtResult::Evade
- && *result != CbtResult::Block =>
+ )
+ if skill_id == trigger_id
+ && self.is_boss(*source_agent_addr)
+ && *result != CbtResult::Evade
+ && *result != CbtResult::Absorb
+ && *result != CbtResult::Block =>
{
self.log
.increase(event.time, mechanic, *destination_agent_addr);
}
+
+ (
+ EventKind::BuffApplication {
+ destination_agent_addr,
+ buff_id,
+ ..
+ },
+ Trigger::BoonPlayer(trigger_id),
+ )
+ if buff_id == trigger_id =>
+ {
+ // Some buff applications are registered multiple times. So
+ // instead of counting those quick successions separately
+ // (and thus having a wrong count), we check if this
+ // mechanic has already been logged "shortly before" (10 millisecons).
+ if self
+ .log
+ .count_between(event.time - 10, event.time + 1, |m, w| {
+ &m == mechanic && w == *destination_agent_addr
+ })
+ == 0
+ {
+ self.log
+ .increase(event.time, mechanic, *destination_agent_addr);
+ }
+ }
_ => (),
}
}