From 33e7dc3baa6b375efb6d8989ffe3c50511291228 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Fri, 11 Dec 2015 08:09:30 +0100 Subject: Remove Alchemist class and associated skills/code Alchemy has always been ridiculously broken and there's been a huge amount of horrible code to support it. Sorry to any fans of Alchemy, but it's got to go. --- src/xtra2.cc | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) (limited to 'src/xtra2.cc') diff --git a/src/xtra2.cc b/src/xtra2.cc index 6ddf4ac9..d1eaa977 100644 --- a/src/xtra2.cc +++ b/src/xtra2.cc @@ -2084,44 +2084,10 @@ void check_experience_obj(object_type *o_ptr) /* - * Gain experience (share it to objects if needed) + * Gain experience */ void gain_exp(s32b amount) { - int i, num = 1; - - /* Count the gaining xp objects */ - for (i = INVEN_WIELD; i < INVEN_TOTAL; i++) - { - object_type *o_ptr = &p_ptr->inventory[i]; - u32b f1, f2, f3, f4, f5, esp; - - object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp); - - if (!o_ptr->k_idx) continue; - - if (f4 & TR4_ART_EXP) num++; - } - - /* Now give the xp */ - for (i = INVEN_WIELD; i < INVEN_TOTAL; i++) - { - object_type *o_ptr = &p_ptr->inventory[i]; - u32b f1, f2, f3, f4, f5, esp; - - object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &esp); - - if (!o_ptr->k_idx) continue; - - if (f4 & TR4_ART_EXP) - { - o_ptr->exp += 2 * amount / (num * 3); - - /* Hack -- upper limit */ - if (o_ptr->exp > PY_MAX_EXP) o_ptr->exp = PY_MAX_EXP; - } - } - if ((p_ptr->max_exp > 0) && (race_flags1_p(PR1_CORRUPT))) { if ((randint(p_ptr->max_exp) < amount) || (randint(12000000) < amount)) @@ -2133,7 +2099,7 @@ void gain_exp(s32b amount) }; /* Gain some experience */ - p_ptr->exp += amount / num; + p_ptr->exp += amount; /* Slowly recover from experience drainage */ if (p_ptr->exp < p_ptr->max_exp) -- cgit v1.2.3