Bug - Fixed Equipment with "unarmed" breaks +item calculation when a weapon is equipped

lostcalpolydude

Developer
Staff member
I have some buffs and some +item gear on (including weapon/offhand), currently displaying as +389.91%. If I equip a shining halo in a previously empty slot, mafia displays +80% item. Replacing it with a frosty halo changes to +105% item (the halo +item is counted when it should not be). Keeping the frosty halo on and taking off my weapon/offhand changes the display to +314.91% item (I had a lot of +item in my weapon/offhand, so this is correct).

Equipping my weapon/offhand again, and moving the frosty halo from slot 3 to slot 1 gives +65% item. Based on "modtrace item", it looks like modifiers through the slot with the halo equipped are counted (hypnodisk and sticker sword are ignored, but bottle-rocket crossbow is counted). Passive skills and effects are ignored, but the quartet is counted.
 

slyz

Developer
I can't test this right now, but I suspect that line 1490 of Modifiers.txt
PHP:
// Unarmed modifiers apply only if the character has no weapon or offhand
boolean unarmed = this.getBoolean( Modifiers.UNARMED );
should be
PHP:
// Unarmed modifiers apply only if the character has no weapon or offhand
boolean unarmed = mods.getBoolean( Modifiers.UNARMED );

I think the difference is that
  • this.getBoolean( Modifiers.UNARMED ) is like doing boolean_modifier( "Unarmed" ), and will be true anytime you have an item with the "Unarmed" modifier equipped.
  • mods.getBoolean( Modifiers.UNARMED ) is like doing boolean_modifier( "shining halo", "Unarmed" ), and will be true if the item currently being considered has the "Unarmed" modifier.

I'm a little hazy about how Modifiers work, so I may be mistaken, but at least it's something you can test.
 
Top