Skip to content

Commit

Permalink
Merge pull request #31463 from ymber/read_time
Browse files Browse the repository at this point in the history
clean up player::read_speed
  • Loading branch information
ZhilkinSerg authored Jun 15, 2019
2 parents d6d3c7c + 7272af5 commit 1fc17e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2955,7 +2955,7 @@ int player::read_speed( bool return_stat_effect ) const
// Stat window shows stat effects on based on current stat
const int intel = get_int();
/** @EFFECT_INT increases reading speed */
int ret = 1000 - 50 * ( intel - 8 );
int ret = to_moves<int>( 1_minutes ) - to_moves<int>( 30_seconds ) * ( intel - 8 );

if( has_bionic( afs_bio_linguistic_coprocessor ) ) { // Aftershock
ret *= .85;
Expand All @@ -2973,11 +2973,11 @@ int player::read_speed( bool return_stat_effect ) const
ret *= 1.3;
}

if( ret < 100 ) {
ret = 100;
if( ret < to_moves<int>( 1_seconds ) ) {
ret = to_moves<int>( 1_seconds );
}
// return_stat_effect actually matters here
return 6 * ( return_stat_effect ? ret : ret / 10 );
return return_stat_effect ? ret : ret / 10;
}

int player::rust_rate( bool return_stat_effect ) const
Expand Down

0 comments on commit 1fc17e6

Please sign in to comment.