Feature - Implemented hermit() and breakfast logic update

roippi

Developer
2-part feature request, taken from here:

1) hermit * clover currently acquires gum and 1 clover; change to all available clovers

2) in-ronin "get hermit clovers" preference in breakfast only acquires as many clovers as you have worthless items. Update logic to use gum to acquire worthless items.

Thanks.
 

Veracity

Developer
Staff member
I agree that we should acquire worthless items in-ronin too, since they only cost Meat to get now, rather than adventures. You don't want to spend the Meat? Don't check the box.

My ascending multi freed the king yesterday, though, and it will be a while before I can test this, were I to change it.
 

Hairy

New member
I agree that we should acquire worthless items in-ronin too, since they only cost Meat to get now, rather than adventures. You don't want to spend the Meat? Don't check the box.
Normally I'd want to spend the meat, but not if I was particularly poor -- any chance of a minimum-meat setting of some sort to cover this?
 

Theraze

Active member
Don't check the box if you don't want it... easy enough. Or use a custom login script that checks your meat and runs hermit * clovers if you have over the amount, or something else.

The choice to have it run is dependent on what you desire.
 

StDoodle

Minion
Even in a balls-to-the-wall speedrun, you'll want to get those clovers by the end of the day, so you're only losing some meat flexibility early on. That can be major for the first few turns, but really, anyone on that high-end of gameplay uses a more customized breakfast or none at all. Also, I certainly feel that * should mean "all" unless there is a very compelling reason for it to mean otherwise. When the sewer took adventures, that was a good argument for * != "all"; but these days, I think that argument is gone.

tl;dr +1 to hermit * clover always means get as many trinkets as needed to clean out the hermit's clovers
 

Bale

Minion
Normally I'd want to spend the meat, but not if I was particularly poor -- any chance of a minimum-meat setting of some sort to cover this?

If you want to get picky about this, then use a login script. Here's an excerpt from mine:

PHP:
if(my_meat() > 2000 && !in_bad_moon())
	if(hermit(5, $item[ten-leaf clover])) {}

the if(){} bit is necessary to prevent it from aborting if the hermit currently has less than 5 clovers.
 

heeheehee

Developer
Staff member
the if(){} bit is necessary to prevent it from aborting if the hermit currently has less than 5 clovers.

zarqon would probably do something like
Code:
(!(my_meat() > 2000 && !in_bad_moon() && hermit(5, $item[ten-leaf clover])))
 

Bale

Minion
Heh. Actually, he prefers if() to the (!) construction since ! seems counter-intuitive, but you're right. It would be more elegant to use...

PHP:
(my_meat() > 2000 && !in_bad_moon()) && hermit(5, $item[ten-leaf clover]));

There's no reason to have a preceding not and even an if is unnecessary.
 
Last edited:

Raijinili

Member
I agree that we should acquire worthless items in-ronin too, since they only cost Meat to get now, rather than adventures. You don't want to spend the Meat? Don't check the box.
Is there an update on this? Point me and I'll try to get it done myself. Keep meaning to learn Mafia's internals.
 

slyz

Developer
You would need to look at getHermitClovers(), on line 193 of BreakfastManager.java.

EDIT: the names of the "grabClovers" preferences can be misleading... "grabCloversSoftcore" is for out-of-Ronin characters, and "grabCloversHardcore" is for characters in Ronin/Hardcore I think.
 
Last edited:

Raijinili

Member
Correct me if I'm wrong, but I think removing the bolded would be enough.
Code:
public static void getHermitClovers()
{
	if ( Preferences.getBoolean( "grabClovers" + ( KoLCharacter.canInteract() ? "Softcore" : "Hardcore" ) ) )
	{
		int count = [b]KoLCharacter.canInteract() ?[/b] HermitRequest.cloverCount() [b]: HermitRequest.getWorthlessItemCount()[/b];
		if ( count > 0 )
		{
			KoLmafiaCLI.DEFAULT_SHELL.executeLine( "hermit " + count + " ten-leaf clover" );
		}

		KoLmafia.forceContinue();
	}
}
 

Raijinili

Member
Seems to be working for me

Searching for "chewing gum on a string"...
Search complete.
Purchasing chewing gum on a string (1 @ 50)...
You acquire an item: chewing gum on a string
You spent 50 Meat
Purchases complete.
Using 1 chewing gum on a string...
You acquire an item: worthless gewgaw
Finished using 1 chewing gum on a string.
Robbing the hermit...
Searching for "chewing gum on a string"...
Search complete.
Purchasing chewing gum on a string (1 @ 50)...
You acquire an item: chewing gum on a string
You spent 50 Meat
Purchases complete.
Placing items into closet...
Using 1 chewing gum on a string...
You acquire an item: worthless trinket
Finished using 1 chewing gum on a string.
Removing items from closet...
You acquire an item: worthless gewgaw
Robbing the hermit...
You acquire ten-leaf clover (2)
Hermit successfully looted!
Using 2 ten-leaf clover...
You acquire disassembled clover (2)
Finished using 2 ten-leaf clover.
 
Top