add a "cannot-trigger?" encounter entity setting

when true, indicates that combat events regarding this entity cannot
trigger the encounter to start
This commit is contained in:
Gered 2016-03-08 16:52:17 -05:00
parent c48a184ac7
commit 11f2e70f0d

View file

@ -19,7 +19,10 @@
(->> defined-encounters
(filter (fn [[_ {:keys [entities]}]]
(->> entities
(filter #(= (first %) entity-name))
(filter
(fn [[name {:keys [cannot-trigger?]}]]
(and (= entity-name name)
(not cannot-trigger?))))
(first))))
(ffirst)))