Bug - Fixed r26329: camelSpit not updating at end of combat

From the end of a recent combat, in my log
Code:
After Battle: You hear a loud schlurrrrrk! noise, and turn to see Nebraska at low weight sucking the liquid out of a bottle of Haterade he found somewhere. (3% full)
You acquire an item: psychokinetic energy blob (5)
You acquire an item: frigid derringer
After Battle: Bustin' that ghost made you feel really good! (+20 Stats)
After Battle: Nebraska at low weight smiles at you. It isn't a cute smile. It's more of a "someone brought a camera to the mandatory office party" smile, crossed with a "I could stomp you into mulch and no one would ever find you" smile. (+7 Stats)
After Battle: Nebraska at low weight peers at a tactical map of the area and pushes some little toy soldiers around it with a bent stick. (+4 Mysticality Stats)
After Battle: You gain 10 Fortitude
You gain a Muscle point!
After Battle: You gain 26 Mysteriousness
You gain a Mysticality point!
You gain a Level!
After Battle: You gain 11 Sarcasm
You gain a Moxie point!
This combat did not cost a turn
Preference questPAGhost changed from started to unstarted
Preference ghostLocation changed from The Haunted Kitchen to
Preference manorDrawerCount changed from 0 to 4

I'm assuming that this commit from PR #690 is to blame, although I can't for the life of me see why.

EDIT: upon reflection, it may be prudent to look for camelfam_right.gif instead of camelfam_left.gif, just on the basis that the rightmost image is the one that immediately precedes the message in question.
 
Last edited:

Veracity

Developer
Staff member
EDIT: upon reflection, it may be prudent to look for camelfam_right.gif instead of camelfam_left.gif, just on the basis that the rightmost image is the one that immediately precedes the message in question.
The image is three images inside a "span". When we walk the HTML of the fight and ask "what is the first IMG node I (recursively) find in this table?" for the cases I looked at, it is camelfam_left. So, "closest to" the text shouldn't be relevant.

But, I'll get a DEBUG log and take a look.

Edit: from my existing save DEBUG log, this is the HTML:

Code:
<table><tr><td align=center valign=center><span style="display: block;position: relative; height: 30px; width: 70px" ><img src="https://d2uyhvukfffg5a.cloudfront.net/otherimages/camelfam_left.gif" width=20 height=30 border=0><img src="https://d2uyhvukfffg5a.cloudfront.net/otherimages/camelfam_middle.gif" width=15 height=30 border=0><img src="https://d2uyhvukfffg5a.cloudfront.net/otherimages/camelfam_right.gif" width=25 height=30 border=0></span></td><td valign=center>You hear a loud <i>schlurrrrrk!</i> noise, and turn to see Gogarth sucking the liquid out of a dented beer keg he found somewhere.  And then another out of the handy helmet he's wearing. (63% full)</td></tr></table>
 

Veracity

Developer
Staff member
Looking at the code:

Code:
        boolean camelAction = status.camel && str.contains(status.familiarName);
        if (camelAction && status.logFamiliar) {
          // Melodramedary action
          FightRequest.handleMelodramedary(str, status);
        }
The handleMelodramedary is where camelSpit is tracked and the action is logged.
I assume "Nebraska at low weight" is the name of your camel?
Now, I don't see why is coded to only call that if you want to log familiar actions, since it is doing more than logging. Presumably, it could update the property and then only do the logging if you'd intentionally disabled it.
Take a look at the "logFamiliarActions" property?
 
`prefref logf` shows that logFamiliarActions is set to true. "Nebraska at low weight" is indeed the name of my camel--Nebraska is the only state with a unicameral legislature.

I don't see anything that would make status.camel different, and my familiar name hasnt' been changed since yesterday, when this was working.
 

Veracity

Developer
Staff member

Veracity

Developer
Staff member
As an aside, there is at least one more familiar whose image consists of multiple images: the Left-Hand Man.

Code:
                <table>
                  <tbody>
                    <tr>
                      <td align="center" valign="center">
                        <div style="position: relative; height: 50px; width: 30px">
                          <img style="position: absolute; left: -2px; bottom: 24px;" src="https://d2uyhvukfffg5a.cloudfront.net/itemimages/consnowglobe.gif" width="30" height="30" border="0">
                          <img style="position: absolute; left: 0; bottom: 0;" src="https://d2uyhvukfffg5a.cloudfront.net/otherimages/righthandbody.png" width="30" height="30" border="0">
                      <td valign="center">
                        Manny Frashins smacks your opponent in the torso with the KoL Con 13 snowglobe clutched in his... head...  It deals 5 damage.
That one is an item image on top of a familiar image, top to bottom, and the familiar image is the second one.

Here is how that was logged in my session log:

Code:
Round 2: caveman frat pledge takes 5 damage.
Next round:
Code:
Manny Frashins swats your opponent with the KoL Con 13 snowglobe, dealing 6 damage.
logged as:
Code:
Round 3: caveman frat pledge takes 1907 damage.
Round 3: caveman frat pledge takes 13 damage.
Round 3: Veracity wins the fight!

Didn't exactly parse/log that correctly.

I'm not sure I care enough to spend time on it.
 

c2t

Member
Related, probably: mafia does not seem to recognise camel spit use anymore.

r26328:
Code:
Round 2: You lose 1 hit point
Round 2: Zdrvst casts METEOR SHOWER!
You acquire an effect: Meteor Showered (1)
Round 3: You lose 1 hit point
Preference _meteorShowerUses changed from 1 to 2
Round 3: Zdrvst casts %FN, SPIT ON ME!!
Preference camelSpit changed from 100 to 0
Round 4: Sally the THICCamel obligingly -- maybe too obligingly -- spits in your face.
You acquire an effect: Spit Upon (15)

r26332, r26333, r26335:
Code:
Round 2: You lose 1 hit point
Round 2: Zdrvst casts METEOR SHOWER!
You acquire an effect: Meteor Showered (1)
Round 3: You lose 1 hit point
Preference _meteorShowerUses changed from 1 to 2
Round 3: Zdrvst casts %FN, SPIT ON ME!!
You acquire an effect: Spit Upon (15)

I.e. camelSpit is not set to 0 on spit use after r26328
 
Last edited:
Top