Skip to content

Commit bb88962

Browse files
committed
Catchup_combat cnly catches up *combat skills*, not everything
1 parent f64374b commit bb88962

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/character.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2780,8 +2780,14 @@ bool Character::practice( const skill_id &id, int amount, int cap, bool suppress
27802780
// but perception also plays a role, representing both memory/attentiveness and catching on to how
27812781
// the two apply to each other.
27822782
float catchup_modifier = 1.0f + ( 2.0f * get_int() + get_per() ) / 24.0f; // 2 for an average person
2783-
catchup_modifier = enchantment_cache->modify_value( enchant_vals::mod::SKILL_RUST_BONUS_XP,
2784-
catchup_modifier );
2783+
if( level.isRusty() ) {
2784+
if( skill.is_combat_skill() ) {
2785+
catchup_modifier = enchantment_cache->modify_value( enchant_vals::mod::COMBAT_CATCHUP,
2786+
catchup_modifier );
2787+
}
2788+
catchup_modifier = enchantment_cache->modify_value( enchant_vals::mod::SKILL_RUST_BONUS_XP,
2789+
catchup_modifier );
2790+
}
27852791

27862792
float knowledge_modifier = 1.0f + get_int() /
27872793
40.0f; // 1.2 for an average person, always a bit higher than base amount
@@ -2806,9 +2812,6 @@ bool Character::practice( const skill_id &id, int amount, int cap, bool suppress
28062812
amount /= 3.0f;
28072813
}
28082814

2809-
catchup_modifier = enchantment_cache->modify_value( enchant_vals::mod::COMBAT_CATCHUP,
2810-
catchup_modifier );
2811-
28122815
if( isSavant && id != savantSkill ) {
28132816
amount *= 0.5f;
28142817
}

0 commit comments

Comments
 (0)