Bug - Fixed KGB modifiers not reporting HP regen

ckb

Minion
Staff member
from modifiers.txt:
Item Kremlin's Greatest Briefcase Muscle: +10, Mysticality: +10, Moxie: +10, Maximum HP: +25, Maximum MP: +25, Weapon Damage Percent: +25, Initiative: +25, MP Regen Min: 5, MP Regen Max: 10, Single Equip, HP Regen Min: 5, HP Regen Max: 10


but this:

> ash string_modifier("Item:Kremlin's Greatest Briefcase","Evaluated Modifiers");

Returned: Muscle: +10, Mysticality: +10, Moxie: +10, Maximum HP: +25, Maximum MP: +25, Weapon Damage Percent: +25, Initiative: +25, MP Regen Min: 5, MP Regen Max: 10, Single Equip



It seems like the "HP Regen Min: 5, HP Regen Max: 10" is not being counted
 

lostcalpolydude

Developer
Staff member
For anyone taking the time to look into it, this is an issue when you log in with it set up that way (and the briefcase's enchantments are checked), not when you switch to that state (which works properly).
 

Veracity

Developer
Staff member
Using Ezandora's script, I can get this via "briefcase enchantment weapon init regen".
Having done that:

Code:
[color=green]> ash string_modifier("Item:Kremlin's Greatest Briefcase","Evaluated Modifiers");[/color]

Returned: Muscle: +10, Mysticality: +10, Moxie: +10, Maximum HP: +25, Maximum MP: +25, Initiative: +25, Single Equip, Weapon Damage Percent: 25, HP Regen Min: 5, HP Regen Max: 10, MP Regen Min: 5, MP Regen Max: 10
Logging out and logging in again, I get this:

Code:
[color=green]> ash string_modifier("Item:Kremlin's Greatest Briefcase","Evaluated Modifiers");[/color]

Returned: Muscle: +10, Mysticality: +10, Moxie: +10, Maximum HP: +25, Maximum MP: +25, Weapon Damage Percent: +25, Initiative: +25, MP Regen Min: 5, MP Regen Max: 10, Single Equip
So, it is as lost says, and I have a briefcase configured suitably to debug it.
 

Veracity

Developer
Staff member
As expected, there is malformed HTML in the item description for that item.

Revision 19479
 

Veracity

Developer
Staff member
I'm going to have to revisit this, since that same "malformed" HTML is used elsewhere in a context where it is not "malformed".
 

Veracity

Developer
Staff member
I'm going to bump this.

I am still fixing things relating to parsing item & effect descriptions, since we depend on those working correctly for auto-detecting new stuff without requiring us to submit updates to data files.
 

Veracity

Developer
Staff member
So the issue is this:

Code:
<font color=blue>
  All Attributes +10<br>
  Maximum HP/MP +25<br>
  <font color="blue">
    Weapon Damage +25%<br>
    +25% Combat Initiative<br>
    Regenerate 5-10 MP per Adventure<br>
    Regenerate 5-10 HP per Adventure
  </font><br>
  Lets you banish enemy agents with tranquilizer darts
</font>
In an an item description, KoL puts all the enchantments inside a blue font tag.
It sticks a <br> tag between each enchantment.

The KGB has a set of "fixed" enchantments and a set of "variable" (configurable) enchantments.

Notice that the configured enchantments are treated exactly that way: inside a "blue" font tag, with a <br> separating each one.
Then that font block is stuck into the middle of the fixed enchantments as if it is an enchantment by itself.

I'll see what I can do to recognize that situation; the code as written does not expected embedded font blocks in exactly that way.
The tricky part is that it DOES expect embedded font blocks for elemental things. For example, the 8-billed baseball hat deals prismatic damage:

Code:
<font color=blue>
  Muscle +15%<br>
  Combat Initiative +30%<br>
  +5 <font color=gray>Spooky Damage</font><br>
  +5 <font color=green>Stench Damage</font><br>
  +5 <font color=red>Hot Damage</font><br>
  +5 <font color=blue>Cold Damage</font><br>
  +5 <font color=blueviolet>Sleaze Damage</font><br>
   <br>
</font>
 
Last edited:

Veracity

Developer
Staff member
Revision 19587 should do it. I verified with my Kremlin's Greatest Briefcase, as well as running checkitems and checkeffects and verifying I hadn't broken anything else.
 
Top