From 8d84b9f2d583b5b344a528724360360a62ebcce6 Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 9 Mar 2016 13:13:54 -0500 Subject: [PATCH] remove defined encounter "must-kill-count" setting. update schemas --- vwowrla.core/resources/encounters.edn | 9 +++------ vwowrla.core/src/vwowrla/core/encounters/detection.clj | 9 ++++----- vwowrla.core/src/vwowrla/core/schemas.clj | 6 +++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/vwowrla.core/resources/encounters.edn b/vwowrla.core/resources/encounters.edn index 2e0b374..673c7d1 100644 --- a/vwowrla.core/resources/encounters.edn +++ b/vwowrla.core/resources/encounters.edn @@ -20,11 +20,9 @@ "Flamewaker Priest" {:count 4}}} "Golemagg the Incinerator" {:entities {"Golemagg the Incinerator" {:count 1} - "Core Rager" {:count 2}}} + "Core Rager" {}}} - "Majordomo Executus" {:entities {"Majordomo Executus" {:count 1 - :must-kill-count 0 - :ignore-interactions-with ["Ragnaros"] + "Majordomo Executus" {:entities {"Majordomo Executus" {:ignore-interactions-with ["Ragnaros"] :ignore-skills ["Summon Ragnaros"]} "Flamewaker Healer" {:count 4} "Flamewaker Elite" {:count 4}} @@ -67,8 +65,7 @@ "Chromaggus" {:entities {"Chromaggus" {:count 1}}} "Nefarian" {:entities {"Nefarian" {:count 1} - "Lord Victor Nefarius" {:count 1 - :must-kill-count 0} + "Lord Victor Nefarius" {} "Black Drakonid" {:cannot-trigger? true} "Blue Drakonid" {:cannot-trigger? true} "Bronze Drakonid" {:cannot-trigger? true} diff --git a/vwowrla.core/src/vwowrla/core/encounters/detection.clj b/vwowrla.core/src/vwowrla/core/encounters/detection.clj index e8a0576..5f89364 100644 --- a/vwowrla.core/src/vwowrla/core/encounters/detection.clj +++ b/vwowrla.core/src/vwowrla/core/encounters/detection.clj @@ -110,13 +110,12 @@ (let [trigger-entites (:trigger-entities encounter)] (cond (every? - (fn [[entity-name {:keys [count must-kill-count]}]] - ; if there is no entity count (or kill count) specified then there is no specific + (fn [[entity-name {:keys [count]}]] + ; if there is no entity count specified then there is no specific ; kill requirement of this entity for the encounter to end - (if (or (not (nil? count)) - (not (nil? must-kill-count))) + (if-not (nil? count) (let [count-dead (count-currently-dead encounter entity-name)] - (>= count-dead (or must-kill-count count))) + (>= count-dead count)) true)) trigger-entites) :killed diff --git a/vwowrla.core/src/vwowrla/core/schemas.clj b/vwowrla.core/src/vwowrla/core/schemas.clj index 509ae1c..c7d8eb3 100644 --- a/vwowrla.core/src/vwowrla/core/schemas.clj +++ b/vwowrla.core/src/vwowrla/core/schemas.clj @@ -24,10 +24,10 @@ (s/optional-key :windows?) s/Bool}) (def DefinedEncounterEntity - {:count s/Num - (s/optional-key :must-kill-count) s/Num + {(s/optional-key :count) s/Num (s/optional-key :ignore-interactions-with) [s/Str] - (s/optional-key :ignore-skills) [s/Str]}) + (s/optional-key :ignore-skills) [s/Str] + (s/optional-key :cannot-trigger?) s/Bool}) (def DefinedEncounter {:entities {s/Str DefinedEncounterEntity}