test war report
This commit is contained in:
parent
e0bf821444
commit
bb8ba76404
@ -2,7 +2,7 @@
|
||||
{
|
||||
"prio": 5000,
|
||||
"descn": "Player war report",
|
||||
"rule": "^(?P<Castle>[🐉🦅🐺🦈🦌🥔🌑])(\\[(?P<Guild>[A-Z0-9]{1,3})\\]){0,1}(?P<User>([A-Za-z0-9 ]*)) ⚔:(?P<Attack>[0-9]+)(?P<AttackMod>\\((-|\\+)[0-9]+\\)){0,1} 🛡:(?P<Defense>[0-9]+) Lvl: (?P<Level>[0-9]+)\\nYour result on the battlefield:\\n(🔥Exp: (?P<Exp>[0-9]+)){0,1}(\\n)*(💰Gold: (?P<Gold>\\-{0,1}[0-9]+)){0,1}(\\n)*(📦Stock: (?P<Stock>\\-{0,1}[0-9]+)){0,1}(\\n)*(❤️Hp: (?P<HP>\\-[0-9]+)){0,1}(\\n)*((?P<Stamina>(🔋Stamina restored))){0,1}(\\n(?P<Crit>(⚡Critical strike))){0,1}$",
|
||||
"rule": "^(?P<Castle>[🐉🦅🐺🦈🦌🥔🌑])(\\[(?P<Guild>[A-Z0-9]{1,3})\\]){0,1}(?P<User>([A-Za-z0-9 ]*)) ⚔:(?P<Attack>[0-9]+)(?P<AttackMod>\\((-|\\+)[0-9]+\\)){0,1} 🛡:(?P<Defense>[0-9]+) Lvl: (?P<Level>[0-9]+)\\nYour result on the battlefield:\\n(🔥Exp: (?P<Exp>[0-9]+)){0,1}(\\n)*(💰Gold: (?P<Gold>\\-{0,1}[0-9]+)){0,1}(\\n)*(📦Stock: (?P<Stock>\\-{0,1}[0-9]+)){0,1}(\\n)*(❤️Hp: (?P<HP>\\-[0-9]+)){0,1}(\\n)(?P<Extra>(?s:.*))$",
|
||||
"msg_type": "msg_report_ack",
|
||||
"chat_id": 0,
|
||||
"user_id": 0
|
||||
|
1
msg.go
1
msg.go
@ -175,6 +175,7 @@ func parseSubTypeMessageStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWar
|
||||
|
||||
func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageReportAck, error) {
|
||||
cwm := ChatWarsMessageReportAck{}
|
||||
log.Printf("parseSubTypeMessageReport : Extra : %s\n", r.ReplaceAllString(m.Text, "${Extra}"))
|
||||
/*
|
||||
log.Printf("parseSubTypeMessageReport : War report identified\n")
|
||||
log.Printf("parseSubTypeMessageReport : Castle : %s\n", r.ReplaceAllString(m.Text, "${Castle}"))
|
||||
|
Loading…
Reference in New Issue
Block a user