Bug - Fixed Morphing monsters no longer recognized by Mafia

heeheehee

Developer
Staff member
I'm not sure when this started happening, but I noticed it for the first time today when fighting some tomb rat kings.

[1] The Outskirts of Cobb's Knob
Encounter: untouchable Knob Goblin Barbecue Team
Round 0: heeheehee wins initiative!
You lose 1 hit point
Round 1: heeheehee casts CLEESH!
Round 2: heeheehee attacks!
Round 3: Knob Goblin Barbecue Team takes 85 damage.
 
No, I'm bug reporting the fact that the monster should now be a frog.

edit: I have an old log that has this:
Round 3: heeheehee uses the rock band flyers and uses the tangle of rat tails!
Round 4: your opponent becomes a tomb rat king!

More recent logs look like
Round 2: heeheehee uses the tangle of rat tails and uses the rock band flyers!
Round 3: heeheehee executes a macro!

Maybe these aren't totally related. Maybe this should really be a feature request to detect that your opponent can change mid-combat and reflect this in last_monster() and friends.

Maybe what grabbed my attention earlier was by reversing the order of operations, Mafia doesn't recognize that my opponent became a tomb rat king.

another edit:
[2112] The Middle Chamber
Encounter: tomb rat
Round 0: sleepyone wins initiative!
Round 1: sleepyone uses the tangle of rat tails!
Round 2: sleepyone attacks!
Round 3: tomb rat takes 171 damage.
You lose 20 hit points
Still no morphing message, so Mafia still doesn't recognize anything happened.
 
Last edited:
If you can get a DEBUG log for the round of the fight where it does the morphing, I'd appreciate it. Thanks.
 
Sure.

edit: I think
Code:
<script>newpic("http://images.kingdomofloathing.com/adventureimages/tombratking.gif", "a tomb rat king",200,200);</script>
might be relevant? I'm not sure why CLEESH_PATTERN isn't matching, though. That block of code probably just isn't being run.
 

Attachments

Last edited:
There is a secondary issue (KoL bug) related to this and OCRS, namely that the new set of modifiers simply isn't available without a new page refresh. I just filed that bug report, so that might be more work to do when it gets fixed.
 
This has been broken for a long time - ever since I extracted processing HTML tables on the fight page into its own method. For tables that do NOT contain an image, we checked for things like monsters taking damage, gaining or losing stats, and gaining level, but if it was not one of those, we didn't know what to do - and we told our caller to not bother trying to process the child nodes of the table. As a result, we no longer tried to parse the "script" node using the CLEESH_PATTERN that you pointed out.

I fixed this and tested it with your log and also with a multi using CLEESH. In both cases, it now says "your opponent turns into an xxx" and sets the next monster.

If, at some point, it says "your opponent turns into an annoying, solid gold frog" (for example) - and gives us the data to parse the attributes - we'll need to handle that. For now, if it simply shows you the attributes on a page refresh, we're out of luck, since we only process attributes on round 0 of the fight, when we first see the monster.

Let's see how they respond to your bug report - and feel free to open another bug report here to discuss it. For now, I fixed the long-standing breakage that you reported.

Revision 15858
 
Fantastic, thanks! I was pretty sure it wasn't related to OCRS, since I first saw it with just tomb rats, and yeah, I'll definitely follow up if CLEESHed monsters start getting their own adjectives injected via javascript.
 
Back
Top