diff --git a/src/exper.c b/src/exper.c index 069f65be5..19ed0bf1c 100644 --- a/src/exper.c +++ b/src/exper.c @@ -14,12 +14,21 @@ long newuexp(lev) int lev; { + double newlev = 1.0; + long res; if (lev < 1) /* for newuexp(u.ulevel - 1) when u.ulevel is 1 */ return 0L; if (lev < 10) return (10L * (1L << lev)); - if (lev < 17) - return (10000L * (1L << (lev - 10))); + if (lev < 24) { + for (int i = 0; i < lev - 10; i++) + newlev *= 1.5; + res = 10000L * newlev; + + if (lev > 10) + res = res - (res % 1000); /* Trim off small digits */ + return res; + } return (320000L * ((long) (lev - 14))); }