diff --git a/src/item.cpp b/src/item.cpp index bb5f63d7d5aee..5148d11d81b4d 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -1212,6 +1212,10 @@ void item::basic_info( std::vector &info, const iteminfo_query *parts, if( parts->test( iteminfo_parts::BASE_MOVES ) ) { info.push_back( iteminfo( "BASE", _( "Moves per attack: " ), "", iteminfo::lower_is_better, attack_time() ) ); + double dps = ( dmg_bash + dmg_cut + dmg_stab ) * to_moves( 1_seconds ) / + static_cast( attack_time() ); + info.push_back( iteminfo( "BASE", _( "Damage per second: " ), "", + iteminfo::is_decimal, dps ) ); } } diff --git a/tests/iteminfo_test.cpp b/tests/iteminfo_test.cpp index a8f1250f4df77..1e8ff78b45ca0 100644 --- a/tests/iteminfo_test.cpp +++ b/tests/iteminfo_test.cpp @@ -50,7 +50,8 @@ TEST_CASE( "weapon attack ratings and moves", "[item][iteminfo]" ) "Bash: 20" " Cut: 5" " To-hit bonus: +2\n" - "Moves per attack: 145\n" ); + "Moves per attack: 145\n" + "Damage per second: 17.24\n" ); }