static int gazelle_historyLevelRequired(RuleEngine2.Rule rule) { int n = 0; new Matches m; for (GRuleLine l : unnull(rule.insWithType)) if (startsWith(l.type, "history-", m)) n = max(n, parseIntOpt(m.rest())); ret n; }