Permalink
Browse files

NPCs: more variation in NPCs warning about monsters

Change NPCs warning about monsters with difficulty > 10 to warning
about monsters with difficulty >  ( 8 + NPC bravery + random number
between 0 and 5 ).  There shouldn't be much change for most NPCs
but brave NPCs will warn about fewer types of monsters and all NPCs
will sometimes skip warnings about some monsters.
  • Loading branch information...
mlangsdorf committed Dec 26, 2018
1 parent 04482c2 commit 3f7a563f44248b9a64798558d73d9fb8c3b9c81c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/npcmove.cpp
@@ -238,7 +238,8 @@ void npc::assess_danger()
for( const monster &critter : g->all_monsters() ) {
if( sees( critter ) ) {
assessment += critter.type->difficulty;
if( critter.type->difficulty > 10 && ( is_enemy() || !critter.friendly ) ) {
if( critter.type->difficulty > ( 8 + personality.bravery + rng( 0, 5 ) ) &&
( is_enemy() || !critter.friendly ) ) {
warn_about( "monster", 10_minutes, critter.type->nname() );
}
}

0 comments on commit 3f7a563

Please sign in to comment.