Bug - Fixed Modifier Maximizer lists industrial strength starch twice

When maximizing for mox, the maximizer lists industrial strength starch twice. Using it once removes both from the list, so I don't think it's actually trying to use two - just trying to use it twice.

(As of r15381.)
 

Veracity

Developer
Staff member
There is an item:

Code:
industrial strength starch	Effect: "Industrial Strength Starch", Effect Duration: 20
which produces an effect:

Code:
Industrial Strength Starch	Muscle: +20, Mysticality: +20, Moxie: +20
Obviously, only the effect does anything that the maximizer could possibly care about.
 

Veracity

Developer
Staff member
...which is, of course, the problem.

Maximizer.maximize:

Code:
		Iterator<String> i = Modifiers.getAllModifiers();
		while ( i.hasNext() )
		{
			String name = i.next();
			if ( !EffectDatabase.contains( name ) )
			{
				continue;
			}
EffectDatabase.contains:

Code:
	public static final boolean contains( final String effectName )
	{
		return Arrays.binarySearch( EffectDatabase.canonicalNames, StringUtilities.getCanonicalName( effectName ) ) >= 0;
	}
The Effect Database "contains" both the lower-case and the capitalized version, since they are equal - when the names are canonicalized.
 
Top