Skip to content

Commit

Permalink
feat(balance): gain dodge experience at reduced rate on taking hits (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosvolt authored Nov 11, 2024
1 parent 7ed817a commit d023fc3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit d023fc3

Please sign in to comment.