 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Jun 05, 2008 1:47 am
Damage Calculator: Pattern Matching |
So, Vigilante's pattern works for the most part
| Code: |
^(?>\[(?: \w+){1,4} \] )?(?>([\w'-]+) ){1,5}(@attack_type) (?>does )?(@damage_type) (?>things to )?(?>a |the )?(?>[\w'-]+[ !.]){1,5}
|
However, there is a line of 5 words:
| Quote: |
[ The Center of the Coliseum ] Ogmin's pierce injures Vandavar.
[ The Center of the Coliseum ] Ogmin's pierce injures Vandavar.
[ The Center of the Coliseum ] Vandavar's shocking bite misses Ogmin.
[ The Center of the Coliseum ] Vandavar's shocking bite injures Ogmin.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Ogmin's pierce injures Vandavar.
[ The Center of the Coliseum ] Ogmin's pierce misses Vandavar.
[ The Center of the Coliseum ] Vandavar's shocking bite misses Ogmin.
[ The Center of the Coliseum ] Vandavar's shocking bite wounds Ogmin.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Vandavar quaffs a vial of whale oil.
[ The Center of the Coliseum ] Vandavar's spell hits him.
[ The Center of the Coliseum ] Ogmin's pierce misses Vandavar.
[ The Center of the Coliseum ] Ogmin's pierce misses Vandavar.
[ The Center of the Coliseum ] Vandavar's shocking bite wounds Ogmin.
[ The Center of the Coliseum ] Vandavar's shocking bite wounds Ogmin.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Ogmin's kick hits Vandavar.
[ The Center of the Coliseum ] Ogmin's pierce injures Vandavar.
[ The Center of the Coliseum ] Vandavar's shocking bite wounds Ogmin.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Ogmin's pierce injures Vandavar.
[ The Center of the Coliseum ] Vandavar's shocking bite wounds Ogmin.
[ The Center of the Coliseum ] Vandavar's shocking bite wounds Ogmin.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Ogmin's kick hits Vandavar.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Ogmin's pierce injures Vandavar.
[ The Center of the Coliseum ] Vandavar's shocking bite mauls Ogmin.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Ogmin's kick injures Vandavar.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 7:30am [Day Time] [Elvish]>
[ The Center of the Coliseum ] Vandavar quaffs a potion of sanctuary.
[ The Center of the Coliseum ] Vandavar is surrounded by a white aura.
[ Western Coliseum Wall ] Vandavar's shocking bite mauls Ogmin. (22.5) dmg
Vandavar's shocking round: 11750.5
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 6:00am [Dawn] [Elvish]>
[ Western Coliseum Wall ] Vandavar appears to be blinded.
<1561/1561hp 1232/1232m 406/406mv 36891tnl 1082pq 240/390w 792g/483s
[The Northern Arena Stands (Upper Deck)] [D] 6:00am [Dawn] [Elvish]>
[ Western Coliseum Wall ] Ogmin's pierce misses Vandavar. (0) dmg
Ogmin's round: 11750.5
[ Western Coliseum Wall ] Ogmin's pierce misses Vandavar. (0) dmg
Ogmin's round: 11750.5
[ Western Coliseum Wall ] Vandavar's shocking bite wounds Ogmin. (18.5) dmg
Vandavar's shocking round: 11769
[ Western Coliseum Wall ] Vandavar's shocking bite wounds Ogmin. (18.5) dmg
Vandavar's shocking round: 11787.5
[ Western Coliseum Wall ] Vandavar's shocking bite mauls Ogmin. (22.5) dmg
|
You can see it work in the Western, but not the 5 word In the Center. So, I figured this should work:
| Code: |
^(?>\[(?: \w+){1,5} \] )?(?>([\w'-]+) ){1,5}(@attack_type) (?>does )?(@damage_type) (?>things to )?(?>a |the )?(?>[\w'-]+[ !.]){1,5}
|
But it did not, why? |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Jun 05, 2008 12:00 pm |
Also, for Oldguy, this is an output from that other damage calculator I showed you:
| Code: |
Name Dealt Taken
Melee Spells Total Melee Spells Vampy Total
Dam Flags Avg Hits Dam Flags Avg Hits
Throxten 10815 621 38 297 114 11550 2705 207 12 223 50 570 2393
Criosphinx 0 0 0 0 0 0 468 11 78 6 0 0 479
Phrunk 2625 207 13 215 0 2832 1232 128 20 61 114 414 1060
Spirit 80 0 10 8 0 80 7823 394 41 190 0 0 8217
Great sphinx 0 0 0 0 50 50 1292 88 32 40 0 0 1380
|
A bit messy... you can find it http://www.dsl-mud.org/forum/forum_posts.asp?TID=37013&PN=1
12th post down |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Jun 06, 2008 3:39 pm |
I'm getting the feeling that people are purposefully avoiding me...
|
|
|
|
 |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Jun 06, 2008 4:00 pm Re: Damage Calculator: Pattern Matching |
| chamenas wrote: |
You can see it work in the Western, but not the 5 word In the Center. So, I figured this should work:
| Code: |
^(?>\[(?: \w+){1,5} \] )?(?>([\w'-]+) ){1,5}(@attack_type) (?>does )?(@damage_type) (?>things to )?(?>a |the )?(?>[\w'-]+[ !.]){1,5}
|
But it did not, why? |
Not sure what the problem is. That pattern matches fine. |
|
|
|
 |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Jun 06, 2008 4:05 pm |
| chamenas wrote: |
Also, for Oldguy, this is an output from that other damage calculator I showed you:
| Code: |
Name Dealt Taken
Melee Spells Total Melee Spells Vampy Total
Dam Flags Avg Hits Dam Flags Avg Hits
Throxten 10815 621 38 297 114 11550 2705 207 12 223 50 570 2393
Criosphinx 0 0 0 0 0 0 468 11 78 6 0 0 479
Phrunk 2625 207 13 215 0 2832 1232 128 20 61 114 414 1060
Spirit 80 0 10 8 0 80 7823 394 41 190 0 0 8217
Great sphinx 0 0 0 0 50 50 1292 88 32 40 0 0 1380
|
A bit messy... you can find it http://www.dsl-mud.org/forum/forum_posts.asp?TID=37013&PN=1
12th post down |
You want your actual output to be in a table and everything like that? |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Jun 06, 2008 4:06 pm |
Not necessarily. That's just what I want in my output at the end, the information I want to be able to record.
|
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Jun 06, 2008 4:50 pm |
The vampy information isn't as important... in place of it I would like to do attack type, something like:
| Code: |
Dealt Taken
Damage | Number of Hits | Average | Total Damage | | Damage | Number of Hits | Average | Total Damage
Throxten Throxten
-- Shocking -- Beating
-- Fireball -- Maul
-- Chop -- Pierce
Criosphinx Criosphinx
-- Shocking
-- Chop
Phrunk Phrunk
-- Beating -- Chop
-- Maul -- Fireball
-- Shocking
Spirit Spirit
-- Pierce -- Chop
Great Sphinx Great Sphinx
-- Shocking
|
|
|
|
|
 |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Fri Jun 06, 2008 5:34 pm |
Someone stole Fang's avatar
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Jun 06, 2008 6:49 pm |
I couldn't help it, the bunnies are just so funny!
|
|
|
|
 |
|
|
|