Skip to content

Commit

Permalink
accessor + stat reset fixes (#65165)
Browse files Browse the repository at this point in the history
  • Loading branch information
bombasticSlacks authored Apr 19, 2023
1 parent e6b6152 commit a3c3959
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/player_difficulty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ void player_difficulty::npc_from_avatar( const avatar &u, npc &dummy )
dummy.dex_max = u.dex_max;
dummy.int_max = u.int_max;
dummy.per_max = u.per_max;
dummy.reset_stats();


// set skills
Expand All @@ -42,6 +41,7 @@ void player_difficulty::npc_from_avatar( const avatar &u, npc &dummy )
dummy.set_mutation( t );
}

dummy.reset();
dummy.initialize();
}

Expand Down Expand Up @@ -355,6 +355,11 @@ std::string player_difficulty::format_output( float percent_band, float per )
return output;
}

const npc &player_difficulty::get_average_npc()
{
return average;
}

std::string player_difficulty::difficulty_to_string( const avatar &u ) const
{
// make a faux avatar that can have the effects of creation applied to it
Expand Down
2 changes: 2 additions & 0 deletions src/player_difficulty.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class player_difficulty
npc average;

public:
const npc &get_average_npc();

player_difficulty( const player_difficulty & ) = delete;
player_difficulty &operator= ( const player_difficulty & ) = delete;

Expand Down

0 comments on commit a3c3959

Please sign in to comment.