summaryrefslogtreecommitdiff
path: root/custom.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2022-01-07 22:16:58 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2022-01-07 22:16:58 -0800
commitf1e8d1ded7aefc05d12e43b8f06c8e50c09c8895 (patch)
tree0a275fa5699382001d2d9852568c98870615b9d7 /custom.patch
parentSoundpack updates (diff)
downloadcataclysm-bn-f1e8d1ded7aefc05d12e43b8f06c8e50c09c8895.tar.xz
Change vampire mutation immunity to occur in the mutate function.
Diffstat (limited to 'custom.patch')
-rw-r--r--custom.patch55
1 files changed, 34 insertions, 21 deletions
diff --git a/custom.patch b/custom.patch
index 85315ab..7ed870d 100644
--- a/custom.patch
+++ b/custom.patch
@@ -311,27 +311,6 @@
add( pgettext( "memorial_male",
"Killed an innocent person, %s, in cold blood and "
---- 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<player *>( target )->mutate();
-
--- a/src/morale_types.cpp
+++ b/src/morale_types.cpp
@@ -138,6 +139,7 @@
@@ -354,6 +333,40 @@
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_THRESH_VAMP( "THRESH_VAMP" );
+ 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" );
+@@ -887,6 +888,11 @@
+ if( !mutagen ) {
+ return;
+ }
++ if( has_trait( trait_THRESH_VAMP ) ) {
++ 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 );
+@@ -926,6 +932,10 @@
+ {
+ bool force_bad = one_in( 3 );
+ bool force_good = false;
++ if( has_trait( trait_THRESH_VAMP ) ) {
++ 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
@@ -116,6 +116,7 @@