Bug - Fixed Maximizer doesn't like outfits with weapons

Irrat

Member
When there's an outfit with a weapon, maximizer avoids that weapon even when the outfit is the only solution.

Such as Gel Noob, Gladiatorial Glad Rags is the only suitable outfit that grants adventures; but as it involves a weapon, Maximizer will avoid it if you are not already holding the weapon and claim there's no solutions available.

Though when there's only one piece missing, it will then find it and say that item is worth the +6 adventures. Which is interesting because it seems to be the only time the outfit bonus will actually show without selecting the items to equip.

This test fails for that reason, and because of the use of "addItem" instead of "canUse" which means the test never has the stats to equip it.

TL;DR

Equip Birthday Suit. Maximize adventures. No useful results.

Equip Birthday Suit. Equip Madius. Maximize adventures. You should wear the Gladiatorial Glad Rags outfit.
 

Ryo_Sangnoir

Developer
Staff member
Nice job tracking down the actual problem!

> Which is interesting because it seems to be the only time the outfit bonus will actually show without selecting the items to equip.

This is expected: Mafia compares the difference between equipping that single thing and not equipping it, which includes the outfit bonus.
 

Ryo_Sangnoir

Developer
Staff member
In Evaluator.java, line 2095, if an outfit item is a 1-handed weapon, its slot is set to "WEAPON_1H" (14), which in slot language is apparently "STICKER3". This means that in line 2125, the outfit isn't picked up as being present when comparing the score, so it evaluated unfavourably to not wearing anything.

Not found: why the slot change? Probably because if not done, it could be equipped offhand or on a familiar.
Also not found: where's the code that evaluates whether something's an outfit or not?
 
Top