Created
January 26, 2010 20:56
-
-
Save tmountain/287219 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns experience | |
(:use combat)) | |
; experience table handling progression between levels | |
(def xp-table | |
{1 0, | |
2 20, | |
3 40, | |
4 80, | |
5 160, | |
6 320, | |
7 640, | |
8 1280, | |
9 2560, | |
10 5120, | |
11 10000, | |
12 20000, | |
13 40000, | |
14 80000, | |
15 160000, | |
16 320000, | |
17 640000, | |
18 1280000, | |
19 2560000, | |
20 5120000}) | |
; once this level is reached, a character is "high level" | |
; FIXME: expand for classes | |
(def high-level 10) | |
; FIXME: expand for classes | |
(defn hp-gain | |
"returns hp gained for leveling up" | |
[level high-level] | |
(if (< level high-level) | |
(roll [1 8]) | |
1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment