Bug - Fixed Scrolls are incorrectly thought to be damaging

Theraze

Active member
When you use scrolls to delevel enemies, the damage parser thinks that the scroll number is its damage. Giving results like the following relay window... a slight bit of damage compared to the 8 hp estimated the turn before.
You're fighting a vampire clam
HP: -33390, Atk: 20, Def: 18
Drops: vampire pearl (35 pp only)

You hand the 33398 scroll to your opponent. It unrolls it, reads it, and looks slightly confused by it. Then it tears it up and throws the bits into the wind.
It tries to drain your sweet ichor, but you won't let it get its icky fangs into you.
 
Someone else actually mentioned it and I checked and sure enough, it showed up like that... not sure exactly what it needs to fix... not sure which part of the damage parser is matching on it. Appears that it's the part of PHYSICAL_PATTERN that matches on "to your opponent" but doesn't have the right avoidances yet... not sure what it needs, maybe something like changing line 3459 (in my code), this:
Code:
if ( m.group( 4 ).equals( "shambles up " ) )
to
Code:
if ( if ( m.group( 4 ).equals( "shambles up " ) || m.group( 4 ).equals( "scroll " ) )
or something like that... I unfortunately screwed up and overdrank early today, so I can't test until tomorrow.

Edit: Updated the above to the correct (4) instead of (3), and using equals instead of startsWith for better accuracy. This works now. Attaching patch.
 

Attachments

Last edited:
Put the patch that worked during my testing yesterday attached to the last post. Did in fact need the space after scroll, just as it was after shambles up. Verified that it was matching physical, not elemental damage.
 
Back
Top