From d023fc31efcfee48e5342a6da4c56a54459cf4bd Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Sun, 10 Nov 2024 19:09:21 -0600 Subject: [PATCH] feat(balance): gain dodge experience at reduced rate on taking hits (#5694) --- src/character.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/character.cpp b/src/character.cpp index f7f6633ceab1..746c2d5969ea 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -8661,6 +8661,12 @@ void Character::on_hit( Creature *source, bodypart_id bp_hit, return; } + if( !source->is_hallucination() ) { + // Gain reduced experience for failed attempts to dodge + const int difficulty = source->get_melee(); + as_player()->practice( skill_dodge, std::max( difficulty, 0 ), difficulty, true ); + } + bool u_see = g->u.sees( *this ); units::energy trigger_cost_base = bio_ods->power_trigger; if( has_active_bionic( bio_ods ) && get_power_level() >= trigger_cost_base * 4 ) {