From 79e8d46e8ceb4e78394e0ab6808f5df4cc518b56 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sun, 5 Sep 2021 23:53:12 -0700 Subject: Updated to 2021-09-05-1136. Fix custom patch for 2021-09-05-1136 sunburn changes. --- custom.patch | 68 ++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 15 deletions(-) (limited to 'custom.patch') diff --git a/custom.patch b/custom.patch index 6046066..322b809 100644 --- a/custom.patch +++ b/custom.patch @@ -428,24 +428,62 @@ oxygen--; } if( oxygen < 12 && worn_with_flag( "REBREATHER" ) ) { -@@ -759,6 +763,17 @@ - } +@@ -742,7 +746,8 @@ + return; } -+ if( has_trait( trait_VAMP_CURSE ) && one_in( 10 ) ) { -+ if( !( weapon.has_flag( "RAIN_PROTECT" ) ) ) { -+ add_msg_if_player( m_bad, _( "The sunlight sears your skin!" ) ); -+ if( has_effect( effect_sleep ) && !has_effect( effect_narcosis ) ) { -+ wake_up(); -+ } -+ mod_pain( 5 ); -+ hurtall( 5, nullptr ); -+ } +- if( has_trait( trait_ALBINO ) || has_effect( effect_datura ) || has_trait( trait_SUNBURN ) ) { ++ if( has_trait( trait_ALBINO ) || has_effect( effect_datura ) || has_trait( trait_SUNBURN ) || ++ has_trait( trait_VAMP_CURSE ) ) { + suffer_from_sunburn(); + } + +@@ -768,6 +773,13 @@ + mod_int_bonus( -4 ); + mod_per_bonus( -4 ); + } ++ if( has_trait( trait_VAMP_CURSE ) ) { ++ mod_str_bonus( -4 ); ++ mod_dex_bonus( -4 ); ++ add_miss_reason( _( "You can't tolerate the sunlight!" ), 4 ); ++ mod_int_bonus( -4 ); ++ mod_per_bonus( -4 ); + } -+ - if( ( has_trait( trait_TROGLO ) || has_trait( trait_TROGLO2 ) ) && - g->weather.weather == WEATHER_SUNNY ) { - mod_str_bonus( -1 ); + } + + std::map Character::bodypart_exposure() +@@ -799,7 +811,8 @@ + + void Character::suffer_from_sunburn() + { +- if( !has_trait( trait_ALBINO ) && !has_effect( effect_datura ) && !has_trait( trait_SUNBURN ) ) { ++ if( !has_trait( trait_ALBINO ) && !has_effect( effect_datura ) && !has_trait( trait_SUNBURN ) && ++ !has_trait( trait_VAMP_CURSE ) ) { + return; + } + +@@ -816,6 +829,12 @@ + return; + } + sunlight_effect = _( "The sunlight burns" ); ++ } else if( has_trait( trait_VAMP_CURSE ) ) { ++ // Sunburn effects occur about 10 times per minute ++ if( !one_turn_in( 6_seconds ) ) { ++ return; ++ } ++ sunlight_effect = _( "The sunlight sears" ); + } + + // Sunglasses can keep the sun off the eyes. +@@ -893,7 +912,7 @@ + } + + // Solar Sensitivity (SUNBURN) trait causes injury to exposed parts +- if( has_trait( trait_SUNBURN ) ) { ++ if( has_trait( trait_SUNBURN ) || has_trait( trait_VAMP_CURSE ) ) { + mod_pain( 1 ); + // Check exposure of all body parts + for( const std::pair &bp_exp : bp_exposure ) { --- a/data/json/field_type.json +++ b/data/json/field_type.json -- cgit v1.2.1