remove defined encounter "must-kill-count" setting. update schemas

This commit is contained in:
Gered 2016-03-09 13:13:54 -05:00
parent 3f04f612d8
commit 8d84b9f2d5
3 changed files with 10 additions and 14 deletions

View file

@ -20,11 +20,9 @@
"Flamewaker Priest" {:count 4}}} "Flamewaker Priest" {:count 4}}}
"Golemagg the Incinerator" {:entities {"Golemagg the Incinerator" {:count 1} "Golemagg the Incinerator" {:entities {"Golemagg the Incinerator" {:count 1}
"Core Rager" {:count 2}}} "Core Rager" {}}}
"Majordomo Executus" {:entities {"Majordomo Executus" {:count 1 "Majordomo Executus" {:entities {"Majordomo Executus" {:ignore-interactions-with ["Ragnaros"]
:must-kill-count 0
:ignore-interactions-with ["Ragnaros"]
:ignore-skills ["Summon Ragnaros"]} :ignore-skills ["Summon Ragnaros"]}
"Flamewaker Healer" {:count 4} "Flamewaker Healer" {:count 4}
"Flamewaker Elite" {:count 4}} "Flamewaker Elite" {:count 4}}
@ -67,8 +65,7 @@
"Chromaggus" {:entities {"Chromaggus" {:count 1}}} "Chromaggus" {:entities {"Chromaggus" {:count 1}}}
"Nefarian" {:entities {"Nefarian" {:count 1} "Nefarian" {:entities {"Nefarian" {:count 1}
"Lord Victor Nefarius" {:count 1 "Lord Victor Nefarius" {}
:must-kill-count 0}
"Black Drakonid" {:cannot-trigger? true} "Black Drakonid" {:cannot-trigger? true}
"Blue Drakonid" {:cannot-trigger? true} "Blue Drakonid" {:cannot-trigger? true}
"Bronze Drakonid" {:cannot-trigger? true} "Bronze Drakonid" {:cannot-trigger? true}

View file

@ -110,13 +110,12 @@
(let [trigger-entites (:trigger-entities encounter)] (let [trigger-entites (:trigger-entities encounter)]
(cond (cond
(every? (every?
(fn [[entity-name {:keys [count must-kill-count]}]] (fn [[entity-name {:keys [count]}]]
; if there is no entity count (or kill count) specified then there is no specific ; if there is no entity count specified then there is no specific
; kill requirement of this entity for the encounter to end ; kill requirement of this entity for the encounter to end
(if (or (not (nil? count)) (if-not (nil? count)
(not (nil? must-kill-count)))
(let [count-dead (count-currently-dead encounter entity-name)] (let [count-dead (count-currently-dead encounter entity-name)]
(>= count-dead (or must-kill-count count))) (>= count-dead count))
true)) true))
trigger-entites) trigger-entites)
:killed :killed

View file

@ -24,10 +24,10 @@
(s/optional-key :windows?) s/Bool}) (s/optional-key :windows?) s/Bool})
(def DefinedEncounterEntity (def DefinedEncounterEntity
{:count s/Num {(s/optional-key :count) s/Num
(s/optional-key :must-kill-count) s/Num
(s/optional-key :ignore-interactions-with) [s/Str] (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 (def DefinedEncounter
{:entities {s/Str DefinedEncounterEntity} {:entities {s/Str DefinedEncounterEntity}