ereinion
Member
I created this scriptlet to help me decide what familiars to use in the new challenge path:
However, I keep putting in e.g. "item" instead of "item drop" when I run it, making it display results, which while not strictly speaking erroneous, isn't the ones I want. So what I wonder is if there's some simple way to match the input string against the ones found in modref?
Code:
void main(string s) {
foreach f in $familiars[] {
if (is_unrestricted(f) && have_familiar(f)) {
if (numeric_modifier(f, s, 100, familiar_equipment(f)) > 0) {
print(to_string(f));
}
}
}
}