Bug - Fixed Maximizer fails to equip one of a single-equip accessory type when requested.

Nifft

Member
Example:

maximize 100 HP, +equip bejeweled pledge pin

Result:

Maximizing...
56 combinations checked, best score 102200.0
Putting on bejeweled pledge pin...
You may only equip one of those at a time.
Unable to meet all requirements via equipment changes.
See the Modifier Maximizer for further suggestions.

Why would someone explicitly request an item like that you ask? Because it's part of an outfit and the entire original maximize request is actually "100 HP, +outfit frat warrior" which using Slyz's little algorithm to avoid both +outfit and +equip in a single maximize request ended up with a "+equip bejeweled pledge pin" in the request.

thanks,
~ Nifft
 

jasonharper

Developer
This would have been a lot more useful with before & after equipment lists - I'm guessing that you already had a bejeweled pledge pin on, in a different slot than where the Maximizer was trying to put it?

By the way, "maximize 100 HP" is kind of pointless, that's exactly the same request as just "maximize HP".
 

Nifft

Member
*sigh* Just spent 10 minutes creating a long post with all the pre-post equipment with multiple examples.... hit Post... and it didn't??

Abbreviated version: the issue occurs whether or not I'm wearing one to start with. I can replicate the issue with "outfit birthday suit;maximize HP, equip bejeweled pledge pin". The post equipment list claims to be wearing 2 of the pins and has accessory slot 3 blank. A session refresh shows just one pin worn and two blank accessory slots.

thanks,
~ Nifft
 

Feliks

New member
I think the problem is that +equip bypasses the check on SINGLE modifier. If you reorder the following code fragments, the issue goes away.)

Fragment 1:
Code:
					if ( this.posEquip.contains( item ) )
					{
						item = item.getInstance( count | Evaluator.AUTOMATIC_FLAG );
						break gotItem;
					}
Fragment 2:
Code:
					Modifiers mods = Modifiers.getModifiers( name );
					if ( mods == null )	// no enchantments
					{
						mods = new Modifiers();
					}
					
					if ( mods.getBoolean( Modifiers.SINGLE ) )
					{
						count = (count & ~Evaluator.TOTAL_MASK) | 1;
						item = item.getInstance( count );
					}

This is all within the enumerateEquipment method.
 
Top