summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/decks.cc4
-rw-r--r--crawl-ref/source/defines.h3
-rw-r--r--crawl-ref/source/main.cc2
-rw-r--r--crawl-ref/source/player.cc8
4 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 3394e782f9..5bb742abcb 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -2080,8 +2080,8 @@ static void _experience_card(int power, deck_rarity_type rarity)
// Put some free XP into pool; power_level 2 means fill pool
you.exp_available += power * 50;
- if (power_level >= 2 || you.exp_available > 20000)
- you.exp_available = 20000;
+ if (power_level >= 2 || you.exp_available > FULL_EXP_POOL)
+ you.exp_available = FULL_EXP_POOL;
level_change();
}
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h
index aa61d59668..912b2ee1c4 100644
--- a/crawl-ref/source/defines.h
+++ b/crawl-ref/source/defines.h
@@ -141,6 +141,9 @@ const int ANON_FRIENDLY_MONSTER = -1999;
const int DEBUG_COOKIE = 32767;
const int MAX_SKILL_LEVEL = 27;
+const int MAX_EXP_TOTAL = 8999999;
+const int MAX_EXP_POOL = 20000;
+const int FULL_EXP_POOL = MAX_EXP_POOL;
const int MIN_HIT_MISS_PERCENTAGE = 5;
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 14704c6352..2bb5e2f881 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -547,7 +547,7 @@ static void _do_wizard_command(int wiz_command, bool silent_fail)
break;
case 's':
- you.exp_available = 20000;
+ you.exp_available = FULL_EXP_POOL;
you.redraw_experience = true;
break;
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 18d5fdcae3..cc00765afe 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2481,8 +2481,8 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained );
#endif
- if (you.experience + exp_gained > 8999999)
- you.experience = 8999999;
+ if (you.experience + exp_gained > MAX_EXP_TOTAL)
+ you.experience = MAX_EXP_TOTAL;
else
you.experience += exp_gained;
@@ -2496,8 +2496,8 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
exp_gained /= 2;
}
- if (you.exp_available + exp_gained > 20000)
- you.exp_available = 20000;
+ if (you.exp_available + exp_gained > MAX_EXP_POOL)
+ you.exp_available = MAX_EXP_POOL;
else
you.exp_available += exp_gained;