Bug - Fixed Prefer non-breakable over breakable equipment in the maximizer

ereinion

Member
When two pieces of equipment gives the same effect, like e.g. the astral pet sweater and sugar shield, could the maximizer prefer the equipment which does not break if all other things are equal? At the moment I get the sugar shield suggested unless I already have the pet sweater equipped.
 

Theraze

Active member
If "breakable" is an official item modifier, then it could simply be put as the first entry in the tiebreaker with a negative value.
 

Darzil

Developer
I guess the real question is why isn't the code added to prefer unbreakables working. There is code in MaximizerSpeculation.compareTo() which should prefer it.
 

ereinion

Member
Well, I usually use -tie when maximizing, so it could be because of that, perhaps? It is something I probably should have checked before posting this thread :p

Though it seems removing -tie from the maximizer string isn't enough to make it prefer the astral sweater:
upgQ8k2ZTwqNACdVfN_jdw.png
 

Darzil

Developer
So, running some trials, looks like it will prioritise astral pet sweater over sugar shield IF shield isn't already equipped, and IF astral pet sweater isn't on another familiar.

Can push the check for breakable a bit higher in the tiebreakers, though.

Haven't got my dev environment up after (yet another) PC build, but hoping to do that tomorrow.
 

Darzil

Developer
So, there were two issues.
One was the breakable check being broken, so it was always 0.
Two was that breakable and rollover effects were only checked after simplicity (not changing equipped items), and I think that this is probably the wrong prioritisation.

r18300

Note - Changed from Feature to Bug, as this should have worked.
 
Top