From af3ab806a94f3654f411925e6917a9ea1250856b Mon Sep 17 00:00:00 2001
From: Daniel <kingdread@gmx.de>
Date: Fri, 7 Sep 2018 01:28:28 +0200
Subject: better fight outcome detection

---
 src/main.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'src')

diff --git a/src/main.rs b/src/main.rs
index 567991d..c70a62a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -220,10 +220,8 @@ fn get_start_timestamp(log: &Log) -> u32 {
 
 fn get_fight_outcome(log: &Log) -> FightOutcome {
     for event in log.events() {
-        if let EventKind::ChangeDead { agent_addr } = event.kind {
-            if log.is_boss(agent_addr) {
-                return FightOutcome::Success;
-            }
+        if let EventKind::Reward { .. } = event.kind {
+            return FightOutcome::Success;
         }
     }
     FightOutcome::Wipe
-- 
cgit v1.2.3