diff --git a/data/mods/My_Sweet_Cataclysm/sweet_mutations.json b/data/mods/My_Sweet_Cataclysm/sweet_mutations.json index cfecbb275fa74..c0ca6700d4037 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_mutations.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_mutations.json @@ -42,6 +42,6 @@ "allowed_category": [ "SUGAR" ], "no_cbm_on_bp": [ "TORSO", "HEAD", "EYES", "MOUTH", "ARM_L", "ARM_R", "HAND_L", "HAND_R", "LEG_L", "LEG_R", "FOOT_L", "FOOT_R" ], "armor": [ { "parts": "ALL", "cut": 10, "bash": 5 } ], - "flags": [ "NO_THIRST", "NO_DISEASE" ] + "flags": [ "NO_THIRST", "NO_DISEASE", "NO_RADIATION" ] } ] diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index fbab96e2a6353..714af7fe74781 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -1086,8 +1086,9 @@ Also see `monster_attacks.json` for more special attacks, for example, impale an - ```UNARMED_BONUS``` You get a bonus to unarmed bash and cut damage equal to unarmed_skill/2 up to 4. - ```NEED_ACTIVE_TO_MELEE``` This mutation gives bonus to unarmed melee only if it's active. -- ```NO_DISEASE``` This mutation grants immunity to disease. +- ```NO_DISEASE``` This mutation grants immunity to diseases. - ```NO_THIRST``` Your thirst is not modified by food or drinks. +- ```NO_RADIATION``` This mutation grants immunity to radiations. ### Categories diff --git a/src/character.cpp b/src/character.cpp index 518c5b7b04a8d..2fefebdea9db5 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -5312,7 +5312,10 @@ void Character::set_rad( int new_rad ) void Character::mod_rad( int mod ) { - radiation += mod; + if( has_trait_flag( "NO_RADIATION" ) ) { + return; + } + set_rad( std::max( 0, get_rad() + mod ) ); } int Character::get_stamina() const diff --git a/src/player.cpp b/src/player.cpp index eeb1bb9376c06..067d76e01bf1e 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -2832,7 +2832,7 @@ void player::regen( int rate_multiplier ) } if( get_rad() > 0 ) { - set_rad( std::max( 0, get_rad() - roll_remainder( rate_multiplier / 50.0f ) ) ); + mod_rad( -roll_remainder( rate_multiplier / 50.0f ) ); } }