get_counter for ASH

heeheehee

Developer
Staff member
I've been trying out a crude get_counter() ASH function, that basically acts like the existing get_counters() function, except it returns when an arbitrary matching counter will expire (as opposed to checking if a counter will expire within a given range of turns).

Do others want this? It's almost entirely a copy-paste of existing functions, and it's not very robust. (For instance, if there are multiple matches, it'll just print out the first one it sees, which may or may not be the smallest value.)

Also, I'm open to suggestions re: behavior. (Should we throw away the case-insensitive string matching entirely? the zone-based exclusions? return the minimum value, rather than the first match?)
 

Attachments

  • get_counter.patch
    2.9 KB · Views: 0

heeheehee

Developer
Staff member
(This is now r20885. Comments / criticisms / questions still welcome. Also I suppose at some point I should add a wiki page for it.)
 
Top