Skip to content

Commit

Permalink
Merge pull request #74267 from RenechCDDA/monster_difficulty
Browse files Browse the repository at this point in the history
Monster difficulty has a floor of 1
  • Loading branch information
Maleclypse authored Jun 4, 2024
2 parents 43be6b6 + e398630 commit 3de6961
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/monstergenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ void MonsterGenerator::finalize_mtypes()
mon.difficulty *= ( mon.hp + mon.speed - mon.attack_cost + ( mon.morale + mon.agro ) * 0.1 ) * 0.01
+ ( mon.vision_day + 2 * mon.vision_night ) * 0.01;

mon.difficulty = std::max( 1, mon.difficulty );

if( mon.status_chance_multiplier < 0 ) {
mon.status_chance_multiplier = 0;
}
Expand Down

0 comments on commit 3de6961

Please sign in to comment.