add DefinedEncounter schema, and update function type ann's which use it

a very important distinction for function argument schema/type
annotations as Encounter and DefinedEncounter are used for very
different things!
This commit is contained in:
Gered 2016-03-03 17:20:11 -05:00
parent bce419d411
commit 0150a890f3
2 changed files with 15 additions and 2 deletions

View file

@ -21,7 +21,7 @@
"returns true if the given parsed combat log line is between entities that have
been specified to ignore interactions between for the purposes of detecting
an encounter trigger"
[encounter :- Encounter
[encounter :- DefinedEncounter
event :- CombatEvent]
(->> (:entities encounter)
(filter
@ -42,7 +42,7 @@
"returns true if the given parsed combat log line is for an encounter entity
that is using a skill that has been specifically indicated should be ignored
for the purposes of triggering an encounter"
[encounter :- Encounter
[encounter :- DefinedEncounter
event :- CombatEvent]
(->> (:entities encounter)
(filter

View file

@ -23,6 +23,19 @@
:timezone java.util.TimeZone
(s/optional-key :windows?) s/Bool})
(def DefinedEncounterEntity
{:count s/Num
(s/optional-key :must-kill-count) s/Num
(s/optional-key :ignore-interactions-with) [s/Str]
(s/optional-key :ignore-skills) [s/Str]})
(def DefinedEncounter
{:entities {s/Str DefinedEncounterEntity}
(s/optional-key :trigger-on-damage?) s/Bool
(s/optional-key :trigger-on-aura?) s/Bool
(s/optional-key :trigger-on-debuff?) s/Bool
(s/optional-key :trigger-on-buff?) s/Bool})
(def CombatEvent
{:id s/Keyword
:logfmt s/Keyword