aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/trackers.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2018-08-02 01:35:24 +0200
committerDaniel Schadt <kingdread@gmx.de>2018-08-02 01:35:24 +0200
commit2ac9d19ef91545a43dfde2bbdd986090695454d1 (patch)
treed9c44b1c81a10fe79ec534a34ec4bd09979d1739 /src/statistics/trackers.rs
parent49d369b83b9529ad0d7723e5c34d612f1ad32e8f (diff)
downloadevtclib-2ac9d19ef91545a43dfde2bbdd986090695454d1.tar.gz
evtclib-2ac9d19ef91545a43dfde2bbdd986090695454d1.tar.bz2
evtclib-2ac9d19ef91545a43dfde2bbdd986090695454d1.zip
add more wing 1 mechanics
Diffstat (limited to 'src/statistics/trackers.rs')
-rw-r--r--src/statistics/trackers.rs36
1 files changed, 32 insertions, 4 deletions
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);
+ }
+ }
_ => (),
}
}