static inline void _reset_non_stored_counter(StatsCluster *sc, gint type, StatsCounterItem *counter, gpointer user_data) { if (type != SC_TYPE_STORED) { _reset_counter(sc, type, counter, user_data); } }
int _get_counter(void) { int i = _get_free_counter(); if (i < 0) { i = _get_random_counter(); _reset_counter(i); } return i; }
void wild_decrement_counters(void) { int i; for (i = 0; i < MAX_WILD_COUNTERS; i++) { if (p_ptr->wild_counters[i].counter) { p_ptr->wild_counters[i].counter--; if (p_ptr->wild_counters[i].counter <= 0) _reset_counter(i); } } }
void wild_reset_counter(int power) { int i = _find_counter(power); if (i >= 0) _reset_counter(i); }
void wild_dispel_player(void) { int i; for (i = 0; i < MAX_WILD_COUNTERS; i++) _reset_counter(i); }