This commit is contained in:
shoopea 2019-05-26 00:07:20 +08:00
parent e0cd81130e
commit 945520ef36

View File

@ -115,16 +115,9 @@ func resetMsgParsingRules() {
`(🎖Attack leaders: ([🐉🦅🐺🦈🦌🥔🌑])([^,]+)(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}){0,1}(\\n){0,1}` +
`(🎖Defense leaders: ([🐉🦅🐺🦈🦌🥔🌑])([^,]+)(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}){0,1}(\\n){0,1})(\\n)*)*` +
`$")
,(5000, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war report with trade union", "^(🏠Trade union news:){0,1}(\\n)*` +
`(?P<Union>((([A-Z][a-z]+ [A-Z][a-z]+) was ((easily defended|defended successfully|breached.|easily breached.|closely breached.))( Attackers have pillaged union for ([0-9]+) stock){0,1}:\\n` +
`((.Attack+)(\\n)){0,1}` +
`((.Defense+)(\\n)){0,1}` +
`)(\\n)*)+)` +
`(🎪State of exclusive rights:\\n){0,1}` +
`(?P<Fair>((([A-Z][a-z]+ [A-Z][a-z]+) ((was protected)|(belongs to [A-Z][a-z]+ [A-Z][a-z]+:))\\n` +
`((.Attack+)(\\n)){0,1}` +
`((.Defense+)(\\n)){0,1}` +
`)(\\n)*)+)(\\n)*$")
,(5000, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep with both", "^(🏠Trade union news:\n)(?P<Union>(?s:.*))(🎪State of exclusive rights:\n)(?P<Fair>(?s:.*))$")
,(4900, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep only union", "^(🏠Trade union news:\n)(?P<Union>(?s:.*))(🎪State of exclusive rights:\n){0}(?P<Fair>(?s:.*))$")
,(4900, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep only fair", "^(🏠Trade union news:\n){0}(?P<Union>(?s:.*))(🎪State of exclusive rights:\n)(?P<Fair>(?s:.*))$")
;`)
failOnError(err, "resetMsgParsingRules : populate table msg_rules")
}