... create most "concoctions" advice depending on Mafia's get_ingredients() ... suggest some better way for me to create the ingredients[] map ... make a Mafia feature request to change the way get_ingredients() works. (Maybe a get_ingredients(item it, boolean ignore_skills) variant?)
You might want to look at concoctions.txt and do some parsing, not unlike that little snippet that I posted a link to earlier.
EDIT: I'm a moron and hadn't actually looked at the script itself carefully. Heh. Yeah, you do use concoctions.txt, but I guess I was recommending doing something sorta like what jasonharper did for item2effect (link's earlier up on this page). I'll see if I can modify it to do this
sugar-folding ... "cook" isn't proper CLI syntax ... switch all the "wrong" commands to be readable by the CLI => Mafia doesn't understand "then do x times".
If I were to do this, I'd do something similar to the universal consume() for cook/smith/fold/whatever. Or set aliases? I don't know -- you should be able to do that with ASH, right? [[New side project for me: create a little scriptlet to set all these aliases at once. Hehe.]]
... "daily" variable ... "per day" ... Maybe if such an item is inquired about the script would have to prompt for a number of days?
Regarding the dailies: you might want to add in support for demon summoning (if it's ever worth it... heh). Is there a way to check Daily Deeds to see if you've already summoned demons?
I also hacked together a .txt with all (most?) relevant effects and durations (but it'll need updating regularly, I suppose). I honestly don't know if it'll work, as I haven't tested it. Threw in AT Hobo skills in the event that the player is an AT, will be staying in aftercore for some time, and plans to sell the skills regularly.
Note: no duration was given for these. Or Fishy, which is just too variable.
It uses these columns: effect number, effect name, source, duration, daily (boolean-esque), and underwater only (boolean-esque). For the last two columns, 1 indicates true; 0 indicates false. Need to add that into a library, eventually. Heh.
For the ASH script itself, I'd add in a sauce_duration variable, using a bit of the following code:
Code:
int sauce_duration = 5;
if(my_class()==$class[sauceror]) sauce_duration = sauce_duration + 5;
if(have_skill($skill[Impetuous])) sauce_duration = sauce_duration + 5;
Now that I think about it, you'd probably also have to prompt for a location, if you want to use mpa from effects -- perhaps incorporate parts of this script (
http://kolmafia.us/showthread.php?t=2493)? An improvement that could be made would be taking residual effects into account -- that is, effects that you have currently active but are not planning to increase rounds for. Here's a little snippet from my slime-buffing script (again!):
Code:
float effect_ML(effect key) {
float fx_ML = numeric_modifier(key,"Monster Level");
if(ML_fam == "purse rat") {
fx_ML = fx_ML + numeric_modifier(key,"Familiar Weight") / 2;
// Special case for Bitterskin (Rather than assume immediately that you're running full slime-hate gear):
if(key == $effect[Bitterskin]) {
fx_ML = min(1000,(15 * (slime_hate + 1) * (slime_hate + 3))) - min(1000,(15 * (slime_hate) * (slime_hate + 2)));
}
// Mafia doesn't do love songs too well.
if(key == $effect[Cold Hearted]) fx_ML = 5;
}
return fx_ML;
}
partialML = 0;
foreach c in allML {
if(!(fx contains c)&&have_effect(allML[c])>0) {
int has_fx = have_effect(allML[c]);
if(PYEC) has_fx = has_fx + 5;
partialML = partialML + min(has_fx,limit) * effect_ML(a[c]);
}
}
Obviously it's for ML, as opposed to items or meat, but you could easily adopt this, I'd think. You wouldn't need the first function, and calculations for familiar weight would be slightly more complicated for fairy/leprechaun-types, but hey, there's a formula for that!
Oh good lord. MP. Of course MP is worth it! And Bale has that snazzy new _meat_per_mp variable to look at, I wouldn't even have to do most of the math... (And then, is HP worth it?)
HP isn't really worth it -- fully healing HP is trivial compared to MP.
But really, I think this is all so complicated that the first step would be to create a separate library do deal with it (much like SmashLib was enough code that I farmed it out into a separate script). It's not something high on my list right now, although if someone else wants to tackle it...
I might give that a shot if you give me a list of functions you might want.
(The hope is that the market correctly reflects the value of the item and so I don't have to calculate +item/+meat/MP value. Unfortunately, as we all know, this is not usually the case. If PA calculated them and everyone used PA, only then would the market properly reflect the "true value"... gah.))
Well, we better start spreading the word, then, eh?