Bug - Fixed Mafia only registers a 1/3 hit when using a Special Clip with a mercenary pistol

fredg1

Member
Title says it.

Only saw this with Dreadsylvania bosses (Count Drunkula, The Great Wolf of the Air, Mayor Ghost (not Falls-From-Sky; I can't see him) ) since I only ever use them against those.
 

fredg1

Member
Managed to get a Debug log with a hot bugbear (thought it wouldn't work because I had it researched with the Monster Manuel (bought it yesterday); while it's HP got corrected by the Monster Manuel's info, the GCLI clearly tells only 1 hit was registered by mafia)

I use ezandora's guide... sorry in advance :(

(searching for Retrieved: https://www.kingdomofloathing.com/fight.php? should help)
 

Attachments

  • DEBUG_20190827.txt
    840.6 KB · Views: 16

Veracity

Developer
Staff member
Guide certainly does bloat logs. But I can extract what I need, so, np.

I'll see what I can figure out. It's actually fairly easy to debug (most) fight issues, since I can "test load" an HTML page and then use "test fight" to process it.
 

Veracity

Developer
Staff member
For reference, here is the HTML tree for the special round:

Code:
    <table>
      <tbody>
        <tr>
          <td>
            <p>
              <center>
                <table>
                  <tbody>
                    <tr>
                      <td align="center" valign="center">
                        <img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/ammo.gif" width="30" height="30" title="ammo" alt="ammo">
                      <td valign="center">
                        You slam the clip into the pistol and begin firing wildly.  One shot hits him for
                        <font color="blueviolet">
                          <b>
                            333
                        damage.
    <table>
      <tbody>
        <tr>
          <td>
            <p>
              <center>
                <table>
                  <tbody>
                    <tr>
                      <td align="center" valign="center">
                        <img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/ammo.gif" width="30" height="30" title="ammo" alt="ammo">
                      <td valign="center">
                        After a few more shots, a second round hits him, dealing
                        <font color="blueviolet">
                          <b>
                            333
                        damage.
    <table>
      <tbody>
        <tr>
          <td valign="top">
            <img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/ammo.gif" width="30" height="30" alt="special clip: squelchers" title="special clip: squelchers">
          <td valign="center">
            <table>
              <tbody>
                <tr>
                  <td>
                    <p>
                      After several more misses, you manage to hit him with the last bullet, dealing an additional
                      <font color="blueviolet">
                        <b>
                          333
                      damage.
They all look identical. But, here is the result logging:

Code:
Round 2: hot bugbear takes 333 damage.
Parsing result: You lose 24 hit points
Round 2: You lose 24 hit points
Processing result:  HP: -24
Processing result: special clip: squelchers (-1)
I don't have time to dive further into this right now, but this log will give me everything I need.

Code:
[color=green]> test load mercenary-fight.txt[/color]

Read 31,757 bytes into a 31,756 character string

[color=green]> test fight 1[/color]

Round 2: hot bugbear takes 333 damage.
Round 2: You lose 24 hit points
 

Veracity

Developer
Staff member
They are not all the same, actually.

Code:
                <table>
                  <tbody>
                    <tr>
                      <td align="center" valign="center">
                        <img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/ammo.gif" width="30" height="30" title="ammo" alt="ammo">
                      <td valign="center">
                        You slam the clip into the pistol and begin firing wildly.  One shot hits him for
                        <font color="blueviolet">
                          <b>
                            333
                        damage.
...
                <table>
                  <tbody>
                    <tr>
                      <td align="center" valign="center">
                        <img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/ammo.gif" width="30" height="30" title="ammo" alt="ammo">
                      <td valign="center">
                        After a few more shots, a second round hits him, dealing
                        <font color="blueviolet">
                          <b>
                            333
                        damage.
...
            <table>
              <tbody>
                <tr>
                  <td>
                    <p>
                      After several more misses, you manage to hit him with the last bullet, dealing an additional
                      <font color="blueviolet">
                        <b>
                          333
                      damage.
Only the last one, where the text is in a "p" tag, rather than directly under a "td" tag registered.
 

Veracity

Developer
Staff member
OK, with revision 19515 :

Code:
[color=green]> test load mercenary-fight.txt[/color]

Read 31,757 bytes into a 31,756 character string

[color=green]> test fight 1[/color]

Round 2: hot bugbear takes 333 damage.
Round 2: hot bugbear takes 333 damage.
Round 2: hot bugbear takes 333 damage.
Round 2: You lose 24 hit points
 

Veracity

Developer
Staff member
Since mafia only registers 1/3 hits, does it mean that the two first SHOULD have that <p> then?
KoL is not consistent with the HTML it generates. Its decision to put some text right into the "td" tag and some into a "p" within the "td" is inconsistent, but not incorrect HTML, so there is no "SHOULD" about it. It's apparently rare, since I had to add code to support it.

We process KoL's HTML through HTMLCleaner - which we recently updated, causing a number of issues we had to fix. This is quite possibly something that the older version was able to "fix" for KoL but the newer one does not.
 
Top