effect_to_item?

heeheehee

Developer
Staff member
Long-time lurker, first-time poster.

Anyway, I've taken up a bit of ASH scripting, and I was wondering if there was a more robust way of handling effect => item than gemelli's approach from several years back (http://kolmafia.us/showpost.php?p=3458&postcount=7).

A bit more of searching netted me with this post (http://kolmafia.us/showpost.php?p=15442&postcount=5), but that does the opposite of what I want.

I guess a huge map with all in-game effects would work, but that just doesn't fit with my style of coding -- it'd be too inefficient most of the time and just slow down the script.

Any suggestions?
 
Right. I haven't played around with that yet, but it's good to know that the map already exists (so I don't have to do that myself).

What I guess I was looking for was a function that'd somehow return the item associated with an effect without actually using a map. I looked at that second post I linked to more carefully, and yeah, it uses statuseffects.txt, so I guess that'd be the way to go.

Edit: Now that I looked at it, I guess I'd basically remove the "use 1 " or whatever appears in front of the command (using matchers, yes?) to get the item. I could also use the whole switch...case thing to differentiate between skills, equips, and items. Thanks for the heads up!
 
Last edited:
Back
Top