Bug - Fixed Ghost dog chow breaks maximizer?

xKiv

Active member
Code:
> maximize -combat rate

Maximizing...
240 combinations checked, best score 30.00
Putting on Xiblaxian stealth cowl...
Equipment changed.
Removing items from closet...
You acquire an item: rusted-out shootin' iron
Wielding rusted-out shootin' iron...
Equipment changed.
Removing items from closet...
You acquire an item: rusted-out shootin' iron
Holding rusted-out shootin' iron...
Equipment changed.
Putting on Buddy Bjorn...
Equipment changed.
Putting on Xiblaxian stealth vest...
Equipment changed.
Putting on Xiblaxian stealth trousers...
Equipment changed.
Removing items from closet...
You acquire an item: Bram's choker
Putting on Bram's choker...
Equipment changed.
Removing items from closet...
You acquire an item: duonoculars
Putting on duonoculars...
Equipment changed.
Removing items from closet...
You acquire an item: red shoe
Putting on red shoe...
Equipment changed.
Putting on Snow Suit...
Equipment changed.
Ghost Dog Chow cannot be consumed.
Unable to meet all requirements via equipment changes.
See the Modifier Maximizer for further suggestions.
Maximizing...
240 combinations checked, best score 30.00
Ghost Dog Chow cannot be consumed.

Why is maximize failing (after succeeding!) because a potion cannot be eaten?

For reference, this is how I got it (pasted with preserved tabs):
Code:
[781] The Mansion of Dr. Weirdeaux
Encounter: Wooof! Wooooooof!
choice 1106/1: Pet him
choice 1106/2: Teach him some tricks
choice 1106/3: Throw a stick
Took choice 1106/3: Throw a stick
choice.php?pwd&whichchoice=1106&option=3
--------------------
8640	Ghost Dog Chow	604634558	cheatos.gif	usable	t,d	20
# Item Ghost Dog Chow: Grants 20 Familiar XP
--------------------
You acquire an item: Ghost Dog Chow
 

heeheehee

Developer
Staff member
If I had to guess, it's trying to eat ghost dog, which is matching ghost dog chow (a real item) before it matches ghost dog (a pseudo-item?).
 

Darzil

Developer
Sounds believable. And we can't use the item number method of matching items, as it doesn't have one in items.txt. Maybe we can force an explicit match in that use case.
 

Darzil

Developer
Hopefully r16348 fixes this by looking for explicit matches, rather than using Item Finder, except for Slime vials/Bang potions.
 

Darzil

Developer
It's to do with the item matching in UseItemCommand, which is used by MoodManager.getDefaultAction, I think. Not going to have any time to look at this further for a bit.
 
Last edited:

Darzil

Developer
Actually, seems like a bug in the filter code. If there is exactly one entry in ItemFinder.filterNameList, it doesn't actually check the filter. Why ????

Ghost Dog is matching Ghost Dog Chow only in items.txt, but as it doesn't match anything else, when we filter it by food only, as there is only one, it isn't filtered ???

Why is that code there ?
 

Darzil

Developer
Ok, r16349 actually filters a list even if there is only one item. Hope this doesn't have any weird edge cases, but it seems to fix this.

(I'll go back later and remove the r16348 code if it isn't needed, no time now).
 
Darzil says it was already fixed (in the post just before yours, even). Ignoring that post leads to the simple conclusion that you didn't actually read past the first post in the thread.
Actually, I did read the thread. I can't update Mafia right now because I am not at home XD
 

lostcalpolydude

Developer
Staff member
So you knew that it issue was potentially fixed, didn't bother to check if it was fixed (because you couldn't), and posted anyway? Seems like a useless post.
 
Top