From 6c696cd127619886959cdb7b4ee7d0084638244e Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Thu, 25 Oct 2018 23:44:38 +0200 Subject: [PATCH] experience modifer no longer applies to [effect] now experience_modifer only changes the unit types xp, it no longer has an effect on [effect]s that change xp, in particular it fixes #1796 where a apply_to,increase=max_experience,2 [effect] added one or two max_experience to a unit dependend on how much max_experience it had before. This was in particular a problem because this effect would only behave like this during unit construction, not when an object is added ([object]). --- src/units/unit.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/units/unit.cpp b/src/units/unit.cpp index 65260516388b..2ed44fa2c121 100644 --- a/src/units/unit.cpp +++ b/src/units/unit.cpp @@ -932,7 +932,7 @@ void unit::advance_to(const unit_type& u_type, bool use_traits) type_name_ = new_type.type_name(); description_ = new_type.unit_description(); undead_variation_ = new_type.undead_variation(); - max_experience_ = new_type.experience_needed(false); + max_experience_ = new_type.experience_needed(true); level_ = new_type.level(); recall_cost_ = new_type.recall_cost(); alignment_ = new_type.alignment(); @@ -2300,10 +2300,6 @@ void unit::apply_modifications() add_modification(mod, m, true); } } - - // Apply the experience acceleration last - int exp_accel = unit_experience_accelerator::get_acceleration(); - max_experience_ = std::max(1, (max_experience_ * exp_accel + 50)/100); } bool unit::invisible(const map_location& loc, bool see_all) const