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