Skip to content

Commit

Permalink
Merge pull request #45000 from Night-Pryanik/optional-monster-bleed
Browse files Browse the repository at this point in the history
Added an external option to make zombies immune to bleeding
  • Loading branch information
Rivet-the-Zombie authored Oct 25, 2020
2 parents 8e5a544 + ea366b6 commit 19c7921
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions data/core/game_balance.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,12 @@
"info": "If false, examining workbench-type furniture will auto-execute pickup and undeploy (where applicable) actions, no crafting-related options will be listed.",
"stype": "bool",
"value": true
},
{
"type": "EXTERNAL_OPTION",
"name": "ZOMBIES_DONT_BLEED",
"info": "If true, zombies won't bleed and won't take direct damage to the torso when they get bleeding effect.",
"stype": "bool",
"value": false
}
]
3 changes: 2 additions & 1 deletion src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,8 @@ bool monster::is_immune_effect( const efftype_id &effect ) const

if( effect == effect_bleed ) {
return !has_flag( MF_WARM ) ||
!made_of( material_id( "flesh" ) );
!made_of( material_id( "flesh" ) ) ||
( get_option<bool>( "ZOMBIES_DONT_BLEED" ) && in_species( species_ZOMBIE ) );
}

if( effect == effect_paralyzepoison ||
Expand Down

0 comments on commit 19c7921

Please sign in to comment.