summaryrefslogtreecommitdiff
path: root/revert-01_removed-traits.patch
blob: 9b98d83ab516cd078ffc9699dc71132df3a821d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
--- 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.  You will also be able to install non-sterile CBMs.",
+    "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" ]
   },
   {

--- a/data/json/obsoletion/mutations.json
+++ b/data/json/obsoletion/mutations.json
@@ -109,7 +109,7 @@
     "id": "INFIMMUNE",
     "name": { "str": "Infection Immune" },
     "points": 3,
-    "description": "Your bloodstream has developed antibiotic properties.  Your wounds will never become infected.",
+    "description": "Your bloodstream has developed antibiotic properties.  Your wounds will never become infected. You will also be able to install non-sterile CBMs.",
     "prereqs": [ "DISRESISTANT" ],
     "prereqs2": [ "INFRESIST" ],
     "valid": false

--- a/data/json/scenarios.json
+++ b/data/json/scenarios.json
@@ -319,7 +319,7 @@
     "allowed_locs": [ "sloc_hospital" ],
     "start_name": "Hospital",
     "forced_traits": [ "FLIMSY2" ],
-    "forbidden_traits": [ "TOUGH" ],
+    "forbidden_traits": [ "TOUGH", "DISRESISTANT" ],
     "professions": [ "unemployed", "bionic_patient", "patient", "broken_cyborg", "senior" ],
     "flags": [ "CHALLENGE", "CITY_START", "LONE_START" ]
   },

--- a/data/json/npcs/starting_traits.json
+++ b/data/json/npcs/starting_traits.json
@@ -34,6 +34,7 @@
       { "group": "trait_group_PAINRESIST", "prob": 10 },
       { "group": "trait_group_PROJUNK", "prob": 5 },
       { "trait": "DEFT", "prob": 10 },
+      { "trait": "DISRESISTANT", "prob": 10 },
       { "trait": "ADRENALINE", "prob": 10 },
       { "trait": "INFRESIST", "prob": 15 },
       { "trait": "MASOCHIST", "prob": 10 },
@@ -200,7 +201,7 @@
     "id": "trait_group_LIAR",
     "subtype": "distribution",
     "//": "NOTE: These traits should be used as conditionals to affect the difficulty of NPCs lying about the expertise they have.",
-    "traits": [ { "trait": "LIAR" } ]
+    "traits": [ { "trait": "LIAR" }, { "trait": "TRUTHTELLER" } ]
   },
   {
     "type": "trait_group",

--- a/src/character_turn.cpp
+++ b/src/character_turn.cpp
@@ -42,6 +42,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_INSECT_ARMS_OK( "INSECT_ARMS_OK" );
 static const trait_id trait_INSECT_ARMS( "INSECT_ARMS" );
 static const trait_id trait_LIGHTFUR( "LIGHTFUR" );
@@ -60,6 +61,7 @@
 static const trait_id trait_WHISKERS_RAT( "WHISKERS_RAT" );
 static const trait_id trait_WHISKERS( "WHISKERS" );
 
+static const efftype_id effect_bite( "bite" );
 static const efftype_id effect_bloodworms( "bloodworms" );
 static const efftype_id effect_brainworms( "brainworms" );
 static const efftype_id effect_darkness( "darkness" );
@@ -69,11 +71,13 @@
 static const efftype_id effect_fungus( "fungus" );
 static const efftype_id effect_happy( "happy" );
 static const efftype_id effect_irradiated( "irradiated" );
+static const efftype_id effect_infected( "infected" );
 static const efftype_id effect_masked_scent( "masked_scent" );
 static const efftype_id effect_narcosis( "narcosis" );
 static const efftype_id effect_onfire( "onfire" );
 static const efftype_id effect_paincysts( "paincysts" );
 static const efftype_id effect_pkill( "pkill" );
+static const efftype_id effect_recover( "recover" );
 static const efftype_id effect_sad( "sad" );
 static const efftype_id effect_sleep_deprived( "sleep_deprived" );
 static const efftype_id effect_sleep( "sleep" );
@@ -566,6 +570,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/src/game_inventory.cpp
+++ b/src/game_inventory.cpp
@@ -79,7 +79,7 @@
 static const trait_id trait_NOPAIN( "NOPAIN" );
 static const trait_id trait_SAPROPHAGE( "SAPROPHAGE" );
 static const trait_id trait_SAPROVORE( "SAPROVORE" );
-static const trait_id trait_INFRESIST( "INFRESIST" );
+static const trait_id trait_INFIMMUNE( "INFIMMUNE" );
 
 static const std::string flag_ALLOWS_REMOTE_USE( "ALLOWS_REMOTE_USE" );
 static const std::string flag_FILTHY( "FILTHY" );
@@ -1879,7 +1879,7 @@
             const itype *itemtype = it->type;
             const bionic_id &bid = itemtype->bionic->id;
 
-            if( it->has_fault( fault_bionic_nonsterile ) && !p.has_trait( trait_INFRESIST ) ) {
+            if( it->has_fault( fault_bionic_nonsterile ) && !p.has_trait( trait_INFIMMUNE ) ) {
                 // NOLINTNEXTLINE(cata-text-style): single space after the period for symmetry
                 return _( "/!\\ CBM is not sterile. /!\\ Please use autoclave or other methods to sterilize." );
             } else if( pa.has_bionic( bid ) ) {

--- a/src/iuse_actor.cpp
+++ b/src/iuse_actor.cpp
@@ -131,7 +131,7 @@
 static const trait_id trait_CENOBITE( "CENOBITE" );
 static const trait_id trait_DEBUG_BIONICS( "DEBUG_BIONICS" );
 static const trait_id trait_TOLERANCE( "TOLERANCE" );
-static const trait_id trait_INFRESIST( "INFRESIST" );
+static const trait_id trait_INFIMMUNE( "INFIMMUNE" );
 static const trait_id trait_LIGHTWEIGHT( "LIGHTWEIGHT" );
 static const trait_id trait_PACIFIST( "PACIFIST" );
 static const trait_id trait_PSYCHOPATH( "PSYCHOPATH" );
@@ -4419,7 +4419,7 @@
         !p.has_trait( trait_DEBUG_BIONICS ) ) {
         return ret_val<bool>::make_failure( _( "You can't self-install bionics." ) );
     } else if( !p.has_trait( trait_DEBUG_BIONICS ) ) {
-        if( it.has_fault( fault_bionic_nonsterile ) && !p.has_trait( trait_INFRESIST ) ) {
+        if( it.has_fault( fault_bionic_nonsterile ) && !p.has_trait( trait_INFIMMUNE ) ) {
             return ret_val<bool>::make_failure( _( "This CBM is not sterile, you can't install it." ) );
         } else if( units::energy_max - p.get_max_power_level() < bid->capacity ) {
             return ret_val<bool>::make_failure( _( "Max power capacity already reached" ) );