I'm on KoLMafia v15465 and it seems like the revamped modifiers have broken being able to request speculative ones or at least I can't figure out the magic keyword used to query them.
Here are some tests:
In the CLI:
1) whatif equip viking helmet
2) ash numeric_modifier("_spec", "Buffed HP Maximum")
Result: 0.0
Expected result: Current HP + 1.
I've also tried: numeric_modifier("_spec:Buffed HP Maximum"), numeric_modifier(":_spec", "Buffed HP Maximum") and a plethora of other choices.
I think the problem may be due to SpeculateCommand.java and Maximizer.java calling Modifiers.overrideModifier like this:
It looks like other calls to this function were prefixed with "Generated:" although trying: numeric_modifier("Generated:_spec", "Buffed HP Maximum") results in a substring index error of -3.
That error seems to be caused by this line in RuntimeLibrary.java getModifierName:
I think in this case we're trying to extract the tail end of the input string although Java's substring takes endIndex and not length as its 2nd argument.
Here are some tests:
In the CLI:
1) whatif equip viking helmet
2) ash numeric_modifier("_spec", "Buffed HP Maximum")
Result: 0.0
Expected result: Current HP + 1.
I've also tried: numeric_modifier("_spec:Buffed HP Maximum"), numeric_modifier(":_spec", "Buffed HP Maximum") and a plethora of other choices.
I think the problem may be due to SpeculateCommand.java and Maximizer.java calling Modifiers.overrideModifier like this:
Code:
Modifiers.overrideModifier( "_spec", mods );
It looks like other calls to this function were prefixed with "Generated:" although trying: numeric_modifier("Generated:_spec", "Buffed HP Maximum") results in a substring index error of -3.
That error seems to be caused by this line in RuntimeLibrary.java getModifierName:
Code:
return name.substring( index, name.length() - index );
I think in this case we're trying to extract the tail end of the input string although Java's substring takes endIndex and not length as its 2nd argument.