summaryrefslogtreecommitdiff
path: root/custom.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2021-09-05 23:53:12 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2021-09-05 23:53:12 -0700
commit79e8d46e8ceb4e78394e0ab6808f5df4cc518b56 (patch)
tree1101d56cb4063fa3bc61858445898953078b0cee /custom.patch
parentMerge custom and custom 2 patches (diff)
downloadcataclysm-bn-79e8d46e8ceb4e78394e0ab6808f5df4cc518b56.tar.xz
Updated to 2021-09-05-1136.
Fix custom patch for 2021-09-05-1136 sunburn changes.
Diffstat (limited to 'custom.patch')
-rw-r--r--custom.patch68
1 files changed, 53 insertions, 15 deletions
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<bodypart_id, float> 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<const bodypart_id, float> &bp_exp : bp_exposure ) {
--- a/data/json/field_type.json
+++ b/data/json/field_type.json