diff options
Diffstat (limited to 'vampirism.patch')
-rw-r--r-- | vampirism.patch | 823 |
1 files changed, 823 insertions, 0 deletions
diff --git a/vampirism.patch b/vampirism.patch new file mode 100644 index 0000000..4fbef1e --- /dev/null +++ b/vampirism.patch @@ -0,0 +1,823 @@ +--- a/src/activity_handlers.cpp ++++ b/src/activity_handlers.cpp +@@ -238,6 +238,7 @@3 + static const species_id HUMAN( "HUMAN" ); + static const species_id ZOMBIE( "ZOMBIE" ); + ++static const trait_flag_str_id trait_flag_VAMPIRE( "VAMPIRE" ); + static const trait_flag_str_id trait_flag_CANNIBAL( "CANNIBAL" ); + static const trait_flag_str_id trait_flag_PSYCHOPATH( "PSYCHOPATH" ); + static const trait_flag_str_id trait_flag_SAPIOVORE( "SAPIOVORE" ); +@@ -667,7 +667,8 @@ + !corpse.in_species( ZOMBIE ) ); + if( is_human && !( u.has_trait_flag( trait_flag_CANNIBAL ) || + u.has_trait_flag( trait_flag_PSYCHOPATH ) || +- u.has_trait_flag( trait_flag_SAPIOVORE ) ) ) { ++ u.has_trait_flag( trait_flag_SAPIOVORE ) || ++ u.has_trait_flag( trait_flag_VAMPIRE ) ) ) { + need_confirm( _( "Would you dare desecrate the mortal remains of a fellow human being?" ), + butcherable_rating::warn_cannibalism ); + } + +--- a/src/character.cpp ++++ b/src/character.cpp +@@ -311,6 +311,9 @@ + static const trait_id trait_TOUGH_FEET( "TOUGH_FEET" ); + static const trait_id trait_TRANSPIRATION( "TRANSPIRATION" ); + static const trait_id trait_URSINE_EYE( "URSINE_EYE" ); ++static const trait_id trait_VAMP_HEARING( "VAMP_HEARING" ); ++static const trait_id trait_VAMP_HUNGER( "VAMP_HUNGER" ); ++static const trait_id trait_VAMP_SKIN( "VAMP_SKIN" ); + static const trait_id trait_VISCOUS( "VISCOUS" ); + static const trait_id trait_WATERSLEEP( "WATERSLEEP" ); + static const trait_id trait_WEBBED( "WEBBED" ); +@@ -4631,6 +4631,7 @@ + const bool npc_no_food = is_npc() && get_option<bool>( "NO_NPC_FOOD" ); + const bool foodless = debug_ls || npc_no_food; + const bool mouse = has_trait( trait_NO_THIRST ); ++ const bool vamp = has_trait( trait_VAMP_HUNGER ); + const bool mycus = has_trait( trait_M_DEPENDENT ); + const float kcal_per_time = bmr() / ( 12.0f * 24.0f ); + const int five_mins = ticks_between( from, to, 5_minutes ); +@@ -4661,7 +4661,7 @@ + + // Mycus and Metabolic Rehydration makes thirst unnecessary + // since water is not limited by intake but by absorption, we can just set thirst to zero +- if( mycus || mouse ) { ++ if( mycus || mouse || vamp ) { + set_thirst( 0 ); + } + } +@@ -4861,15 +4861,17 @@ + void Character::check_needs_extremes() + { + // Check if we've overdosed... in any deadly way. +- if( get_stim() > 250 ) { ++ if( ( get_stim() > 250 ) && !( has_trait( trait_VAMP_SKIN ) ) ) { + add_msg_if_player( m_bad, _( "You have a sudden heart attack!" ) ); + g->events().send<event_type::dies_from_drug_overdose>( getID(), efftype_id() ); + set_part_hp_cur( bodypart_id( "torso" ), 0 ); +- } else if( get_stim() < -200 || get_painkiller() > 240 ) { ++ } else if( ( get_stim() < -200 || get_painkiller() > 240 ) && !( has_trait( trait_VAMP_SKIN ) ) ) { + add_msg_if_player( m_bad, _( "Your breathing stops completely." ) ); + g->events().send<event_type::dies_from_drug_overdose>( getID(), efftype_id() ); + set_part_hp_cur( bodypart_id( "torso" ), 0 ); +- } else if( has_effect( effect_jetinjector ) && get_effect_dur( effect_jetinjector ) > 40_minutes ) { ++ } else if( ( has_effect( effect_jetinjector ) && ++ get_effect_dur( effect_jetinjector ) > 40_minutes ) && ++ !( has_trait( trait_VAMP_SKIN ) ) ) { + if( !( has_trait( trait_NOPAIN ) ) ) { + add_msg_if_player( m_bad, _( "Your heart spasms painfully and stops." ) ); + } else { +@@ -4879,7 +4879,7 @@ + } + g->events().send<event_type::dies_from_drug_overdose>( getID(), effect_jetinjector ); + set_part_hp_cur( bodypart_id( "torso" ), 0 ); +- } else if( get_effect_int( effect_drunk ) > 4 ) { ++ } else if( ( get_effect_int( effect_drunk ) > 4 ) && !( has_trait( trait_VAMP_SKIN ) ) ) { + add_msg_if_player( m_bad, _( "Your breathing slows down to a stop." ) ); + g->events().send<event_type::dies_from_drug_overdose>( getID(), effect_drunk ); + set_part_hp_cur( bodypart_id( "torso" ), 0 ); +@@ -4985,7 +4988,7 @@ + + void Character::update_bodytemp( const map &m, const weather_manager &weather ) + { +- if( has_trait( trait_DEBUG_NOTEMP ) ) { ++ if( has_trait( trait_DEBUG_NOTEMP ) || has_trait( trait_VAMP_SKIN ) ) { + temp_cur.fill( BODYTEMP_NORM ); + temp_conv.fill( BODYTEMP_NORM ); + return; +@@ -6629,6 +6629,7 @@ + } else if( eff == effect_deaf ) { + return worn_with_flag( flag_DEAF ) || worn_with_flag( flag_PARTIAL_DEAF ) || + has_bionic( bio_ears ) || ++ has_trait( trait_VAMP_HEARING ) || + is_wearing( itype_rm13_armor_on ); + } else if( eff == effect_corroding ) { + return is_immune_damage( DT_ACID ) || has_trait( trait_SLIMY ) || has_trait( trait_VISCOUS ); + +--- a/src/character.h ++++ b/src/character.h +@@ -162,6 +162,8 @@ + allergy_weak, + // Cannibalism (unless psycho/cannibal) + cannibalism, ++ // Vampirism (unless psycho/cannibal) ++ vampirism, + // Rotten or not rotten enough (for saprophages) + rotten, + // Can provoke vomiting if you already feel nauseous. + +--- a/src/consumption.cpp ++++ b/src/consumption.cpp +@@ -108,8 +108,10 @@ + static const trait_id trait_THRESH_LUPINE( "THRESH_LUPINE" ); + static const trait_id trait_THRESH_PLANT( "THRESH_PLANT" ); + static const trait_id trait_THRESH_URSINE( "THRESH_URSINE" ); ++static const trait_id trait_VAMP_HUNGER( "VAMP_HUNGER" ); + static const trait_id trait_VEGETARIAN( "VEGETARIAN" ); + static const trait_id trait_WATERSLEEP( "WATERSLEEP" ); + + static const trait_flag_str_id trait_flag_CANNIBAL( "CANNIBAL" ); ++static const trait_flag_str_id trait_flag_VAMPIRE( "VAMPIRE" ); + +@@ -126,6 +126,15 @@ + flag_id( "ALLERGEN_WHEAT" ), flag_id( "ALLERGEN_NUT" ) + }}; + ++static const std::array<flag_id, 12> vamp_blacklist {{ ++ flag_id( "ALLERGEN_VEGGY" ), flag_id( "ALLERGEN_FRUIT" ), ++ flag_id( "ALLERGEN_WHEAT" ), flag_id( "ALLERGEN_NUT" ), ++ flag_id( "ALLERGEN_MEAT" ), flag_id( "ALLERGEN_EGG" ), ++ flag_id( "ALLERGEN_JUNK" ), flag_id( "ALLERGEN_MILK" ), ++ flag_id( "ALLERGEN_HONEY" ), flag_id( "ALLERGEN_FOODSTUFF" ), ++ flag_id( "ALLERGEN_ALCOHOL" ), flag_id( "ALLERGEN_WATER" ) ++ }}; ++ + static const std::array<flag_id, 2> herbivore_blacklist {{ + flag_id( "ALLERGEN_MEAT" ), flag_id( "ALLERGEN_EGG" ) + }}; +@@ -712,6 +712,12 @@ + _( "Eww. Inedible plant stuff!" ) ); + } + ++ if( has_trait_flag( trait_flag_VAMPIRE ) && food.has_any_flag( vamp_blacklist ) && ++ !food.has_flag( flag_VAMPIRISM_OK ) ) { ++ return ret_val<edible_rating>::make_failure( edible_rating::inedible_mutation, ++ _( "Bleh. This isn't blood!" ) ); ++ } ++ + if( ( has_trait( trait_HERBIVORE ) || has_trait( trait_RUMINANT ) ) && + food.has_any_flag( herbivore_blacklist ) ) { + // Like non-cannibal, but more strict! +@@ -744,8 +744,15 @@ + } + } + ++ if( food.has_flag( flag_VAMPIRISM ) && ( !has_trait_flag( trait_flag_VAMPIRE ) && ++ !has_trait_flag( trait_flag_CANNIBAL ) ) ) { ++ add_consequence( _( "The thought of drinking human blood makes you feel sick." ), ++ edible_rating::vampirism ); ++ } ++ + const bool carnivore = has_trait( trait_CARNIVORE ); +- if( food.has_flag( flag_CANNIBALISM ) && !has_trait_flag( trait_flag_CANNIBAL ) ) { ++ if( ( food.has_flag( flag_CANNIBALISM ) && !food.has_flag( flag_VAMPIRISM ) ) && ++ !has_trait_flag( trait_flag_CANNIBAL ) ) { + add_consequence( _( "The thought of eating human flesh makes you feel sick." ), + edible_rating::cannibalism ); + } +@@ -1084,7 +1091,28 @@ + } + } + +- if( food.has_flag( flag_CANNIBALISM ) ) { ++ if( food.has_flag( flag_VAMPIRISM ) ) { ++ const bool vamp = has_trait( trait_VAMP_HUNGER ); ++ const bool cannibal = has_trait( trait_CANNIBAL ); ++ const bool psycho = has_trait( trait_PSYCHOPATH ); ++ const bool sapiovore = has_trait( trait_SAPIOVORE ); ++ if( !vamp && !cannibal && !psycho && !sapiovore ) { ++ add_msg_if_player( m_bad, _( "You feel horrible for drinking the blood of a person." ) ); ++ add_morale( MORALE_CANNIBAL, -60, -400, 60_minutes, 30_minutes ); ++ } else if( vamp ) { ++ add_msg_if_player( m_good, _( "You relish drinking the human blood." ) ); ++ add_morale( MORALE_VAMPIRE, 30, 300 ); ++ } else if( cannibal ) { ++ add_msg_if_player( m_good, _( "You indulge your shameful hunger." ) ); ++ add_morale( MORALE_CANNIBAL, 20, 200 ); ++ } else if( psycho || sapiovore ) { ++ // Nothing - doesn't care enough to print a message ++ } else { ++ add_msg_if_player( m_bad, _( "You found a bug drinking human blood." ) ); ++ } ++ } ++ ++ if( food.has_flag( flag_CANNIBALISM ) && !food.has_flag( flag_VAMPIRISM ) ) { + const bool cannibal = has_trait( trait_CANNIBAL ); + const bool psycho = has_trait( trait_PSYCHOPATH ); + const bool sapiovore = has_trait( trait_SAPIOVORE ); +@@ -1123,6 +1161,11 @@ + add_msg_if_player( m_bad, _( "Yuck! How can anybody eat this stuff?" ) ); + add_morale( allergy, -75, -400, 30_minutes, 24_minutes ); + } ++ if( allergy != MORALE_NULL && has_trait( trait_VAMP_HUNGER ) ) { ++ add_msg_if_player( m_bad, _( "I can't stomach anything but blood!" ) ); ++ add_morale( allergy, -75, -400, 30_minutes, 24_minutes ); ++ vomit(); ++ } + if( food.has_flag( flag_ALLERGEN_JUNK ) ) { + if( has_trait( trait_PROJUNK ) ) { + add_msg_if_player( m_good, _( "Mmm, junk food." ) ); + +--- a/src/flag.cpp ++++ b/src/flag.cpp +@@ -15,13 +15,17 @@ + const flag_id flag_ACT_IN_FIRE( "ACT_IN_FIRE" ); + const flag_id flag_ACT_ON_RANGED_HIT( "ACT_ON_RANGED_HIT" ); + const flag_id flag_ALARMCLOCK( "ALARMCLOCK" ); ++const flag_id flag_ALLERGEN_ALCOHOL( "ALLERGEN_ALCOHOL" ); + const flag_id flag_ALLERGEN_EGG( "ALLERGEN_EGG" ); ++const flag_id flag_ALLERGEN_FOODSTUFF( "ALLERGEN_FOODSTUFF" ); + const flag_id flag_ALLERGEN_FRUIT( "ALLERGEN_FRUIT" ); ++const flag_id flag_ALLERGEN_HONEY( "ALLERGEN_HONEY" ); + const flag_id flag_ALLERGEN_JUNK( "ALLERGEN_JUNK" ); + const flag_id flag_ALLERGEN_MEAT( "ALLERGEN_MEAT" ); + const flag_id flag_ALLERGEN_MILK( "ALLERGEN_MILK" ); + const flag_id flag_ALLERGEN_NUT( "ALLERGEN_NUT" ); + const flag_id flag_ALLERGEN_VEGGY( "ALLERGEN_VEGGY" ); ++const flag_id flag_ALLERGEN_WATER( "ALLERGEN_WATER" ); + const flag_id flag_ALLERGEN_WHEAT( "ALLERGEN_WHEAT" ); + const flag_id flag_ALLERGEN_WOOL( "ALLERGEN_WOOL" ); + const flag_id flag_ALLOWS_NATURAL_ATTACKS( "ALLOWS_NATURAL_ATTACKS" ); +@@ -326,6 +330,8 @@ + const flag_id flag_USE_UPS( "USE_UPS" ); + const flag_id flag_VARSIZE( "VARSIZE" ); + const flag_id flag_VEHICLE( "VEHICLE" ); ++const flag_id flag_VAMPIRISM( "VAMPIRISM" ); ++const flag_id flag_VAMPIRISM_OK( "VAMPIRISM_OK" ); + const flag_id flag_VERY_COLD( "VERY_COLD" ); + const flag_id flag_WAIST( "WAIST" ); + const flag_id flag_WATCH( "WATCH" ); + +--- a/src/flag.h ++++ b/src/flag.h +@@ -17,13 +17,17 @@ + extern const flag_id flag_ACT_IN_FIRE; + extern const flag_id flag_ACT_ON_RANGED_HIT; + extern const flag_id flag_ALARMCLOCK; ++extern const flag_id flag_ALLERGEN_ALCOHOL; + extern const flag_id flag_ALLERGEN_EGG; ++extern const flag_id flag_ALLERGEN_FOODSTUFF; + extern const flag_id flag_ALLERGEN_FRUIT; ++extern const flag_id flag_ALLERGEN_HONEY; + extern const flag_id flag_ALLERGEN_JUNK; + extern const flag_id flag_ALLERGEN_MEAT; + extern const flag_id flag_ALLERGEN_MILK; + extern const flag_id flag_ALLERGEN_NUT; + extern const flag_id flag_ALLERGEN_VEGGY; ++extern const flag_id flag_ALLERGEN_WATER; + extern const flag_id flag_ALLERGEN_WHEAT; + extern const flag_id flag_ALLERGEN_WOOL; + extern const flag_id flag_ALLOWS_NATURAL_ATTACKS; +@@ -327,6 +331,8 @@ + extern const flag_id flag_USE_PLAYER_ENERGY; + extern const flag_id flag_USE_UPS; + extern const flag_id flag_VARSIZE; ++extern const flag_id flag_VAMPIRISM; ++extern const flag_id flag_VAMPIRISM_OK; + extern const flag_id flag_VERY_COLD; + extern const flag_id flag_VEHICLE; + extern const flag_id flag_WAIST; + +--- a/src/game.cpp ++++ b/src/game.cpp +@@ -1040,8 +1040,9 @@ + int iInfoLine = 0; + + if( u.has_amount( itype_holybook_bible1, 1 ) || u.has_amount( itype_holybook_bible2, 1 ) || +- u.has_amount( itype_holybook_bible3, 1 ) ) { +- if( !( u.has_trait( trait_id( "CANNIBAL" ) ) || u.has_trait( trait_id( "PSYCHOPATH" ) ) ) ) { ++ u.has_amount( itype_holybook_bible3, 1 ) || u.has_trait( trait_id( "THRESH_REAL_VAMP" ) ) ) { ++ if( !( u.has_trait( trait_id( "CANNIBAL" ) ) || u.has_trait( trait_id( "PSYCHOPATH" ) ) || ++ u.has_trait( trait_id( "THRESH_REAL_VAMP" ) ) ) ) { + vRip.emplace_back( " _______ ___" ); + vRip.emplace_back( " < `/ |" ); + vRip.emplace_back( " > _ _ (" ); + +--- a/src/item.cpp ++++ b/src/item.cpp +@@ -148,6 +148,7 @@ + static const species_id ROBOT( "ROBOT" ); + + static const trait_flag_str_id trait_flag_CANNIBAL( "CANNIBAL" ); ++static const trait_flag_str_id trait_flag_VAMPIRE( "VAMPIRE" ); + + static const bionic_id bio_digestion( "bio_digestion" ); + +@@ -1720,18 +1722,34 @@ + _( "* This food will cause an <bad>allergic reaction</bad>." ) ); + } + ++ if( food_item->has_flag( flag_VAMPIRISM ) && ++ parts->test( iteminfo_parts::FOOD_VAMPIRISM ) ) { ++ if( you.has_trait_flag( trait_flag_VAMPIRE ) ) { ++ info.emplace_back( "DESCRIPTION", ++ _( "* This food contains <good>human blood</good>." ) ); ++ } else if( you.has_trait_flag( trait_flag_CANNIBAL ) ) { ++ info.emplace_back( "DESCRIPTION", ++ _( "* This food contains <good>human flesh</good>." ) ); ++ } else { ++ info.emplace_back( "DESCRIPTION", ++ _( "* This food contains <bad>human flesh</bad>." ) ); ++ } ++ } ++ + if( food_item->has_flag( flag_CANNIBALISM ) && ++ !food_item->has_flag( flag_VAMPIRISM ) && + parts->test( iteminfo_parts::FOOD_CANNIBALISM ) ) { +- if( !you.has_trait_flag( trait_flag_CANNIBAL ) ) { ++ if( !you.has_trait_flag( trait_flag_CANNIBAL ) && !you.has_trait_flag( trait_flag_VAMPIRE ) ) { + info.emplace_back( "DESCRIPTION", +- _( "* This food contains <bad>human flesh</bad>." ) ); ++ _( "* This food contains <good>human flesh</good>." ) ); + } else { + info.emplace_back( "DESCRIPTION", +- _( "* This food contains <good>human flesh</good>." ) ); ++ _( "* This food contains <bad>human flesh</bad>." ) ); + } + } + +- if( food_item->is_tainted() && parts->test( iteminfo_parts::FOOD_CANNIBALISM ) ) { ++ if( food_item->is_tainted() && ( parts->test( iteminfo_parts::FOOD_CANNIBALISM ) || ++ parts->test( iteminfo_parts::FOOD_VAMPIRISM ) ) ) { + info.emplace_back( "DESCRIPTION", + _( "* This food is <bad>tainted</bad> and will poison you." ) ); + } +@@ -4041,6 +4059,7 @@ + case edible_rating::allergy: + case edible_rating::allergy_weak: + case edible_rating::cannibalism: ++ case edible_rating::vampirism: + ret = c_red; + break; + case edible_rating::rotten: + +--- a/src/item_factory.cpp ++++ b/src/item_factory.cpp +@@ -2470,6 +2470,7 @@ + // First allergens: + // An item is an allergen even if it has trace amounts of allergenic material + std::make_pair( material_id( "hflesh" ), flag_CANNIBALISM ), ++ std::make_pair( material_id( "blood" ), flag_VAMPIRISM ), + + std::make_pair( material_id( "hflesh" ), flag_ALLERGEN_MEAT ), + std::make_pair( material_id( "iflesh" ), flag_ALLERGEN_MEAT ), +@@ -2484,10 +2485,16 @@ + std::make_pair( material_id( "mushroom" ), flag_ALLERGEN_VEGGY ), + std::make_pair( material_id( "milk" ), flag_ALLERGEN_MILK ), + std::make_pair( material_id( "egg" ), flag_ALLERGEN_EGG ), ++ std::make_pair( material_id( "alcohol" ), flag_ALLERGEN_ALCOHOL ), ++ std::make_pair( material_id( "foodplace_foodstuff" ), flag_ALLERGEN_FOODSTUFF ), ++ std::make_pair( material_id( "water" ), flag_ALLERGEN_WATER ), ++ std::make_pair( material_id( "honey" ), flag_ALLERGEN_HONEY ), + std::make_pair( material_id( "junk" ), flag_ALLERGEN_JUNK ), + // Not food, but we can keep it here + std::make_pair( material_id( "wool" ), flag_ALLERGEN_WOOL ), + // Now "made of". Those flags should not be passed ++ std::make_pair( material_id( "blood" ), flag_VAMPIRISM_OK ), ++ std::make_pair( material_id( "blood" ), flag_CARNIVORE_OK ), + std::make_pair( material_id( "flesh" ), flag_CARNIVORE_OK ), + std::make_pair( material_id( "hflesh" ), flag_CARNIVORE_OK ), + std::make_pair( material_id( "iflesh" ), flag_CARNIVORE_OK ), + +--- a/src/iteminfo_query.h ++++ b/src/iteminfo_query.h +@@ -36,6 +36,7 @@ + FOOD_VITAMINS, + FOOD_VIT_EFFECTS, + FOOD_CANNIBALISM, ++ FOOD_VAMPIRISM, + FOOD_TAINT, + FOOD_POISON, + FOOD_HALLUCINOGENIC, + +--- a/src/map_field.cpp ++++ b/src/map_field.cpp +@@ -91,6 +91,7 @@ + static const trait_id trait_M_SKIN3( "M_SKIN3" ); + static const trait_id trait_THRESH_MARLOSS( "THRESH_MARLOSS" ); + static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); ++static const trait_id trait_VAMP_SKIN( "VAMP_SKIN" ); + static const trait_id trait_WEB_WALKER( "WEB_WALKER" ); + + void map::create_burnproducts( const tripoint &p, const item &fuel, const units::mass &burned_mass ) +@@ -1405,7 +1405,8 @@ + if( ( cur.get_field_intensity() > 1 || !one_in( 3 ) ) && ( !inside || one_in( 3 ) ) ) { + u.add_env_effect( effect_teargas, bp_mouth, 5, 20_seconds ); + } +- if( cur.get_field_intensity() > 1 && ( !inside || one_in( 3 ) ) ) { ++ if( !( u.has_trait( trait_VAMP_SKIN ) ) && cur.get_field_intensity() > 1 && ( !inside || ++ one_in( 3 ) ) ) { + u.add_env_effect( effect_blind, bp_eyes, cur.get_field_intensity() * 2, 10_seconds ); + } + } +@@ -1539,7 +1539,7 @@ + // The gas won't harm you inside a vehicle. + if( !inside ) { + // Full body suits protect you from the effects of the gas. +- if( !( u.worn_with_flag( STATIC( flag_id( "GAS_PROOF" ) ) ) && ++ if( !( u.has_trait( trait_VAMP_SKIN ) ) && !( u.worn_with_flag( STATIC( flag_id( "GAS_PROOF" ) ) ) && + u.get_env_resist( bodypart_id( "mouth" ) ) >= 15 && + u.get_env_resist( bodypart_id( "eyes" ) ) >= 15 ) ) { + const int intensity = cur.get_field_intensity(); + +--- a/src/memorial_logger.cpp ++++ b/src/memorial_logger.cpp +@@ -79,6 +79,7 @@ + static const trap_str_id tr_snake( "tr_snake" ); + static const trap_str_id tr_glass_pit( "tr_glass_pit" ); + ++static const trait_id trait_THRESH_REAL_VAMP( "THRESH_REAL_VAMP" ); + static const trait_id trait_CANNIBAL( "CANNIBAL" ); + static const trait_id trait_PSYCHOPATH( "PSYCHOPATH" ); + static const trait_id trait_SAPIOVORE( "SAPIOVORE" ); +@@ -488,6 +488,7 @@ + character_id ch = e.get<character_id>( "killer" ); + if( ch == g->u.getID() ) { + std::string name = e.get<cata_variant_type::string>( "victim_name" ); ++ bool vampire = g->u.has_trait( trait_THRESH_REAL_VAMP ); + bool cannibal = g->u.has_trait( trait_CANNIBAL ); + bool psycho = g->u.has_trait( trait_PSYCHOPATH ); + if( g->u.has_trait( trait_SAPIOVORE ) ) { +@@ -512,6 +512,10 @@ + add( pgettext( "memorial_male", "Killed an innocent, %s." ), + pgettext( "memorial_female", "Killed an innocent, %s." ), + name ); ++ } else if( vampire ) { ++ add( pgettext( "memorial_male", "Killed an innocent human, %s." ), ++ pgettext( "memorial_female", "Killed an innocent human, %s." ), ++ name ); + } else { + add( pgettext( "memorial_male", + "Killed an innocent person, %s, in cold blood and " + +--- a/src/morale_types.cpp ++++ b/src/morale_types.cpp +@@ -36,6 +36,7 @@ + const morale_type MORALE_CRAVING_MARLOSS( "morale_craving_marloss" ); + const morale_type MORALE_FOOD_BAD( "morale_food_bad" ); + const morale_type MORALE_CANNIBAL( "morale_cannibal" ); ++const morale_type MORALE_VAMPIRE( "morale_vampire" ); + const morale_type MORALE_VEGETARIAN( "morale_vegetarian" ); + const morale_type MORALE_MEATARIAN( "morale_meatarian" ); + const morale_type MORALE_ANTIFRUIT( "morale_antifruit" ); + +--- a/src/morale_types.h ++++ b/src/morale_types.h +@@ -62,6 +62,7 @@ + extern const morale_type MORALE_CRAVING_MARLOSS; + extern const morale_type MORALE_FOOD_BAD; + extern const morale_type MORALE_CANNIBAL; ++extern const morale_type MORALE_VAMPIRE; + extern const morale_type MORALE_VEGETARIAN; + extern const morale_type MORALE_MEATARIAN; + extern const morale_type MORALE_ANTIFRUIT; + +--- a/src/mutation.cpp ++++ b/src/mutation.cpp +@@ -80,6 +80,7 @@ + static const trait_id trait_STR_ALPHA( "STR_ALPHA" ); + static const trait_id trait_THRESH_MARLOSS( "THRESH_MARLOSS" ); + static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); ++static const trait_id trait_VAMP_SKIN( "VAMP_SKIN" ); + static const trait_id trait_TREE_COMMUNION( "TREE_COMMUNION" ); + static const trait_id trait_VOMITOUS( "VOMITOUS" ); + static const trait_id trait_WEB_WEAVER( "WEB_WEAVER" ); +@@ -860,6 +860,11 @@ + if( !mutagen ) { + return; + } ++ if( has_trait( trait_VAMP_SKIN ) ) { ++ add_msg_if_player( m_good, _( "Your Vampire blood quickly destroys the mutagenic contagion." ) ); ++ remove_effect( effect_accumulated_mutagen ); ++ return; ++ } + float mut_power = to_turns<float>( mutagen.get_duration() ) / to_turns<float> + ( mutagen.get_int_dur_factor() ); + add_msg_if_player( m_debug, "Mutation accumulation: %.1f", mut_power ); +@@ -904,6 +904,10 @@ + { + bool force_bad = one_in( 3 ); + bool force_good = false; ++ if( has_trait( trait_VAMP_SKIN ) ) { ++ add_msg_if_player( m_good, _( "Your Vampire blood quickly destroys the mutagenic contagion." ) ); ++ return; ++ } + if( has_trait( trait_ROBUST ) && force_bad ) { + // Robust Genetics gives you a 33% chance for a good mutation, + // instead of the 33% chance of a bad one. + +--- a/src/npc.cpp ++++ b/src/npc.cpp +@@ -118,6 +118,7 @@ + static const trait_id trait_SAPIOVORE( "SAPIOVORE" ); + static const trait_id trait_SCHIZOPHRENIC( "SCHIZOPHRENIC" ); + static const trait_id trait_TERRIFYING( "TERRIFYING" ); ++static const trait_id trait_THRESH_REAL_VAMP( "THRESH_REAL_VAMP" ); + + class monfaction; + +@@ -2492,12 +2492,15 @@ + } + + if( get_killer() == &g->u && ( !guaranteed_hostile() || hit_by_player ) ) { ++ bool vampire = g->u.has_trait( trait_THRESH_REAL_VAMP ); + bool cannibal = g->u.has_trait( trait_CANNIBAL ); + bool psycho = g->u.has_trait( trait_PSYCHOPATH ) || g->u.has_trait( trait_KILLER ); + if( g->u.has_trait( trait_SAPIOVORE ) || psycho ) { + // No morale penalty + } else if( cannibal ) { + g->u.add_morale( MORALE_KILLED_INNOCENT, -5, 0, 2_days, 3_hours ); ++ } else if( vampire ) { ++ g->u.add_morale( MORALE_KILLED_INNOCENT, -5, 0, 2_days, 3_hours ); + } else { + g->u.add_morale( MORALE_KILLED_INNOCENT, -100, 0, 2_days, 3_hours ); + } + +--- a/src/player_hardcoded_effects.cpp ++++ b/src/player_hardcoded_effects.cpp +@@ -105,6 +105,8 @@ + static const trait_id trait_SEESLEEP( "SEESLEEP" ); + static const trait_id trait_SCHIZOPHRENIC( "SCHIZOPHRENIC" ); + static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); ++static const trait_id trait_THRESH_REAL_VAMP( "THRESH_REAL_VAMP" ); ++static const trait_id trait_VAMP_SKIN( "VAMP_SKIN" ); + static const trait_id trait_WATERSLEEP( "WATERSLEEP" ); + + static void eff_fun_onfire( player &u, effect &it ) +@@ -841,7 +841,9 @@ + } + + if( dur > 1800_minutes && one_in( 300 * 512 ) ) { +- if( !has_trait( trait_NOPAIN ) ) { ++ if( has_trait( trait_VAMP_SKIN ) ) { ++ return; ++ } else if( !has_trait( trait_NOPAIN ) ) { + add_msg_if_player( m_bad, + _( "Your heart spasms painfully and stops, dragging you back to reality as you die." ) ); + } else { + +--- a/src/suffer.cpp ++++ b/src/suffer.cpp +@@ -153,6 +153,8 @@ + 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_VAMP_SKIN( "VAMP_SKIN" ); + 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" ); +@@ -251,7 +251,8 @@ + if( has_trait( trait_DEBUG_STAMINA ) ) { + return; + } +- if( !has_trait( trait_GILLS ) && !has_trait( trait_GILLS_CEPH ) ) { ++ if( !has_trait( trait_GILLS ) && !has_trait( trait_GILLS_CEPH ) && ++ !has_trait( trait_VAMP_SKIN ) ) { + oxygen--; + } + if( oxygen < 12 && worn_with_flag( flag_REBREATHER ) ) { +@@ -751,7 +751,8 @@ + return; + } + +- 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(); + } + +@@ -778,6 +778,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 ); ++ } + } + + std::map<bodypart_id, float> Character::bodypart_exposure() +@@ -816,7 +816,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; + } + +@@ -834,6 +834,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. +@@ -917,7 +917,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 ) { +@@ -1663,7 +1664,7 @@ + + healing_factor *= mutation_value( "mending_modifier" ); + +- if( has_trait( trait_REGEN_LIZ ) ) { ++ if( has_trait( trait_REGEN_LIZ ) || has_trait( trait_VAMP_SKIN ) ) { + needs_splint = false; + } + + +--- a/data/json/field_type.json ++++ b/data/json/field_type.json +@@ -299,7 +299,7 @@ + "dirty_transparency_cache": true, + "percent_spread": 10, + "outdoor_age_speedup": "0 turns", +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 7 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 7 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "2 minutes", + "phase": "gas", +@@ -385,7 +385,7 @@ + "outdoor_age_speedup": "3 minutes", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "10 minutes", + "phase": "gas", +@@ -414,7 +414,7 @@ + "outdoor_age_speedup": "0 turns", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ], [ "eyes", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "5 minutes", + "phase": "gas", +@@ -460,7 +460,7 @@ + "wandering_field": "fd_toxic_gas", + "gas_absorption_factor": 15, + "dirty_transparency_cache": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "phase": "gas", + "display_items": false, + "display_field": true, +@@ -577,7 +577,7 @@ + "outdoor_age_speedup": "3 minutes", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "10 minutes", + "phase": "gas", +@@ -956,7 +956,7 @@ + "outdoor_age_speedup": "5 minutes", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "50 minutes", + "phase": "gas", +@@ -978,7 +978,7 @@ + "outdoor_age_speedup": "1 minutes", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "15 minutes", + "phase": "gas", +@@ -1225,7 +1225,7 @@ + "outdoor_age_speedup": "3 minutes", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": -1, + "half_life": "10 minutes", + "phase": "gas" +@@ -1245,7 +1245,7 @@ + "outdoor_age_speedup": "1 minutes", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "30 minutes", + "phase": "gas", +@@ -1267,7 +1267,7 @@ + "outdoor_age_speedup": "1 minutes", + "dirty_transparency_cache": true, + "has_fume": true, +- "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ] }, ++ "immunity_data": { "body_part_env_resistance": [ [ "mouth", 15 ] ], "traits": [ "VAMP_SKIN" ] }, + "priority": 8, + "half_life": "30 minutes", + "phase": "gas", + +--- a/data/json/flags.json ++++ b/data/json/flags.json +@@ -1117,6 +1117,26 @@ + "context": [ "COMESTIBLE" ] + }, + { ++ "id": "ALLERGEN_HONEY", ++ "type": "json_flag", ++ "context": [ "COMESTIBLE" ] ++ }, ++ { ++ "id": "ALLERGEN_ALCOHOL", ++ "type": "json_flag", ++ "context": [ "COMESTIBLE" ] ++ }, ++ { ++ "id": "ALLERGEN_FOODSTUFF", ++ "type": "json_flag", ++ "context": [ "COMESTIBLE" ] ++ }, ++ { ++ "id": "ALLERGEN_WATER", ++ "type": "json_flag", ++ "context": [ "COMESTIBLE" ] ++ }, ++ { + "id": "ALLERGEN_JUNK", + "type": "json_flag", + "context": [ "COMESTIBLE" ] +@@ -1197,6 +1197,16 @@ + "context": [ ] + }, + { ++ "id": "VAMPIRISM", ++ "type": "json_flag", ++ "context": [ ] ++ }, ++ { ++ "id": "VAMPIRISM_OK", ++ "type": "json_flag", ++ "context": [ ] ++ }, ++ { + "id": "CASING", + "type": "json_flag", + "context": [ ] + +--- a/data/json/flags_mutation.json ++++ b/data/json/flags_mutation.json +@@ -128,5 +132,9 @@ + { + "id": "UNARMED_BONUS", + "type": "mutation_flag" ++ }, ++ { ++ "id": "VAMPIRE", ++ "type": "mutation_flag" + } + ] +--- a/data/json/morale_types.json ++++ b/data/json/morale_types.json +@@ -125,6 +125,11 @@ + "text": "Ate Human Flesh" + }, + { ++ "id": "morale_vampire", ++ "type": "morale_type", ++ "text": "Drank Human Blood" ++ }, ++ { + "id": "morale_vegetarian", + "type": "morale_type", + "text": "Ate Meat" + +--- a/data/json/mutations/mutation_ordering.json ++++ b/data/json/mutations/mutation_ordering.json +@@ -73,6 +73,7 @@ + "TROGLO2", + "TROGLO3", + "URSINE_FUR", ++ "VAMP_SKIN", + "VISCOUS" + ], + "order": 1500 +@@ -180,7 +181,7 @@ + { "id": [ "FLOWERS" ], "order": 5000 }, + { "id": [ "ELFA_EARS", "FELINE_EARS", "LUPINE_EARS", "URSINE_EARS" ], "order": 5500 }, + { "id": [ "ANTENNAE", "ANTLERS", "CURVED_HORNS", "HORNS", "POINTED_HORNS" ], "order": 6000 }, +- { "id": [ "COMPOUND_EYES", "ELFAEYES", "FEL_EYE", "LIZ_EYE" ], "order": 6500 }, ++ { "id": [ "COMPOUND_EYES", "ELFAEYES", "FEL_EYE", "LIZ_EYE", "REAL_VAMP_EYES" ], "order": 6500 }, + { + "id": [ + "BEAK", |