Feature - Implemented Gar-Ish support

GValko

Member
Gar-ish (from potion of field gar, Clip Art) gives a bonus 5 adventures to eating one of the 3 lasagna dishes (steel lasagna excluded) while the effect is active. Except on Mondays when it does nothing.

Is there any chance that its effects can be seen on the adventure yields of the item manager?
 

Darzil

Developer
Consider Gar-Ish when displaying adventures from eating Lasagne

When you have Gar-Ish effect, eating Lasagne's gives +5 adventures except on Mondays. It'd be nice if that were reflected in Item Manager Food section. The effect is not consumed, so number of turns doesn't matter.
 
i'll piggy back on this request to bring up something i'd brought up previously. it would be really nice if tuxedo shirt were considered for martini-type drinks as well and auto-equipped if the user had torso and the shirt similar to how ode is cast automatically if possible.
 

Darzil

Developer
Decided to take a look at this, as I've started looking at the Java.

ItemDatabase.java has support for Ode/Milk, Glorious Lunch, Gourmand/Neurogourmet and Munchies Pills, which seems to be via creating an effect matrix, to allow one or more of them to be active at once. I guess this is to avoid having to refresh the Item Manager panel when the effects change. Adding more effects into this would significantly increase the size of that matrix, as it'd be adding extra combinations, especially as it should ideally include tuxedo shirt, salad fork, salty mouth, frosties mug, sushi doilies, grains of salt as well as field-gar.

In addition, the support that it does give to Munchies pills appears to be wrong, as it just gives +2 adv, rather than +3 if item gives 1-3 adventures, +2 if it gives 4-6 adventures, +1 if it gives 7+ adventures.

I rather suspect that a change to support this would involve changing the way this support works, if my guess as to why it calculates a matrix once rather than recalculating on any of these items being used is correct.

Well, going to wait for guidance from my betters, but here is at least a munchies pill fix :
 

Attachments

  • munchies_fix.patch
    1.3 KB · Views: 35
Last edited:

Darzil

Developer
Meh, what was I thinking.

I think the way it should work is if 3, add 3, if 4, add 2, if 5, add 2. I was only considering the outside cases, so it'd show +2.5 from munchies, rather than the true +2.33. Closer than just going with 2, but not right. Would make more sense for stuff like fortune cookies, which become +3 not +2, and big food, which becomes +1 rather than +2.

Edit - I guess I'll look at existing food, variance is pretty low these days. If I set it to 3 if end is <= 3, and 1 if start >= 7, and otherwise loop between start and end and count it up, dividing by (start-end) +1 it'd be spot on and normally not add much processing.

Edit 2 - Try this for size, should be accurate now.
 

Attachments

  • munchies_fix.patch
    1.6 KB · Views: 30
Last edited:

Darzil

Developer
Well, as I've been wanting this for ages, I've put some work into it.

There are two patches, so can consider how much you want.

The simple patch, updates adv gain based on whether you are currently wearing a tuxedo, and whether you currently have Gar-ish :

View attachment tuxedo_garish_no_automation.patch

The complex patch, adds two preferences, autoTuxedo and autoGarish. It updates adv gain if you have a tuxedo (or have autoTuxedo and can get one), and if you have or can get Gar-ish. If you have autoTuxedo set to true, it'll also put on a Tuxedo to drink appropriate drinks. If you have autoGarish set to true, it'll use or obtain Garish to eat Lasagna, but not on Mondays. autoTuxedo and autoGarish default to false.

View attachment tuxedo_garish_with_automation.patch

Personally, I'd like the second, as setting those preferences can easily avoid free loss of 8 adventures from Tuxedo, or 25 from Gar-ish at around 9k, if you forget to wear Tuxedo or use the potion.
 

Darzil

Developer
Gar-ish / Tuxedo support with autoGarish / autoTuxedo support added in 12602.

Effects if you don't enable autoGarish / autoTuxedo (default) :
If you have Gar-ish, adventure gain displayed should include benefits of Gar-ish on Lasagna. If you have Tuxedo equipped, adventure gain displayed should include benefits of Tuxedo on affected Martinis.
If you can get Gar-ish, but haven't got it, when you try to eat Lasagna it'll display an "are you sure" message. If you can get Tuxedo, but haven't got it equipped, when you try to drink affected Martinis it'll display an are you sure message.

Effects if you do enable autoGarish / autoTuxedo :
If you can get Gar-ish, adventure gain always includes benefits of Gar-ish on Lasagna. If you can get Tuxedo, adventure gain always includes benefits of Tuxedo on affected Martinins.
If you can get Gar-ish, but haven't got it, when you try to eat Lasagna it'll get and use it. If you can get Tuxedo, but haven't got it equipped, when you try to drink affected Martinis it'll get and equip it.
This option involves slightly less processing, as it doesn't have to recalculate the adventure yield when you get/lose Gar-ish or equip/unequip Tuxedo.
As with any automation, don't do it if you want total control.
 
Top