From a157676f223c998a7c51ec95191719705836d047 Mon Sep 17 00:00:00 2001 From: Erik Lunna Date: Mon, 30 Oct 2023 15:37:09 +0100 Subject: [PATCH] New experience curve. This should allow for a little easier time leveling up. It kind of walks between EvilHack's and FIQ's XP curves. When we reach level 25, we return to the high EvilHack experience requirements. 1 0 2 20 3 40 4 80 5 160 6 320 7 640 8 1 280 9 2 560 10 5 120 11 10 000 12 15 000 13 22 000 14 33 000 15 50 000 16 75 000 17 113 000 18 170 000 19 256 000 20 384 000 21 576 000 22 864 000 23 1 297 000 24 1 946 000 25 3 200 000 26 3 520 000 27 3 840 000 28 4 160 000 29 4 480 000 30 4 800 000 --- src/exper.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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))); }