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}}}
"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}

View file

@ -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

View file

@ -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}