summaryrefslogtreecommitdiff
path: root/revert-23_fix-balance-no-more-EXP-gain-when-a-skill-is-maxed-o.patch
diff options
context:
space:
mode:
Diffstat (limited to 'revert-23_fix-balance-no-more-EXP-gain-when-a-skill-is-maxed-o.patch')
-rw-r--r--revert-23_fix-balance-no-more-EXP-gain-when-a-skill-is-maxed-o.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/revert-23_fix-balance-no-more-EXP-gain-when-a-skill-is-maxed-o.patch b/revert-23_fix-balance-no-more-EXP-gain-when-a-skill-is-maxed-o.patch
new file mode 100644
index 0000000..b40bc5e
--- /dev/null
+++ b/revert-23_fix-balance-no-more-EXP-gain-when-a-skill-is-maxed-o.patch
@@ -0,0 +1,48 @@
+From d437a5a6e57cb27bca6685cd88186fd97c372ef8 Mon Sep 17 00:00:00 2001
+From: Chaosvolt <chaosvolt@users.noreply.github.com>
+Date: Thu, 23 Nov 2023 16:31:11 -0600
+Subject: [PATCH 154/318] fix(balance): no more EXP gain when a skill is maxed
+ out (#3720)
+
+---
+ src/character.cpp | 2 +-
+ src/skill.cpp | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/character.cpp b/src/character.cpp
+index 6d8d9335c9c..707cce4f12d 100644
+--- a/src/character.cpp
++++ b/src/character.cpp
+@@ -3920,7 +3920,7 @@ void Character::practice( const skill_id &id, int amount, int cap, bool suppress
+
+ if( !level.can_train() && !in_sleep_state() ) {
+ // If leveling is disabled, don't train, don't drain focus, don't print anything
+- // Leaving as a skill method rather than global for possible future skill cap setting
++ // This also checks if your skill level is maxed out at the cap of 10.
+ return;
+ }
+
+diff --git a/src/skill.cpp b/src/skill.cpp
+index 8964c80487f..5404cb204b1 100644
+--- a/src/skill.cpp
++++ b/src/skill.cpp
+@@ -9,6 +9,7 @@
+
+ #include "cata_utility.h"
+ #include "debug.h"
++#include "game_constants.h"
+ #include "item.h"
+ #include "json.h"
+ #include "options.h"
+@@ -310,7 +311,7 @@ void SkillLevel::readBook( int minimumGain, int maximumGain, int maximumLevel )
+
+ bool SkillLevel::can_train() const
+ {
+- return get_option<float>( "SKILL_TRAINING_SPEED" ) > 0.0;
++ return ( get_option<float>( "SKILL_TRAINING_SPEED" ) > 0.0 && _level < MAX_SKILL );
+ }
+
+ const SkillLevel &SkillLevelMap::get_skill_level_object( const skill_id &ident ) const
+--
+2.42.0
+