summaryrefslogtreecommitdiff
path: root/vampirism.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2022-01-30 19:43:19 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2022-01-30 19:43:19 -0800
commit2d949f03a091bcb732f1fc8d94a72c726ac61456 (patch)
tree08f410ef24f4fac65cbdcbf18cc0bf0f267b7fb1 /vampirism.patch
parentFix more patch fuzz warnings in fix malnourishment patch. (diff)
downloadcataclysm-bn-2d949f03a091bcb732f1fc8d94a72c726ac61456.tar.xz
Fix vampires being unable to drink crafted blood again.
Diffstat (limited to 'vampirism.patch')
-rw-r--r--vampirism.patch55
1 files changed, 33 insertions, 22 deletions
diff --git a/vampirism.patch b/vampirism.patch
index ee770b9..7480ae7 100644
--- a/vampirism.patch
+++ b/vampirism.patch
@@ -209,21 +209,22 @@
add_consequence( _( "The thought of eating human flesh makes you feel sick." ),
edible_rating::cannibalism );
}
-@@ -1084,13 +1091,36 @@
+@@ -1084,7 +1091,26 @@
}
}
+- 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 );
-+ const bool vamp = has_trait( trait_VAMP_HUNGER );
-+ if( cannibal ) {
-+ add_msg_if_player( m_good, _( "You indulge your shameful hunger." ) );
-+ add_morale( MORALE_CANNIBAL, 20, 200 );
-+ } else if( vamp ) {
++ 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 {
@@ -232,20 +233,10 @@
+ }
+ }
+
- if( food.has_flag( flag_CANNIBALISM ) ) {
++ 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 );
-+ const bool vamp = has_trait( trait_VAMP_HUNGER );
- if( cannibal ) {
- add_msg_if_player( m_good, _( "You indulge your shameful hunger." ) );
- add_morale( MORALE_CANNIBAL, 20, 200 );
-+ } else if( vamp && !food.has_flag( flag_VAMPIRISM ) ) {
-+ add_msg_if_player( m_bad, _( "You feel horrible for eating a person." ) );
-+ add_morale( MORALE_CANNIBAL, -60, -400, 60_minutes, 30_minutes );
- } else if( psycho || sapiovore ) {
- // Nothing - doesn't care enough to print a message
- } else {
@@ -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 );
@@ -292,18 +283,32 @@
static const std::string flag_VEHICLE( "VEHICLE" );
static const std::string flag_WAIST( "WAIST" );
static const std::string flag_WATERPROOF_GUN( "WATERPROOF_GUN" );
-@@ -1722,12 +1722,15 @@
+@@ -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( g->u.has_trait_flag( trait_flag_VAMPIRE ) ) {
++ info.emplace_back( "DESCRIPTION",
++ _( "* This food contains <good>human blood</good>." ) );
++ } else if( g->u.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( !g->u.has_trait_flag( trait_flag_CANNIBAL ) ) {
+ if( g->u.has_trait_flag( trait_flag_CANNIBAL ) && !g->u.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 if( g->u.has_trait_flag( trait_flag_VAMPIRE ) && food_item->has_flag( flag_VAMPIRISM ) ) {
-+ info.emplace_back( "DESCRIPTION",
-+ _( "* This food contains <good>human blood</good>." ) );
} else {
info.emplace_back( "DESCRIPTION",
- _( "* This food contains <good>human flesh</good>." ) );
@@ -311,7 +316,13 @@
}
}
-@@ -4046,6 +4046,7 @@
+- 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: