summaryrefslogtreecommitdiff
path: root/revert-01_removed-traits.patch
blob: fd5b7720557f1c165222c44af82ec58db959b986 (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
--- 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" ]
   },
   {

--- 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" ],
     "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 ) {