add missing regex matcher for another skill absorb event variation

This commit is contained in:
Gered 2016-03-08 12:51:41 -05:00
parent 9fddfbba2e
commit 08b4ac32d7
3 changed files with 26 additions and 1 deletions

View file

@ -108,7 +108,8 @@ vwowrla_combat_log_patterns = {
event = "skill-avoided-by-target",
pattern = {
"^(.+) resists your (.+)%.$",
"^(.+) is immune to your (.+)%.$"
"^(.+) is immune to your (.+)%.$",
"^(.+) absorbs? your (.+)%.$"
},
fn = function(matches)
return {

View file

@ -296,6 +296,16 @@
:skill %3
:avoidance-method :absorb)}
{:regex #"^(.+?) (?:absorb|absorbs) your (.+)\.$"
:id :skill-absorb-2-self
:logfmt :skill-absorb-2-self
:event :skill-avoided-by-target
:args #(hash-map
:target-name %1
:skill %2
:source-name "you"
:avoidance-method :absorb)}
; i don't think target is ever "you" for this one
{:regex #"^(.+?)'s (.+) was resisted by (.+)\.$"
:id :skill-resist-2

View file

@ -505,6 +505,20 @@
:skill "Unit Test's Attack"
:avoidance-method :absorb})))
(deftest skill-absorb-2-self
(is (valid-matcher? (get-matcher regex-matchers :skill-absorb-2-self)))
(is (= (parse-line "2/7 22:35:41.365 You absorb your Poisonous Blood." options)
{:id :skill-absorb-2-self
:logfmt :skill-absorb-2-self
:event :skill-avoided-by-target
:line "2/7 22:35:41.365 You absorb your Poisonous Blood."
:timestamp (parse-log-timestamp "2/7 22:35:41.365" options)
:target-name owner-char-name
:source-name owner-char-name
:skill "Poisonous Blood"
:avoidance-method :absorb})))
(deftest skill-resist-2
(is (valid-matcher? (get-matcher regex-matchers :skill-resist-2)))