Bug Cannot choose slot to equip Powerful Glove

ckb

Active member
If a Powerful Glove skill is in a mood and the glove is not equipped, Mafia will sometimes fail with:
Cannot choose slot to equip Powerful Glove.
That skill is unavailable.
Mood failed to cast 1 CHEAT CODE: Invisible Avatar: That skill is unavailable.
KoLmafia declares world peace.


This seems to be a problem with whatever magic was done in r19977
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Next time it happens, post here with a list of the 3 accessories you had equipped
 

ckb

Active member
acc1 astral mask, acc2 ghost of a necklace, acc3 hewn moon-rune spoon

acc1: hewn moon-rune spoon, acc2: astral mask, acc3: Beach Comb
 
Last edited:

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
acc1 astral mask, acc2 ghost of a necklace, acc3 hewn moon-rune spoon

acc1: hewn moon-rune spoon, acc2: astral mask, acc3: Beach Comb
Well these are not what I expected at all, you've got plenty of valid switch targets there. I'll try to catch it happening myself.
 

dark_adonis

New member
TLDR: Looks like this might be an issue where something isn't accounted for when predicting equipment change (for me suspect Iunion Crown enchantments). Since we are comparing the predicted change vs actual state this leads to a misleading comparison (actual has a higher MP than predicted).

Trying to work through a solution the best I could think of would be to instead focus on differences rather than on real value of MP.
(Max MP - Current MP) vs Calculated current max MP - Predicted max MP
then Calculated current max HP - Predicted max HP

I whipped up some code, but already spent the power on my glove so need to check it later.




Adding a bit of detail it looks like there is something odd around speculating.

Testing with
acc1: ghost of a necklace
acc2: hewn moon-rune spoon
acc3: Beach Comb

> ash my_hp()
Returned: 980

> ash my_mp()
Returned: 1610

> whatif equip acc1 Powerful Glove
Buffed HP Maximum 988.00 (+20.00)
Buffed MP Maximum 1,577.00 (+10.00)

Getting into birthday suit gives me something reasonable
> ash my_hp()
Returned: 488

> ash my_mp()
Returned: 1063

> whatif equip acc1 Powerful Glove
Buffed HP Maximum 508.00 (+20.00)
Buffed MP Maximum 1,073.00 (+10.00

When I put on Iunion Crown:
> ash my_maxhp()
Returned: 509

> ash my_maxmp()
Returned: 1118

Buffed HP Maximum 521.00 (+20.00)
Buffed MP Maximum 1,095.00 (+10.00)

Everything else seems to be working properly.

One more note:
KoL Mafia says Iunion Crown (starting unequipped)

whatif equip iunion crown:
Initiative 241.00 (+10.00)
Item Drop 85.00 (+10.00)
Damage Absorption 650.00 (+200.00)
Moxie 66.00 (+10.00)
Muscle 72.00 (+10.00)
Mysticality 72.00 (+10.00)
Buffed Muscle 426.00 (+10.00)
Buffed Mysticality 559.00 (+10.00)
Buffed Moxie 417.00 (+10.00)
Buffed HP Maximum 1,028.00 (+20.00)
Buffed MP Maximum 1,624.00 (+28.00)


Going to my inventory says:

Muscle +16
Mysticality +25
Moxie +19
+12% Item Drops from Monsters
+6% Meat from Monsters
Slight Hot Resistance (+1)
Slight Spooky Resistance (+1)
Slight Stench Resistance (+1)
Stunning Sleaze Resistance (+7)
+10% Combat Initiative
+3 Cold Damage
+6 Spooky Damage
+6 Stench Damage
+18 Sleaze Damage


When I equip it actually reflects the latter/equipment screen version
 
Last edited:

dark_adonis

New member
I think I have a patch for this.
Added a couple lines to speculate on old outfit.
Calculated gap in MP (Max MP - current MP)
Calculated change in max MP (Calculated new max MP - Calculated old max MP)
if( gap + change < 0): Fail

Calculated change in max HP: (Calculated new max MP - Calculated old max MP)
if change is negative: fail

Not calculated: number of songs
 

Attachments

  • debug_powerful_glove_issue.patch
    1.4 KB · Views: 1
Top