summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2021-07-31 05:29:40 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2021-07-31 05:29:40 -0700
commit47b45506b41a38dffbd2920074bff9f30ece316a (patch)
tree71e9d1455451e3bcbacc657cca95d0c821bca86e
parentUpdated to 2021-07-31-0434 (diff)
downloadcataclysm-bn-master.tar.xz
Restore the Infection Immune trait as distinct from Infection ResistantHEADmaster
-rw-r--r--jc_restore-inf-immune.patch155
1 files changed, 155 insertions, 0 deletions
diff --git a/jc_restore-inf-immune.patch b/jc_restore-inf-immune.patch
new file mode 100644
index 0000000..399702f
--- /dev/null
+++ b/jc_restore-inf-immune.patch
@@ -0,0 +1,155 @@
+--- a/src/game.cpp
++++ b/src/game.cpp
+@@ -224,6 +224,7 @@
+
+ static const trait_id trait_BADKNEES( "BADKNEES" );
+ static const trait_id trait_ILLITERATE( "ILLITERATE" );
++static const trait_id trait_INFIMMUNE( "INFIMMUNE" );
+ static const trait_id trait_INFRESIST( "INFRESIST" );
+ static const trait_id trait_LEG_TENT_BRACE( "LEG_TENT_BRACE" );
+ static const trait_id trait_M_IMMUNE( "M_IMMUNE" );
+@@ -9443,8 +9444,11 @@
+ body_part_name_accusative( bp->token ),
+ m.has_flag_ter( "SHARP", dest_loc ) ? m.tername( dest_loc ) : m.furnname(
+ dest_loc ) );
+- if( !u.has_trait( trait_INFRESIST ) ) {
+- u.add_effect( effect_tetanus, 1_turns, num_bp );
++ if( ( u.has_trait( trait_INFRESIST ) ) && ( one_in( 1024 ) ) ) {
++ u.add_effect( effect_tetanus, 1_turns, num_bp, true );
++ } else if( ( !u.has_trait( trait_INFIMMUNE ) || !u.has_trait( trait_INFRESIST ) ) &&
++ ( one_in( 256 ) ) ) {
++ u.add_effect( effect_tetanus, 1_turns, num_bp, true );
+ }
+ }
+ }
+--- a/src/trapfunc.cpp
++++ b/src/trapfunc.cpp
+@@ -50,6 +50,7 @@
+ static const efftype_id effect_slimed( "slimed" );
+ static const efftype_id effect_tetanus( "tetanus" );
+
++static const trait_id trait_INFIMMUNE( "INFIMMUNE" );
+ static const trait_id trait_INFRESIST( "INFRESIST" );
+ static const trait_id trait_WINGS_BIRD( "WINGS_BIRD" );
+ static const trait_id trait_WINGS_BUTTERFLY( "WINGS_BUTTERFLY" );
+@@ -161,8 +162,13 @@
+ c->deal_damage( nullptr, hit, d );
+
+ player *n = dynamic_cast<player *>( c );
+- if( n != nullptr && !n->has_trait( trait_INFRESIST ) ) {
+- n->add_effect( effect_tetanus, 1_turns, num_bp );
++ if( n != nullptr ) {
++ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 512 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
++ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) &&
++ ( one_in( 128 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
++ }
+ }
+ c->check_dead_state();
+ } else {
+@@ -196,8 +202,11 @@
+ } else {
+ c->deal_damage( nullptr, bodypart_id( "foot_l" ), damage_instance( DT_CUT, rng( 6, 10 ) ) );
+ c->deal_damage( nullptr, bodypart_id( "foot_r" ), damage_instance( DT_CUT, rng( 6, 10 ) ) );
+- if( !n->has_trait( trait_INFRESIST ) ) {
+- n->add_effect( effect_tetanus, 1_turns, num_bp );
++ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 256 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
++ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) &&
++ ( one_in( 35 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
+ }
+ }
+ c->check_dead_state();
+@@ -855,8 +864,11 @@
+ n->add_msg_if_player( m_bad, _( "The spikes impale your %s!" ),
+ body_part_name_accusative( hit->token ) );
+ n->deal_damage( nullptr, hit, damage_instance( DT_CUT, damage ) );
+- if( !n->has_trait( trait_INFRESIST ) ) {
+- n->add_effect( effect_tetanus, 1_turns, num_bp );
++ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 256 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
++ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) &&
++ ( one_in( 35 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
+ }
+ }
+ } else if( z != nullptr ) {
+@@ -939,8 +951,11 @@
+ n->add_msg_if_player( m_bad, _( "The glass shards slash your %s!" ),
+ body_part_name_accusative( hit->token ) );
+ n->deal_damage( nullptr, hit, damage_instance( DT_CUT, damage ) );
+- if( !n->has_trait( trait_INFRESIST ) ) {
+- n->add_effect( effect_tetanus, 1_turns, num_bp );
++ if( ( n->has_trait( trait_INFRESIST ) ) && ( one_in( 256 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
++ } else if( ( !n->has_trait( trait_INFIMMUNE ) || !n->has_trait( trait_INFRESIST ) ) &&
++ ( one_in( 35 ) ) ) {
++ n->add_effect( effect_tetanus, 1_turns, num_bp, true );
+ }
+ }
+ } else if( z != nullptr ) {
+--- a/src/player.cpp
++++ b/src/player.cpp
+@@ -84,6 +84,7 @@
+ #include "weather_gen.h"
+
+ static const efftype_id effect_adrenaline( "adrenaline" );
++static const efftype_id effect_bite( "bite" );
+ static const efftype_id effect_blind( "blind" );
+ static const efftype_id effect_bloodworms( "bloodworms" );
+ static const efftype_id effect_boomered( "boomered" );
+@@ -93,12 +94,14 @@
+ static const efftype_id effect_downed( "downed" );
+ static const efftype_id effect_drunk( "drunk" );
+ static const efftype_id effect_fungus( "fungus" );
++static const efftype_id effect_infected( "infected" );
+ static const efftype_id effect_masked_scent( "masked_scent" );
+ static const efftype_id effect_meth( "meth" );
+ static const efftype_id effect_narcosis( "narcosis" );
+ static const efftype_id effect_nausea( "nausea" );
+ static const efftype_id effect_onfire( "onfire" );
+ static const efftype_id effect_paincysts( "paincysts" );
++static const efftype_id effect_recover( "recover" );
+ static const efftype_id effect_sleep( "sleep" );
+ static const efftype_id effect_stunned( "stunned" );
+ static const efftype_id effect_tapeworm( "tapeworm" );
+@@ -125,6 +128,7 @@
+ static const trait_id trait_FAT( "FAT" );
+ static const trait_id trait_FELINE_FUR( "FELINE_FUR" );
+ static const trait_id trait_FUR( "FUR" );
++static const trait_id trait_INFIMMUNE( "INFIMMUNE" );
+ static const trait_id trait_INSOMNIA( "INSOMNIA" );
+ static const trait_id trait_INT_SLIME( "INT_SLIME" );
+ static const trait_id trait_LIGHTFUR( "LIGHTFUR" );
+@@ -1660,6 +1664,12 @@
+ remove_effect( effect_tapeworm );
+ add_msg_if_player( m_good, _( "Your bowels gurgle as something inside them dies." ) );
+ }
++ if( has_trait( trait_INFIMMUNE ) && ( has_effect( effect_bite ) || has_effect( effect_infected ) ||
++ has_effect( effect_recover ) ) ) {
++ remove_effect( effect_bite );
++ remove_effect( effect_infected );
++ remove_effect( effect_recover );
++ }
+
+ //Human only effects
+ for( auto &elem : *effects ) {
+--- a/data/json/mutations/mutations.json
++++ b/data/json/mutations/mutations.json
+@@ -2538,10 +2538,11 @@
+ {
+ "type": "mutation",
+ "id": "INFRESIST",
+- "name": { "str": "Infection Immune" },
+- "points": 1,
+- "description": "Your immune system is particularly good at resisting infections. Your wounds will no longer become infected, altough existing infections are still dangerous.",
++ "name": { "str": "Infection Resistant" },
++ "points": 2,
++ "description": "Your immune system is particularly good at resisting infections. You have an increased chance for bad wounds and infections to heal on their own, and only suffer reduced penalties from them.",
+ "starting_trait": true,
++ "changes_to": [ "INFIMMUNE" ],
+ "category": [ "TROGLOBITE", "RAT", "MEDICAL" ]
+ },
+ {