From 8bd14b2ce259426f1a4eb068930d28b160a051f7 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sun, 13 Jun 2021 03:18:41 -0700 Subject: Expand vampire patch so vampires take even more damage from sunlight --- custom.patch | 128 ++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 75 insertions(+), 53 deletions(-) (limited to 'custom.patch') diff --git a/custom.patch b/custom.patch index 5c6cb5f..d669295 100644 --- a/custom.patch +++ b/custom.patch @@ -73,16 +73,21 @@ if( u.has_trait( trait_THRESH_MYCUS ) || u.has_trait( trait_THRESH_MARLOSS ) || --- a/src/suffer.cpp +++ b/src/suffer.cpp -@@ -118,6 +118,8 @@ - static const trait_id trait_FRESHWATEROSMOSIS( "FRESHWATEROSMOSIS" ); - static const trait_id trait_GILLS( "GILLS" ); - static const trait_id trait_GILLS_CEPH( "GILLS_CEPH" ); +@@ -143,10 +143,13 @@ + static const trait_id trait_SHOUT3( "SHOUT3" ); + static const trait_id trait_SORES( "SORES" ); + static const trait_id trait_SUNBURN( "SUNBURN" ); +static const trait_id trait_THRESH_GYNOID( "THRESH_GYNOID" ); +static const trait_id trait_THRESH_VAMP( "THRESH_VAMP" ); - static const trait_id trait_JITTERY( "JITTERY" ); - static const trait_id trait_KILLER( "KILLER" ); - static const trait_id trait_LEAVES( "LEAVES" ); -@@ -245,7 +247,8 @@ + static const trait_id trait_TROGLO( "TROGLO" ); + static const trait_id trait_TROGLO2( "TROGLO2" ); + static const trait_id trait_TROGLO3( "TROGLO3" ); + static const trait_id trait_UNSTABLE( "UNSTABLE" ); ++static const trait_id trait_VAMP_CURSE( "VAMP_CURSE" ); + static const trait_id trait_VOMITOUS( "VOMITOUS" ); + static const trait_id trait_WEB_SPINNER( "WEB_SPINNER" ); + static const trait_id trait_WEB_WEAVER( "WEB_WEAVER" ); +@@ -243,7 +246,8 @@ void Character::suffer_while_underwater() { @@ -92,6 +97,68 @@ oxygen--; } if( oxygen < 12 && worn_with_flag( "REBREATHER" ) ) { +@@ -759,6 +763,17 @@ + } + } + ++ 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_TROGLO ) || has_trait( trait_TROGLO2 ) ) && + g->weather.weather == WEATHER_SUNNY ) { + mod_str_bonus( -1 ); +--- a/src/monattack.cpp ++++ b/src/monattack.cpp +@@ -143,6 +143,7 @@ + static const trait_id trait_TAIL_CATTLE( "TAIL_CATTLE" ); + static const trait_id trait_THRESH_MARLOSS( "THRESH_MARLOSS" ); + static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); ++static const trait_id trait_THRESH_VAMP( "THRESH_VAMP" ); + + static const mtype_id mon_ant_acid_larva( "mon_ant_acid_larva" ); + static const mtype_id mon_ant_acid_queen( "mon_ant_acid_queen" ); +@@ -2758,6 +2759,9 @@ + damage_instance dam = damage_instance(); + dam.add_damage( DT_STAB, 6, 10, 0.6, 1 ); + bool hit = sting_shoot( z, target, dam, range ); ++ if( target->has_trait( trait_THRESH_VAMP ) ) { ++ return true; ++ } + if( hit ) { + //Add checks if previous NPC/player conditions are removed + dynamic_cast( target )->mutate(); +--- a/src/player_hardcoded_effects.cpp ++++ b/src/player_hardcoded_effects.cpp +@@ -114,7 +114,9 @@ + static const trait_id trait_NOPAIN( "NOPAIN" ); + static const trait_id trait_SEESLEEP( "SEESLEEP" ); + static const trait_id trait_SCHIZOPHRENIC( "SCHIZOPHRENIC" ); ++static const trait_id trait_THRESH_GYNOID( "THRESH_GYNOID" ); + static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); ++static const trait_id trait_THRESH_VAMP( "THRESH_VAMP" ); + static const trait_id trait_WATERSLEEP( "WATERSLEEP" ); + + static void eff_fun_onfire( player &u, effect &it ) +@@ -1095,6 +1097,11 @@ + // Determine the strength of effects or dreams based upon category strength + int strength = 0; // Category too weak for any effect or dream + if( crossed_threshold() ) { ++ if( has_trait( trait_THRESH_VAMP ) ) { ++ highcat = "VAMP"; ++ } else if( has_trait( trait_THRESH_GYNOID ) ) { ++ highcat = "GYNOID"; ++ } + strength = 4; // Post-human. + } else if( highest >= 20 && highest < 35 ) { + strength = 1; // Low strength --- a/data/json/field_type.json +++ b/data/json/field_type.json @@ -303,7 +303,7 @@ @@ -175,27 +242,6 @@ "priority": 8, "half_life": "30 minutes", "phase": "gas", ---- a/src/monattack.cpp -+++ b/src/monattack.cpp -@@ -143,6 +143,7 @@ - static const trait_id trait_TAIL_CATTLE( "TAIL_CATTLE" ); - static const trait_id trait_THRESH_MARLOSS( "THRESH_MARLOSS" ); - static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); -+static const trait_id trait_THRESH_VAMP( "THRESH_VAMP" ); - - static const mtype_id mon_ant_acid_larva( "mon_ant_acid_larva" ); - static const mtype_id mon_ant_acid_queen( "mon_ant_acid_queen" ); -@@ -2758,6 +2759,9 @@ - damage_instance dam = damage_instance(); - dam.add_damage( DT_STAB, 6, 10, 0.6, 1 ); - bool hit = sting_shoot( z, target, dam, range ); -+ if( target->has_trait( trait_THRESH_VAMP ) ) { -+ return true; -+ } - if( hit ) { - //Add checks if previous NPC/player conditions are removed - dynamic_cast( target )->mutate(); - --- a/data/json/mutations/mutation_ordering.json +++ b/data/json/mutations/mutation_ordering.json @@ -73,6 +73,7 @@ @@ -206,27 +252,3 @@ "VISCOUS" ], "order": 1500 ---- a/src/player_hardcoded_effects.cpp -+++ b/src/player_hardcoded_effects.cpp -@@ -114,7 +114,9 @@ - static const trait_id trait_NOPAIN( "NOPAIN" ); - static const trait_id trait_SEESLEEP( "SEESLEEP" ); - static const trait_id trait_SCHIZOPHRENIC( "SCHIZOPHRENIC" ); -+static const trait_id trait_THRESH_GYNOID( "THRESH_GYNOID" ); - static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); -+static const trait_id trait_THRESH_VAMP( "THRESH_VAMP" ); - static const trait_id trait_WATERSLEEP( "WATERSLEEP" ); - - static void eff_fun_onfire( player &u, effect &it ) -@@ -1095,6 +1097,11 @@ - // Determine the strength of effects or dreams based upon category strength - int strength = 0; // Category too weak for any effect or dream - if( crossed_threshold() ) { -+ if( has_trait( trait_THRESH_VAMP ) ) { -+ highcat = "VAMP"; -+ } else if( has_trait( trait_THRESH_GYNOID ) ) { -+ highcat = "GYNOID"; -+ } - strength = 4; // Post-human. - } else if( highest >= 20 && highest < 35 ) { - strength = 1; // Low strength -- cgit v1.2.1